pub enum CenterStrategy {
Auto(Box<CenterStrategy>),
DuchonSpectral {
knots: Box<CenterStrategy>,
basis: DuchonSpectralBasis,
},
UserProvided(Array2<f64>),
EqualMass {
num_centers: usize,
},
EqualMassCovarRepresentative {
num_centers: usize,
},
FarthestPoint {
num_centers: usize,
},
KMeans {
num_centers: usize,
max_iter: usize,
},
UniformGrid {
points_per_dim: usize,
},
}Expand description
Spatial center selection strategy.
num_centers is the exact number of knot/center rows selected by the
strategy. Polynomial nullspace columns are added separately by each basis
builder and must never be folded into this count.
Variants§
Auto(Box<CenterStrategy>)
DuchonSpectral
Select a potentially rich knot cloud, then retain an explicit low-dimensional spectral subspace of its kernel. The knot strategy and retained rank are independent by construction.
UserProvided(Array2<f64>)
EqualMass
Joint multidimensional equal-mass partitioning in the full smooth space.
EqualMassCovarRepresentative
Covariate-representative equal-mass partitioning along one selected axis.
FarthestPoint
KMeans
UniformGrid
Implementations§
Source§impl CenterStrategy
impl CenterStrategy
Sourcepub fn planned_num_centers(&self, d: usize) -> usize
pub fn planned_num_centers(&self, d: usize) -> usize
The number of centers this strategy will select, computed from the
strategy alone (no data pass). d is the smooth’s covariate
dimensionality, needed only by UniformGrid whose count is
points_per_dim^d. Adaptive-fit provenance consults this before freeze,
because the frozen center matrix can contain periodic image expansion
and therefore is not the requested resolution for the next refit.
Trait Implementations§
Source§impl Clone for CenterStrategy
impl Clone for CenterStrategy
Source§fn clone(&self) -> CenterStrategy
fn clone(&self) -> CenterStrategy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CenterStrategy
impl Debug for CenterStrategy
Source§impl<'de> Deserialize<'de> for CenterStrategy
impl<'de> Deserialize<'de> for CenterStrategy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for CenterStrategy
impl RefUnwindSafe for CenterStrategy
impl Send for CenterStrategy
impl Sync for CenterStrategy
impl Unpin for CenterStrategy
impl UnsafeUnpin for CenterStrategy
impl UnwindSafe for CenterStrategy
Blanket Implementations§
impl<T> Allocation 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
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.