Interpolation is a modeling choice.
All three methods pass through the data. What changes is what they assume between observations: one global polynomial, independent local lines, or smooth local cubics joined together.
Interpolation · CMNA Laboratory
Paste data into R, then compare a global polynomial, local line segments, and a natural cubic spline across exactly the same samples.
All three methods pass through the data. What changes is what they assume between observations: one global polynomial, independent local lines, or smooth local cubics joined together.
Bring your own data
The lab builds all three interpolants in R and lets you sweep across x to compare their values.
Preparing R…x and y| point | x | y |
|---|