bundles / scipy latest / scipy / interpolate / _fitpack2 / SmoothBivariateSpline
class
scipy.interpolate._fitpack2:SmoothBivariateSpline
Signature
class SmoothBivariateSpline ( x , y , z , w = None , bbox = [None, None, None, None] , kx = 3 , ky = 3 , s = None , eps = 1e-16 ) Members
Summary
Smooth bivariate spline approximation.
Parameters
x, y, z: array_like1-D sequences of data points (order is not important).
w: array_like, optionalPositive 1-D sequence of weights, of same length as
x,yandz.bbox: array_like, optionalSequence of length 4 specifying the boundary of the rectangular approximation domain. By default,
bbox=[min(x), max(x), min(y), max(y)].kx, ky: ints, optionalDegrees of the bivariate spline. Default is 3.
s: float, optionalPositive smoothing factor defined for estimation condition:
sum((w[i]*(z[i]-s(x[i], y[i])))**2, axis=0) <= sDefaults=len(w)which should be a good value if1/w[i]is an estimate of the standard deviation ofz[i].eps: float, optionalA threshold for determining the effective rank of an over-determined linear system of equations.
epsshould have a value within the open interval(0, 1), the default is 1e-16.
Notes
The length of x, y and z should be at least (kx+1) * (ky+1).
If the input data is such that input dimensions have incommensurate units and differ by many orders of magnitude, the interpolant may have numerical artifacts. Consider rescaling the data before interpolating.
This routine constructs spline knot vectors automatically via the FITPACK algorithm. The spline knots may be placed away from the data points. For some data sets, this routine may fail to construct an interpolating spline, even if one is requested via s=0 parameter. In such situations, it is recommended to use bisplrep / bisplev directly instead of this routine and, if needed, increase the values of nxest and nyest parameters of bisplrep.
For linear interpolation, LinearNDInterpolator is preferred. Consult the interp-transition-guide for discussion.
Array API Standard Support
SmoothBivariateSpline is not in-scope for support of Python Array API Standard compatible backends other than NumPy.
See dev-arrayapi for more information.
See also
- BivariateSpline
a base class for bivariate splines.
- LSQBivariateSpline
a bivariate spline using weighted least-squares fitting
- LSQSphereBivariateSpline
a bivariate spline in spherical coordinates using weighted least-squares fitting
- RectBivariateSpline
a bivariate spline over a rectangular mesh
- RectSphereBivariateSpline
a bivariate spline over a rectangular mesh on a sphere
- SmoothSphereBivariateSpline
a smoothing bivariate spline in spherical coordinates
- UnivariateSpline
a smooth univariate spline to fit a given set of data points.
- bisplev
a function to evaluate a bivariate B-spline and its derivatives
- bisplrep
a function to find a bivariate B-spline representation of a surface
Aliases
-
scipy.interpolate.SmoothBivariateSpline