I'm tring to use an algorithm for finding and ranking continuing decreases in my data. The base condition:
The breakpoint location (blue arrow) is unknown but bigger than x (can be on t= 4 or in t=9 but can't be smaller than t=2 for example )
Part B (after the breakpoint) has smaller AVG than Part A (before the breakpoint) significantly given the data variance.
The larger the ratio between part A and part B, the higher the score.
Need suggestions for the best practice.
UPDATE: I spit the X axis to last 2 days and 10 days before those days. and used SUM((x_last_2_days -x_avg last_10_days)/std_over_all )
So I got the following patterns
How to ignore the bad pattern or improve the algo.





