rkillick / changepoint

A place for the development version of the changepoint package on CRAN.
125 stars 33 forks source link

CROPS automation #24

Open rkillick opened 5 years ago

rkillick commented 5 years ago

Add functionality to CROPS that allows someone to use "Inf" as an upper limit so that c(0,Inf) can be specified such that the whole range of segmentations is calculated.

Another option that would be nice is if someone could (additionally?) specify Q as the number of changepoints they are interested in and then CROPS would continue, trying an increasing range of penalties until the Q or (Q-1,Q+1) are identified. Recall that there is no guarantee that there will be a solution with Q changes exactly.

Jiangchao3 commented 3 years ago

hello killick

Thanks for your development of the package. I am working with it. As you mentioned above, the c(0,Inf) can be specified for the CROPS method. I had a try but it didn't work. this is my code:

out1=cpt.mean(x, pen.value = c(0,Inf),penalty = "CROPS",method = "PELT")

I want to know how to call the c(0,Inf) correctly?

Thanks very much. Jiangchao

Jiangchao3 commented 3 years ago

In addition,

When I use the diagnostic plot,:

plot(out,diagnostic=TRUE)

I find it is "Difference in Test Stastics" in the Y axis using version 2.2.2, while it is "Penatly Value" in the Y axis using lastest version 2.3.1. I have read several articles you recommended, https://www.sciencedirect.com/science/article/abs/pii/S0165168405000381?via%3Dihub, and https://www.tandfonline.com/doi/full/10.1080/10618600.2015.1116445. The Y axis is "Cost" in these"elbow-plot". I am confused about the difference between the diagnostic plot in this package and the "elbow-plot" in these articles.

I think the diagnostic plot in the package shows the relationship between the penatly value and the change point not between the Cost and the change point. Is this correct?

Thanks for you patiences.

Jiangchao

rkillick commented 3 years ago

@Jiangchao3 - Thanks for commenting on this. This issue is open at the moment and so the functionality of typing c(0,Inf) doesn't exist yet. In reality you can put a large number in and providing it generates 0 changepoints in the data then this is equivalent to c(0,Inf) it is just that the "Inf" specification would be easier for users to input.

rkillick commented 3 years ago

@Jiangchao3 You are correct that the Y axis label has changed in this version. The values plotted are the same but another user queried the meaning of the previous axis label and so this has been clarified in this version. Thank you for your thorough investigation of the package. If you spot anything else, please can you raise a new issue.

Jiangchao3 commented 3 years ago

Ok, thanks for your reply, now I get it!