-
Notifications
You must be signed in to change notification settings - Fork 2
Bug: Faulty parameter estimates #5
Copy link
Copy link
Open
Description
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
res@param.est
$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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels