7
$\begingroup$

I'm working with the changepoint R package in R and I understand everything but the penalty value. I know it changes the units of change in the mean, but I still don't know how to interpret it. How do I know how significant is significant? If I put in pen.value = .20 I get 8 changepoints, but if I put in pen.value = .30, I only get 5 changepoints. How do I know if those 3 changepoints are significant? How should I know which value to stick with? And how do you interpret these values?

$\endgroup$
9
$\begingroup$

If you are wanting to test "significance" then I suggest you use the Asymptotic penalty option, i.e. penalty='Asymptotic' and pen.value=0.05 for 95% confidence. This automatically sets the penalty based on the cost function you are using. I find that this works well for smaller data sets <1000 but not too small <100.

If you want to use the manual penalty option then the simplest rule is that a lower penalty value results in more changepoints identified. It is up to the user to decide what value is appropriate. Personally, I use an "elbow" plot to decide this. The elbow plot is constructed by varying the penalty value and plotting the number of changepoints identified against the penalty used. This will show a rapid decrease (getting rid of the changepoints induced by noise) and this will slow until it then goes to 0 changes. You want to choose a penalty that is after the rapid decrease but not too much after as you will start losing "true" changepoints.See picture for example

Apologies for the condition of the graph but I had to convert it from a PDF to jpeg to be able to upload it here.

$\endgroup$
0
$\begingroup$

This tutorial made by the original author of the package (and taking some time playing with the arguments of cpt.mean and looking through the doc) helped me understand how the function behaves.

http://members.cbio.mines-paristech.fr/~thocking/change-tutorial/RK-CptWorkshop.html

More tutorials here: https://github.com/tdhock/change-tutorial

I hope this helps.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.