Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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=
|
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=
|
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
|