mcp icon indicating copy to clipboard operation
mcp copied to clipboard

EnvCpt clarification

Open rkillick opened this issue 5 years ago • 2 comments

I was happy to see that EnvCpt is included in your comparison documentation, thanks for including it.

In a couple of places you write "I suspect EnvCpt uses cpt.np() in the background" for the change in mean parts. I wanted to clarify that it is using cpt.meanvar() from the changepoint package. You will see that the changepoint.np package is not a dependency and therefore it could not use this in the background.

This explains the differences you see between EnvCpt and the cpt.mean() function.

rkillick avatar Oct 27 '20 21:10 rkillick

Thanks for noting this! I'll update the doc.

Do you know why EnvCpt and cpt.meanvar() do not find the same change points in the example?

lindeloev avatar Oct 29 '20 08:10 lindeloev

Line 23 from the envcpt() function is:

meancpt.fit=cpt.meanvar(data,method='PELT',minseglen=minseglen,...) # default MBIC penalty

thus it will give the same answer. The default minseglen argument for envcpt is 5 though whereas for cpt,meanvar it is 2 so this may be why there are differences.

rkillick avatar Oct 29 '20 09:10 rkillick