pub enum Extrapolation {
Constant,
Linear,
Continue,
Periodic,
Error,
}Expand description
How to handle values outside the base knot interval [xmin, xmax].
Mirrors scikit-learn’s extrapolation parameter
(sklearn/preprocessing/_polynomial.py:707-709,:721). The default is
Extrapolation::Constant (sklearn’s __init__ default
extrapolation="constant", _polynomial.py:721).
Only Extrapolation::Constant is currently implemented. The remaining
sklearn modes (linear, continue, periodic, error) are NOT-STARTED
and surface a FerroError::InvalidParameter from the transform.
Variants§
Constant
Clamp out-of-range values to the boundary spline basis: for x < xmin
the basis is evaluated at xmin, for x > xmax at xmax. This is the
DEFAULT, matching sklearn extrapolation="constant"
(_polynomial.py:721 default; the constant clamp at :1059-1087 sets
the out-of-range row’s first/last degree basis columns to the boundary
basis values f_min[:degree] / f_max[-degree:] — equivalent to
clamping x to [xmin, xmax] before evaluating the basis, since the
columns beyond degree are zero at the boundary).
Linear
Linearly continue the boundary splines (sklearn "linear",
_polynomial.py:1089-1123). NOT-STARTED.
Continue
Pass scipy extrapolate=True (sklearn "continue"). NOT-STARTED.
Periodic
Periodic splines (sklearn "periodic"). NOT-STARTED.
Error
Raise on out-of-range input (sklearn "error",
_polynomial.py:1047-1058). NOT-STARTED.
Trait Implementations§
Source§impl Clone for Extrapolation
impl Clone for Extrapolation
Source§fn clone(&self) -> Extrapolation
fn clone(&self) -> Extrapolation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for Extrapolation
Source§impl Debug for Extrapolation
impl Debug for Extrapolation
Source§impl Default for Extrapolation
impl Default for Extrapolation
Source§fn default() -> Extrapolation
fn default() -> Extrapolation
impl Eq for Extrapolation
Source§impl PartialEq for Extrapolation
impl PartialEq for Extrapolation
Source§fn eq(&self, other: &Extrapolation) -> bool
fn eq(&self, other: &Extrapolation) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for Extrapolation
Auto Trait Implementations§
impl Freeze for Extrapolation
impl RefUnwindSafe for Extrapolation
impl Send for Extrapolation
impl Sync for Extrapolation
impl Unpin for Extrapolation
impl UnsafeUnpin for Extrapolation
impl UnwindSafe for Extrapolation
Blanket Implementations§
impl<T> Boilerplate for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.