How this calculation works
Interpolate scattered (x,y,value) observations through an augmented thin-plate RBF system and evaluate a surface. No stochastic variogram, kriging variance or one-dimensional node ordering.
f(x)=Σ a_i phi(||x-y_i||)+b0+b1*x+b2*y; phi(r)=r²log r; (K+lambda I)a+Pb=d, P^T a=0.A worked example
At the unit-square corners enter values 0,0,1,0 in cyclic order and use zero smoothing. The interpolant at (0.5,0.5) is 0.25, and all four entered corner values are reproduced.
Good to know
3–60 distinct planar nodes; affine polynomial augmentation; thin-plate kernel r²log r; nonnegative scalar smoothing 0–100; at most 100 query points; reject collinear nodes or unresolved rank.
Reference: SciPy RBFInterpolator documentation (opens in a new tab) ↗
Treat each row as a scattered observation
Each sample contains two spatial coordinates and one measured value. The rows need not follow a curve or form a grid. Their geometric positions determine the radial distances, so changing sample order must leave the predicted surface unchanged.
Use a common coordinate scale with meaningful units. A coordinate measured in thousands and another measured in fractions can dominate distances unequally. Standardizing or rescaling coordinates changes the interpolation model; it is not merely a formatting choice.
Compare this with the Ordinary kriging calculator with an entered variogram model. Interpolate scattered (x,y,value) observations through an augmented thin-plate RBF system and evaluate a surface. No stochastic variogram, kriging variance or one-dimensional node ordering.
Combine a radial kernel with an affine tail
The thin-plate kernel depends only on the distance from a sample. Its value at zero is defined by continuity as zero. A weighted sum of these radial terms describes local variation, while an affine polynomial provides the constant and planar part of the fitted surface.
The additional side condition makes the kernel coefficients compatible with that polynomial tail. Omitting the polynomial block or its constraint produces a different system. The affine tail is also why a genuine plane can be reproduced exactly from noncollinear observations.
Solve the augmented coefficient system
The kernel matrix contains every pairwise sample distance passed through r²log r. The polynomial matrix has columns 1, x and y. Together they form a larger linear system whose solution supplies both radial and affine coefficients.
At least three noncollinear sample positions are required for the affine block to have full column rank. Distinct points are required for exact interpolation. A numerical solver should expose an unresolved rank or conditioning problem rather than silently discard observations.
Use smoothing as a model choice
With smoothing zero, the fitted surface passes through the supplied observations to numerical precision. A positive smoothing parameter relaxes those equations by adding a diagonal term to the kernel block. The displayed sample residuals then become part of the intended fit.
The parameter is tied to coordinate and value scaling. The same numeric smoothing value does not describe the same strength after arbitrary unit changes. Comparing exact interpolation with one positive value is useful, but it does not automatically select a statistically optimal setting.
Read the symmetric square example
The corner data 0,0,1,0 form a simple nonplanar sample set. Symmetry of the centered kernel contributions makes the fitted center value one quarter. The individual corner predictions still match their entered values when smoothing is zero.
A second check uses a plane such as 1+2x+3y. The affine tail reproduces this plane at query points between the samples, providing a stronger check than agreement at the observations alone. These examples exercise different parts of the coefficient system.
Distinguish interpolation from kriging uncertainty
The output is a deterministic interpolated or smoothed surface from the chosen kernel and parameter. It does not include a covariance model, a variogram or a probabilistic prediction variance. Similar-looking contour maps can arise from models with very different interpretations.
An interpolation residual measures how well the numerical equations were solved. It is not an estimate of the unknown physical measurement error. Evaluating withheld observations or comparing known synthetic data can assess modeling behavior, but those checks require information beyond the fitted rows. The thin-plate kernel is defined as zero at zero distance, its continuous limiting value, rather than evaluating zero times log zero. The affine augmentation enforces three moment constraints on radial weights and reproduces every affine plane exactly when the system is resolved. With smoothing zero, sample residuals should vanish within solve tolerance. Positive smoothing permits residuals and changes the fitted surface; it does not provide a probability distribution for prediction error. Changing coordinate units also changes r²log r and the meaning of the smoothing parameter, so retain the coordinate convention when comparing fits across datasets.
Respect rank and extrapolation boundaries
Queries outside the sample hull can be evaluated algebraically, but their values depend heavily on the kernel and affine continuation. Passing exactly through known points does not establish reliability far from them. The query location should be visible relative to the observations.
Closely spaced samples can create a poorly conditioned system even when all rows are distinct. Scaling, duplicate checks and coefficient residuals help diagnose the numerical problem. Increasing the data cap would increase both matrix storage and solve cost, so the initial small-sample scope is intentional.
A few questions, answered
Is this ordinary kriging?
No. The calculation uses a deterministic thin-plate kernel system. Ordinary kriging requires a stochastic covariance or variogram model and has a different uncertainty interpretation.
Does zero smoothing pass through every point?
For distinct noncollinear observations and a resolved system, yes, up to numerical rounding. Positive smoothing deliberately permits fitted sample residuals.
Why are collinear nodes rejected?
The affine columns 1, x and y become linearly dependent when all sample positions lie on one line, so the specified two-dimensional system loses its required rank.
Can I trust values outside the sample hull?
Such queries are extrapolations. The system can return numbers there, but node residuals provide no guarantee about their physical accuracy.