6
$\begingroup$

I read a lot about polynomials and splines (and in case of the latter also lots of it derivates) and often some special cases were introduced to explain, mostly, why a spline is more suitable than a polynomial.

Nevertheless, at the moment I feel like it doesn't play a role in 99% of the cases whether I choose a spline or a polynomial. But still I have to make this decision. Is there an easy and simple advice how to proceed?

Or maybe a bit more general: Are there cases where polynomials are better than splines?

$\endgroup$
  • 1
    $\begingroup$ It depends on what you are trying to do of course, and what the underlying mechanism of the data generation is. Splines are piece-wise defined. Is your data piece-wise created? Splines can be heavily parameterized, $O(Mp_0), p_0 \sim 3, 4$ where $M$ is the number of pieces and $p_0$ is number of parameters per segment. Polynomials $O(x^p), p \gtrsim p_0$ only have $p+1$ parameters. If you're trying to learn/generalize w/splines, you'll need lots of data for robustness: $O(10Mp_0)$ vs. $O(10p)$ for polynomials. If you only need to interpolate/smooth/visualize 1 data set, then splines are fine. $\endgroup$ – Peter Leopold Jul 29 '19 at 13:27
  • $\begingroup$ At first thanks a lot! Maybe a dumb question but when do I know my data is piece-wise created? I have lots of separate data sets in my mind which I want to interpolate. The data is rather robust but I do not want to check each manually. All I can say up to now is that I like splines more but I feel save with polynomials here. $\endgroup$ – Ben Jul 29 '19 at 14:29
  • 3
    $\begingroup$ I wrote a long essay about this from a predictive point of view if you'd like to check it out: madrury.github.io/jekyll/update/statistics/2017/08/04/… $\endgroup$ – Matthew Drury Jul 29 '19 at 19:07
  • 1
    $\begingroup$ The trouble with polynomials is that you have no idea what the curve is doing between data points. There is no guarantee whatsoever that a position on the curve between the data points will be near a data point. $\endgroup$ – CElliott Aug 15 '19 at 15:46
7
$\begingroup$

My RMS book and course notes go into detail about this. Briefly, polynomials are too restrictive, allow a point in one part of the curve to too greatly influence the fit in other parts of the curve, and the fits are not as good as segmented polynomials (splines). Polynomials cannot well approximate threshold effects or logarithmic shapes.

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ Thank you, I will need some time to go through the details. Therefore in advance: There is no case where polynomials do better respectively are more advisable? $\endgroup$ – Ben Jul 29 '19 at 14:32
  • 1
    $\begingroup$ Polynomials can occasionally do better when there are so many ties in the data that you can't decide where to place the knots. $\endgroup$ – Frank Harrell Jul 30 '19 at 17:58
  • $\begingroup$ My assumption was totally the opposite. I thought, when there is a "clear line", it doesn't really matter whether polynomial or spline. But with lots of "overlapping" data points, almost not representing a structure, I thought a spline would be more useful? $\endgroup$ – Ben Jul 30 '19 at 19:05
  • $\begingroup$ Besides the difficulty knowing where to place knots in this special case, if you knew something about true extreme shape changes you could of course place a knot at every x-point of high frequency to allow for anything. $\endgroup$ – Frank Harrell Aug 2 '19 at 13:01

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.