What does MinThreshold parameter explain in FindChangePts function (in matlab2017R)?
8 views (last 30 days)
Greg Dionne on 10 Aug 2017
Perhaps an example is in order.
Let's say you have a signal and you are looking for the most significant changes in mean. A natural question would be to ask "for an arbitrary set of changepoints how good is the total fit?" A very simple way to quantify the "goodness of fit" is to subtract off the mean of each region and look at the resulting error signal, adding up all the results. If you had a perfect fit, then you would have no total error at all. If you had a poor fit, the total error would be large.
So you might try all possible combinations of changepoints that would make the total error get as close to zero as possible. This works well in practice when you are searching over a fixed number of changepoints; but if you allow an arbitrary number of changepoints, then there is nothing to prevent you from breaking the signal into smaller and smaller segments until you have inserted a changepoint between every single sample! You would then always have a total error of zero.
To prevent this, the 'MinThreshold' parameter is used, which adds a fixed error (penalty) to the total error whenever a new changepoint is inserted. This gives you a meaningful way to compare the relative merit between solutions with a different number of changepoints. The penalty prevents a new changepoint from being introduced unless the total error has decreased by that minimum threshold.
As for tips on usage? This depends a lot on what you are using it for. 'MaxNumChanges' is good when you know roughly how many changes to expect. 'MinThreshold' is good when you have a good idea as to how much improvement each change should bring. For 'mean' and 'linear', often starting with the variance or standard deviation of the signal is a good starting point. Adjust it up or down until you get a reasonable set of changepoints. For signals that have a fair number of changes, but are scaled by different amounts, you can try using a penalty that is scaled by the root-mean squared level or other such metric.
That should hopefully get you started.