lazymatrix::ColumnNormalization
LazyMatrix for Rust · 0.9.0
pub struct ColumnNormalizationA column normalization specification: an independent Centering and Scaling choice.
Use Self::standardize, Self::min_max, or Self::robust for common recipes, or Self::new for a custom combination. The default performs no centering or scaling.
Non-translation-invariant scales are computed from centered columns (see ColumnStats::col_l1_centered, ColumnStats::col_l2_centered, and ColumnStats::col_maxabs_centered.
Fields
center
pub center: Centeringscale
pub scale: ScalingInherent implementation
impl ColumnNormalizationmin_max
pub const fn min_max() -> SelfSubtract each column's minimum and divide by its range.
Finite, nonconstant columns span [0, 1] on the fitting data. Fitting replaces exact zero ranges with one, so constant columns become zero. Reusing the fitted parameters does not clip new observations to [0, 1].
new
pub const fn new(center: Centering, scale: Scaling) -> SelfBuild a specification from its two axes.
robust
pub fn robust() -> SelfSubtract each column's median and divide by its interquartile range.
The range uses the 25th and 75th percentiles with linear interpolation at (nrows - 1) * q. It has no standard-normal calibration and does not target unit variance. Fitting replaces exact zero ranges with one. Use Self::new with Scaling::QuantileRange for custom bounds.
standardize
pub const fn standardize() -> SelfSubtract each column's mean and divide by its population standard deviation.
The variance uses nrows as its divisor. Fitting with crate::LazyMatrix::new replaces exact zero standard deviations with one, so constant columns become zero. For sample standard deviations, use ColumnNormalization::new(Centering::Mean, Scaling::Sd { df: 1 }).
Implementation of Clone
impl Clone for ColumnNormalizationclone
fn clone(&self) -> SelfImplementation of Copy
impl Copy for ColumnNormalizationImplementation of Debug
impl Debug for ColumnNormalizationfmt
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::ResultImplementation of Default
impl Default for ColumnNormalizationdefault
fn default() -> SelfImplementation of Eq
impl Eq for ColumnNormalizationImplementation of PartialEq
impl PartialEq for ColumnNormalizationeq
fn eq(&self, other: &Self) -> boolImplementation of StructuralPartialEq
impl StructuralPartialEq for ColumnNormalizationImplementation of Freeze
impl Freeze for ColumnNormalizationImplementation of RefUnwindSafe
impl RefUnwindSafe for ColumnNormalizationImplementation of Send
impl Send for ColumnNormalizationImplementation of Sync
impl Sync for ColumnNormalizationImplementation of Unpin
impl Unpin for ColumnNormalizationImplementation of UnsafeUnpin
impl UnsafeUnpin for ColumnNormalizationImplementation of UnwindSafe
impl UnwindSafe for ColumnNormalizationImplementation of Any
impl<T> Any for T where T: 'static + ?SizedImplementation of Boilerplate
impl<T> Boilerplate for T where T: Copy + Send + Sync + Debug + PartialEq + 'staticImplementation of Borrow
impl<T> Borrow<T> for T where T: ?SizedImplementation of BorrowMut
impl<T> BorrowMut<T> for T where T: ?SizedImplementation of ByRef
impl<T> ByRef<T> for TImplementation of CastableFrom
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT where ST: ?Sized, DT: ?SizedImplementation of CastableFrom
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT where ST: ?Sized, DT: ?SizedImplementation of CloneToUninit
impl<T> CloneToUninit for T where T: CloneImplementation of Equivalent
impl<Q, K> Equivalent<K> for Q where Q: Eq + ?Sized, K: Borrow<Q> + ?SizedImplementation of Equivalent
impl<Q, K> Equivalent<K> for Q where Q: Eq + ?Sized, K: Borrow<Q> + ?SizedImplementation of From
impl<T> From<T> for TImplementation of Imply
impl<T, U> Imply<T> for U where T: ?Sized, U: ?SizedImplementation of Into
impl<T, U> Into<U> for T where U: From<T>Implementation of IntoEither
impl<T> IntoEither for TImplementation of Pointable
impl<T> Pointable for TImplementation of Read
impl<T> Read<Exclusive, BecauseExclusive> for T where T: ?SizedImplementation of Same
impl<T> Same for TImplementation of Scalar
impl<T> Scalar for T where T: 'static + Clone + PartialEq + DebugImplementation of SupersetOf
impl<SS, SP> SupersetOf<SS> for SP where SS: SubsetOf<SP>Implementation of ToOwned
impl<T> ToOwned for T where T: CloneImplementation of TryFrom
impl<T, U> TryFrom<U> for T where U: Into<T>Implementation of TryInto
impl<T, U> TryInto<U> for T where U: TryFrom<T>
