Search code examples
algorithmmathinterpolationregression

Fastest way to fit a parabola to set of points?


Given a set of points, what's the fastest way to fit a parabola to them? Is it doing the least squares calculation or is there an iterative way?

Thanks

Edit: I think gradient descent is the way to go. The least squares calculation would have been a little bit more taxing (having to do qr decomposition or something to keep things stable).


Solution

  • If the points have no error associated, you may interpolate by three points. Otherwise least squares or any equivalent formulation is the way to go.