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

BinSeg returns zeros in cpts.full matrix #69

Open
tdhock opened this issue Mar 23, 2022 · 0 comments
Open

BinSeg returns zeros in cpts.full matrix #69

tdhock opened this issue Mar 23, 2022 · 0 comments

Comments

@tdhock
Copy link

tdhock commented Mar 23, 2022

hi @rkillick I'm running your implementation of binary segmentation, and I'm wondering what it means when there are zeros in the cpts.full matrix? I expected that all entries of the cpts.full matrix should be between 1 and the number of data points, so is this a bug? For example,

> changepoint::cpt.mean(1:4, method="BinSeg", Q=3)@cpts.full
     [,1] [,2] [,3]
[1,]    0   NA   NA
[2,]    0    0   NA
[3,]    0    0    0

In this case I get all zeros, which is highly unexpected. I expected the first changepoint to be at 2, then the next two to be at 1 and 3.
Another example is

> changepoint::cpt.mean(1:8, method="BinSeg", Q=3)@cpts.full
     [,1] [,2] [,3]
[1,]    4   NA   NA
[2,]    4    2   NA
[3,]    4    2    0

The output above shows that the first two changepoints are as expected. However the third changepoint is zero whereas I expected it should be 6.

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

1 participant