RadialBasisFunctionInterpolator¶
Aliases:
petres.interpolators.RBFInterpolator
- class petres.interpolators.RadialBasisFunctionInterpolator[source]¶
Bases:
BaseInterpolatorInterpolate scalar values with SciPy radial basis functions.
This interpolator wraps
scipy.interpolate.RBFInterpolatorand validates input shapes and hyperparameters before fitting.- Parameters:
kernel ({'linear', 'thin_plate_spline', 'cubic', 'quintic', 'multiquadric', 'inverse_multiquadric', 'inverse_quadratic', 'gaussian'}, default 'thin_plate_spline') – Radial kernel passed to
scipy.interpolate.RBFInterpolator.epsilon (float or None, optional) – Shape parameter for some kernels. Must be > 0 when provided.
smoothing (float, default 0.0) – Non-negative smoothing factor.
0.0yields exact interpolation.neighbors (int or None, optional) – If provided, use only the k nearest samples per query; must be > 0.
degree (int or None, optional) – Degree of appended polynomial term.
Noneuses SciPy defaults.dtype (numpy.typing.DTypeLike, default numpy.float64) – Storage dtype for cached arrays and outputs.
Notes
The implementation expects scalar targets with shape
(n_samples,).Initialize interpolation hyperparameters.
- Raises:
ValueError – If
epsilonis not positive,smoothingis negative,neighborsis non-positive, ordegreeis negative.
- __init__(kernel='thin_plate_spline', epsilon=None, smoothing=0.0, neighbors=None, degree=None, dtype=<class 'numpy.float64'>)[source]¶
Initialize interpolation hyperparameters.
- Raises:
ValueError – If
epsilonis not positive,smoothingis negative,neighborsis non-positive, ordegreeis negative.