Given a data set, I want to divide it in two different sets if I see that part of the data misbehaves. For example, in the figure you can clearly see that something is happening before the vertical red line. So I was able to determine the lines by using the Jenks natural breaks optimization by using 2 groups. The problem is that if the data is better behaved (say there are no such big jumps and the data is smoother, like an exponential function), Jenks algorithm still divides it in two. So I have two questions:
- Is there a way to automatically (no thresholds, no parameters set by the analyst) identify if there's an anomaly that would require the use of Jenks algorithm?
- Is there a way to quantify the anomaly? I would like to have a factor between 0 to 1, the latter corresponding to a smooth function and 0 corresponding to a sort of Heaviside anomaly behavior. Of course the figure shows something in between, so it would be closer to 0, say 0.3.