DataDog/piecewise

[FEATURE] connected segments

Opened this issue · 2 comments

Is it possible to force each of the segments to be connected to one another (i.e., at each breakpoint, the regression lines intersect with one another)?

Unfortunately, I don't believe the current greedy merging algorithm would give good results with this added constraint. The solution would have probably have to be a completely new algorithm. I'd be happy to hear suggestions / accept pull requests!

I am finding that this algorithm does not work for connected segments as shown
Figure_1
I had hoped that it would find 5 distinct segments.
I have tried reducing the min-stop_frac but it does not seem to have any effect. Any thoughts?