Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ruptures got 2 out of 3 change points correct #324

Open
munchine opened this issue May 8, 2024 · 1 comment
Open

ruptures got 2 out of 3 change points correct #324

munchine opened this issue May 8, 2024 · 1 comment

Comments

@munchine
Copy link

munchine commented May 8, 2024

Great tool but it seems that ruptures can correctly detect 2 out of 3 correctly. Am I doing something wrong? I’ve attached the data.
Rupture_Test_Data1.xlsx

It’s a log log so here’s my code snippet
`def detect_and_plot(x, y, title):
# Change point detection on log-transformed data
xy = np.column_stack((x, y))
algo = rpt.Pelt(model="rbf").fit(xy)
result = algo.predict(pen=10)

x_log = np.log(data_cleaned['tD (x)'].to_numpy())
y_log = np.log(data_cleaned['pDp (y)'].to_numpy())
`
Here’s the plot and the 3rd change point, should occur around 14, but it is occurring around 19. Any guidance will be much appreciated.
pDp_log_plot

@deepcharles
Copy link
Owner

Hi, replace algo = rpt.Pelt(model="rbf").fit(xy) by algo = rpt.Pelt(model="rbf", jump=1).fit(xy).

By default, Pelt only looks for change-points that are multiple of 5 (bad default I know).

Hope this helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants