Does Ruptures have requirements of the length of the dataset?
dzheng2333 opened this issue · 2 comments
I only have a short dataset with only 5-6 rows of data. Although I can obviously see changes in my dataset, the code returns error "BadSegmentationParameters: ":
model = "rbf" # "l1", "rbf", "linear", "normal", "ar",...
algo = rpt.Binseg(model=model).fit(data)
my_bkps2 = algo.predict(n_bkps=1)
rpt.show.display(data, my_bkps2, figsize=(10, 6))
plt.show()
So, if I want to remove the issue, I have to reset the n_bkps=0, then the error will disappear:
model = "rbf" # "l1", "rbf", "linear", "normal", "ar",...
algo = rpt.Binseg(model=model).fit(data)
my_bkps2 = algo.predict(n_bkps=0)
rpt.show.display(data, my_bkps2, figsize=(10, 6))
plt.show()
Does it mean there is a requirement of the legenth of the data?
Thanks
Hi thanks for your interest in ruptures.
Do you mean that your signal have 5 or 6 samples?
The requirement of ruptures
is that there are length>= number of segments * minimum size of segment.
Closing for now. Feel free to reopen.