I got a set of data points shown in the following figure:data points connected by straight segments

I need to fit this dataset to interpolate and extrapolate some new data points. What is the best choice of the fitting function for this set?

  • $\begingroup$ It depends, what is the purpose for the fit? If it is just to model in the domain $0\leq x\leq8$ then just use a high degree polynomial, $ax^5+bx^4+cx^3+dx^2+fx+g$ or something of that sort. If you want to limit the number of fitting parameters, maybe try a sinusoidal fit or 3rd degree polynomial. I can't think of anything perfect of the top of my head, though. If you have any context for where the data comes from maybe. $\endgroup$ – Robbie Jun 1 '18 at 19:40
  • $\begingroup$ en.wikipedia.org/wiki/Lagrange_polynomial $\endgroup$ – MalayTheDynamo Jun 1 '18 at 19:42
  • $\begingroup$ I see, Thanks for your comment.@RobbieVanDerzee $\endgroup$ – Sizhe Jun 1 '18 at 19:47
  • $\begingroup$ Using a high degree polynomial tends to induce oscillation between the data points. If you want a single function a third or fourth degree least squares fit seems reasonable. You can also use a spline fit. It will go exactly through the points but be smooth in between. Both are covered in any numerical analysis text. $\endgroup$ – Ross Millikan Jun 1 '18 at 21:32
  • $\begingroup$ If fitting a polynomial you will also want a regularizer of some sort because of what Ross writes. $\endgroup$ – mathreadler Jun 2 '18 at 8:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.