Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -85,10 +85,10 @@ 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=
|
89 |
|
90 |
# show results
|
91 |
-
fig, ax_arr = rpt.display(signal, bkps, my_bkps, figsize=(10,
|
92 |
st.pyplot(fig)
|
93 |
return my_bkps
|
94 |
|
|
|
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
|
91 |
+
fig, ax_arr = rpt.display(signal, bkps, my_bkps, figsize=(10, 2))
|
92 |
st.pyplot(fig)
|
93 |
return my_bkps
|
94 |
|