saritha5 commited on
Commit
1fc3528
1 Parent(s): a27ba06

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -56,7 +56,7 @@ with dim:
56
  with n_bkps:
57
  n_bkps = st.number_input('No of breakpoints',min_value=2,step=1)
58
  with sigma:
59
- sigma = st.number_input('Variance',min_value=1,max_value=4,step=1)
60
 
61
  if generate_signal == 'piecewiseConstant':
62
  signal,bkps = pw_constant_input(n,dim,n_bkps,sigma)
@@ -84,7 +84,7 @@ def dynp_method(signal,bkps,n_bkps):
84
  def pelt_method(signal,bkps,n_bkps):
85
  # change point detection
86
  model = "l1" # "l2", "rbf"
87
- algo = rpt.Pelt(model=model, min_size=3, jump=5).fit(signal)
88
  my_bkps = algo.predict(pen=n_bkps)
89
 
90
  # show results
 
56
  with n_bkps:
57
  n_bkps = st.number_input('No of breakpoints',min_value=2,step=1)
58
  with sigma:
59
+ sigma = st.number_input('Variance',min_value=0,max_value=4,step=1)
60
 
61
  if generate_signal == 'piecewiseConstant':
62
  signal,bkps = pw_constant_input(n,dim,n_bkps,sigma)
 
84
  def pelt_method(signal,bkps,n_bkps):
85
  # change point detection
86
  model = "l1" # "l2", "rbf"
87
+ algo = rpt.Pelt(model=model, min_size=n_bkps, jump=5).fit(signal)
88
  my_bkps = algo.predict(pen=n_bkps)
89
 
90
  # show results