Interpolation Basics
Given data points, we often want a function to fill gaps or make predictions. Interpolation finds a function passing exactly through every data point.
Given points, there is a unique interpolating polynomial of degree . Spline interpolation joins points with low-degree cubic pieces, matching smoothly.
| Approach | Goal | Data Assumption |
|---|---|---|
| Interpolation | Exact match | Data are exact |
| Curve Fitting | Minimize error | Data have noise |
A single high-degree polynomial can oscillate wildly (Runge's phenomenon). Splines avoid this by using piecewise low-deg curves.
Curve Fitting & Pitfalls
Curve fitting (regression) finds a function of a chosen form coming close to points without hitting them. Least-squares fitting minimizes the sum of squared vertical distances (residuals) from points to the curve.
Common pitfall: interpolating noisy data. Forcing a curve through every point when data have noise makes it chase random jitter (overfitting). Conversely, underfitting misses real features by using a too-simple curve. Match the method to the data's noise level.