![]() |
会搭讪的卤蛋 · 石室文庙——这所低调的千年古校风骨依旧!_办学· 4 月前 · |
![]() |
火星上的饼干 · 依托工业园区,聚焦重点项目,发挥产业优势努力 ...· 4 月前 · |
![]() |
性感的黑框眼镜 · Sun Temple, Konârak - ...· 5 月前 · |
![]() |
高大的春卷 · 【Craftopia创世理想乡】弓箭手装备 ...· 6 月前 · |
![]() |
不爱学习的葡萄 · JavaScript Notes and ...· 6 月前 · |
scipy |
https://docs.cupy.dev/en/stable/reference/generated/cupyx.scipy.interpolate.RBFInterpolator.html |
![]() |
灰常酷的显示器
3 月前 |
cupy.linalg
)
cupy.random
)
cupy.testing
)
cupyx.scipy.fftpack
)
cupyx.scipy.interpolate
)
cupyx.scipy.linalg
)
cupyx.scipy.ndimage
)
cupyx.scipy.signal
)
cupyx.scipy.signal.windows
)
cupyx.scipy.sparse
)
cupyx.scipy.sparse.linalg
)
cupyx.scipy.sparse.csgraph
)
cupyx.scipy.spatial
)
cupyx.scipy.spatial.distance
)
cupyx.scipy.special
)
cupyx.scipy.stats
)
Radial basis function (RBF) interpolation in N dimensions.
y ( ( P , N ) array_like ) – Data point coordinates.
d ( ( P , ... ) array_like ) – Data values at y .
neighbors ( int , optional ) – If specified, the value of the interpolant at each evaluation point will be computed using only this many nearest data points. All the data points are used by default.
smoothing ( float or ( P , ) array_like , optional ) – Smoothing parameter. The interpolant perfectly fits the data when this is set to 0. For large values, the interpolant approaches a least squares fit of a polynomial with the specified degree. Default is 0.
kernel ( str , optional ) –
Type of RBF. This should be one of
’linear’ :
-r
’thin_plate_spline’ :
r**2
*
log(r)
’cubic’ :
r**3
’quintic’ :
-r**5
’multiquadric’ :
-sqrt(1
+
r**2)
’inverse_multiquadric’ :
1/sqrt(1
+
r**2)
’inverse_quadratic’ :
1/(1
+
r**2)
’gaussian’ :
exp(-r**2)
Default is ‘thin_plate_spline’.
epsilon ( float , optional ) – Shape parameter that scales the input to the RBF. If kernel is ‘linear’, ‘thin_plate_spline’, ‘cubic’, or ‘quintic’, this defaults to 1 and can be ignored because it has the same effect as scaling the smoothing parameter. Otherwise, this must be specified.
degree ( int , optional ) –
Degree of the added polynomial. For some RBFs the interpolant may not be well-posed if the polynomial degree is too small. Those RBFs and their corresponding minimum degrees are
’multiquadric’ : 0
’linear’ : 0
’thin_plate_spline’ : 1
’cubic’ : 1
’quintic’ : 2
The default value is the minimum degree for kernel or 0 if there is no minimum degree. Set this to -1 for no added polynomial.
Notes
An RBF is a scalar valued function in N-dimensional space whose value at \(x\) can be expressed in terms of \(r=||x - c||\) , where \(c\) is the center of the RBF.
An RBF interpolant for the vector of data values \(d\) , which are from locations \(y\) , is a linear combination of RBFs centered at \(y\) plus a polynomial with a specified degree. The RBF interpolant is written \[f(x) = K(x, y) a + P(x) b,\]
where \(K(x, y)\) is a matrix of RBFs with centers at \(y\) evaluated at the points \(x\) , and \(P(x)\) is a matrix of monomials, which span polynomials with the specified degree, evaluated at \(x\) . The coefficients \(a\) and \(b\) are the solution to the linear equations
\[(K(y, y) + \lambda I) a + P(y) b = d\] \[P(y)^T a = 0,\]where \(\lambda\) is a non-negative smoothing parameter that controls how well we want to fit the data. The data are fit exactly when the smoothing parameter is 0.
The above system is uniquely solvable if the following requirements are
\(P(y)\) must have full column rank. \(P(y)\) always has full column rank when degree is -1 or 0. When degree is 1, \(P(y)\) has full column rank if the data point locations are not all collinear (N=2), coplanar (N=3), etc.
If kernel is ‘multiquadric’, ‘linear’, ‘thin_plate_spline’, ‘cubic’, or ‘quintic’, then degree must not be lower than the minimum value listed above.
If smoothing is 0, then each data point location must be distinct.
When using an RBF that is not scale invariant (‘multiquadric’, ‘inverse_multiquadric’, ‘inverse_quadratic’, or ‘gaussian’), an appropriate shape parameter must be chosen (e.g., through cross validation). Smaller values for the shape parameter correspond to wider RBFs. The problem can become ill-conditioned or singular when the shape parameter is too small.
The memory required to solve for the RBF interpolation coefficients increases quadratically with the number of data points, which can become impractical when interpolating more than about a thousand data points. To overcome memory limitations for large interpolation problems, the neighbors argument can be specified to compute an RBF interpolant for each evaluation point using only the nearest data points.
See also
scipy.interpolate.RBFInterpolator
Methods
__call__ ( x ) [source] #Evaluate the interpolant at x .
x ( ( Q , N ) array_like ) – Evaluation point coordinates.
Values of the interpolant at x .
(Q, …) ndarray
![]() |
会搭讪的卤蛋 · 石室文庙——这所低调的千年古校风骨依旧!_办学 4 月前 |