1

I'm attempting to implement a piecewise harmonic curve fit, and while I'm able to fit arbitrary curves quite well, I'm not sure how to robustly select a point to break at. With my very clean synthetic data, it seems "obvious" that I can break at about point 35 (), but I don't know how to robustly program a method to distinguish

  • no significant deviation in the fit region (the length of the piece should be extended) from
  • where the crook of the 'hockey stick' is (so I can break there)

Additionally, if I fit varying amounts of the curve, my error function can begin to break sooner or later. Below, blue is optimized over 25 points, green over 40, and red over 50. If I fit too much into another piece, everything just goes to hell, but if I don't fit enough then I seem to get an "early break" right outside of the fit region (bottom graph, at point 25)

How can I determine the location of the discontinuity, even in the presence of a significant amount of noise?

Illustration of fit described above

Nick T
  • 1,763

0 Answers0