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

Bug: Faulty parameter estimates #5

Open
Tveten opened this issue Aug 25, 2021 · 2 comments
Open

Bug: Faulty parameter estimates #5

Tveten opened this issue Aug 25, 2021 · 2 comments

Comments

@Tveten
Copy link

Tveten commented Aug 25, 2021

Hey,

I was very happy to find an online implementation of PELT, as it is very useful in a project I'm working on. I've encountered a bug with the output parameter estimates though. I think it should be a quick fix. Here's a MWE:

x <- c(rnorm(50), rnorm(50, 3), rnorm(50, -3))
res <- ocpt.mean.initialise(x, penalty = "BIC")

res@cpts
[1] 50 100 150
[email protected]
$mean
[1] -4.993291 69.187425 78.725460

I think I've narrowed the problem down to the param() method, lines 551-555. It seems to me like the mean is taken over the cumulatively summed observations rather than the observations themselves. (The same seems to be the case with param.var.)

I see that you haven't updated the package in some time, but I figured it was worth a shot.

Thanks.

@rkillick
Copy link
Owner

Hi @Tveten,

Thanks for the heads up. The package is currently under development as we found a bug following the GSOC submission (which necessitated making the code public). We will fix this alongside other aspects.
If you are interested in this package then you may also be interested in the package here:
https://github.com/grundy95/changepoint.forecast
This does online mean/var changepoint detection using forecast errors in a wide range of model structures.

@Tveten
Copy link
Author

Tveten commented Aug 26, 2021

I see. Thanks a lot. The changepoint.forecast package looks interesting as well.

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