AI Glossary / Statistics and probability / Advanced
Interpolator
Definition
An interpolator is a predictive rule that reproduces the observations used to construct it. For training pairs (x_i, y_i), its fitted function satisfies f(x_i) = y_i, apart from numerical tolerances in computation. This entry follows the supplied NIST glossary's exact-fit meaning. Matching known points does not establish accuracy at new inputs.
What it means
Interpolation connects known input-output pairs while honoring their recorded values. It can provide intermediate estimates when direct evaluation is expensive, as in a deterministic computer simulation. The function constructed is often called an interpolant; the procedure or software object producing predictions may be called an interpolator.
There can be many different functions passing through the same observations. Their agreement at the recorded inputs does not force agreement between those inputs. Choosing an interpolator therefore involves assumptions about smoothness, shape, distance, and the behavior of the underlying process.
How it works
Start with input locations and associated values. Check ordering, missing values, units, and conflicting duplicates. For a single-valued function, the same input cannot simultaneously have two different exact outputs. Such records require a data or modeling decision before exact interpolation.
Piecewise linear interpolation joins adjacent points with straight segments. Cubic splines use polynomial pieces with smooth joins. Shape-preserving alternatives can reduce unwanted overshoot when the recorded values imply a particular local pattern.
Specify the permitted prediction domain and behavior outside it. Evaluating beyond the supported input range is extrapolation, even when the same software object performs the calculation. Numerical methods differ in whether they reject, extend, or otherwise handle such queries.
Three practical examples
- A simulation team constructs a fast surrogate from selected runs of a deterministic model. It checks additional simulator runs to assess accuracy between the construction points.
- A dashboard draws intermediate values between recorded measurements. It labels those values as interpolated estimates rather than additional observations.
- An engineering team uses a calibration table to estimate a response at an intermediate setting. It selects a method consistent with the expected shape and documents the valid setting range.
Think of it this way
An interpolator is a route drawn through specified landmarks. Passing through every landmark is a clear requirement, but many routes can satisfy it. The behavior between landmarks depends on how the route is drawn.
Worked example
Consider an invented deterministic simulator evaluated at three settings. At x = 0, the output is 2. At x = 2, the output is 6. At x = 4, the output is 4. We will compare several exact interpolators for these same observations.
The piecewise linear rule on the first interval is f(x) = 2 plus 2x. Its slope is (6 minus 2)/(2 minus 0) = 2. At x = 1, it predicts 4.
On the second interval, the slope is (4 minus 6)/(4 minus 2) = minus 1. The rule is f(x) = 8 minus x. At x = 3, it predicts 5. Both pieces meet at x = 2 with output 6, but their slopes differ there.
Now construct a quadratic p(x) = 2 plus 3.5x minus 0.75x squared. Substitution gives p(0) = 2, p(2) = 6, and p(4) = 4, so it also interpolates the three observations exactly.
At x = 1, however, p(1) = 4.75. At x = 3, p(3) = 5.75. The linear and quadratic interpolators have identical training error of zero while disagreeing at both intermediate settings.
For an even clearer demonstration, define q(x) = p(x) plus 0.1 times x times (x minus 2) times (x minus 4). The additional term vanishes at all three recorded inputs. Consequently, q also reproduces every observation exactly.
At x = 1, the added term is 0.1 times 1 times minus 1 times minus 3 = 0.3, giving q(1) = 5.05. At x = 3, the added term is minus 0.3, giving q(3) = 5.45. Exact fitting alone cannot choose among these predictions.
Suppose a new simulator run at x = 1 returns 4.6. The absolute prediction errors at this withheld location are 0.6 for the piecewise linear rule, 0.15 for the quadratic, and 0.45 for q. This one check favors the quadratic locally, but is not enough to establish superiority across the whole domain.
At x = 5, extending the final linear segment gives 3, whereas the quadratic gives 0.75. These are extrapolations beyond the recorded range from zero to four. They require additional justification; exact agreement inside the construction dataset does not validate either extension.
Finally, imagine adding another record at x = 2 with output 7 while retaining the original output 6. No single-valued exact interpolator can satisfy both. Averaging the values or modeling measurement noise changes the problem and should be documented.
Illustrative case study
Fictional company Willow Simulation wants a quick approximation to a costly deterministic planning model. Its analysts construct an interpolator from a set of selected settings and reserve additional simulator evaluations for checking predictions.
A smooth curve initially looks convincing, but the team finds discrepancies in a sparsely sampled region. It adds evaluations there and compares prediction errors again. The report separates exact reproduction of construction points from evidence at held-out settings. This scenario is fictional.
Common misconceptions and mistakes
Zero training error does not mean zero prediction error.
A smoother curve is not automatically more accurate or more appropriate for a discontinuous process.
An interpolator does not necessarily provide uncertainty estimates. Those require additional assumptions or a supporting model.
Exact interpolation of noisy measurements can reproduce noise as well as signal. Smoothing may better match the intended task.
Interpolation and extrapolation describe where predictions are made relative to available inputs; an interpolator's exact-fit property is a separate feature.
Business use
Use interpolation when honoring known values serves the decision and the input coverage is adequate. Verify predictions at independent locations, record the valid domain, and prevent unexamined extrapolation from becoming an operational assumption. Retain the original observations so estimated values remain distinguishable from measured or simulated results.
People also ask
Must an interpolator be linear?
No.
Can two interpolators fit the same data exactly?
Yes, while disagreeing elsewhere.
Does exact fit imply a causal relationship?
No.
Check your understanding
What does the linear rule predict at x = 1?
Answer: Four.
What does the quadratic predict there?
Answer: 4.75.
Why does q still fit the original points?
Answer: Its added term is zero at each recorded input.
Related terms
- Surrogate model
- Kriging
- Training error
- Smoothing
- Validation
- Interpolation
- extrapolation
- spline
Learn next
Study interpolation error, shape-preserving splines, noisy-data smoothing, and the design of independent validation points.
More in Statistics and probability
- Intensive sampling - Intensive sampling concentrates observation effort within a limited area or a narrow subject range.
- Intention-to-treat - Intention-to-treat is the principle of analyzing participants according to their original randomized assignment, including those who did not follow the...
- Inter-quartile range - The inter-quartile range, usually written interquartile range or IQR, is the difference between the upper and lower quartiles: IQR = Q3 minus Q1.
- Interrupted time series - Interrupted time series is a study design that examines repeated measurements before and after a defined intervention or event.
- Interval estimate - An interval estimate is a range used to express uncertainty about an unknown parameter, such as a population mean or a difference between groups.
- Interval predictor model - An interval predictor model, or IPM, maps an input to an interval of predicted outputs rather than a single number.
Sources
NIST statistical glossary, Interpolator: https://www.itl.nist.gov/div898/handbook/glossary.htm . SciPy, One-dimensional interpolation: https://docs.scipy.org/doc/scipy/tutorial/interpolate/1D.html . SciPy, PchipInterpolator: https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.PchipInterpolator.html . Functions, calculations, and company scenario are original illustrations.
Previous: Interpolation search Next: Interpretability