Skip to content

lazymatrix::ColumnNormalization ​

LazyMatrix for Rust · 0.9.0

Source

rust
pub struct ColumnNormalization

A 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 ​

rust
pub center: Centering

Source

scale ​

rust
pub scale: Scaling

Source

Inherent implementation ​

Source

rust
impl ColumnNormalization

min_max ​

rust
pub const fn min_max() -> Self

Source

Subtract 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 ​

rust
pub const fn new(center: Centering, scale: Scaling) -> Self

Source

Build a specification from its two axes.

robust ​

rust
pub fn robust() -> Self

Source

Subtract 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 ​

rust
pub const fn standardize() -> Self

Source

Subtract 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 ​

Source

rust
impl Clone for ColumnNormalization

clone ​

rust
fn clone(&self) -> Self

Source

Implementation of Copy ​

Source

rust
impl Copy for ColumnNormalization

Implementation of Debug ​

Source

rust
impl Debug for ColumnNormalization

fmt ​

rust
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result

Source

Implementation of Default ​

Source

rust
impl Default for ColumnNormalization

default ​

rust
fn default() -> Self

Source

Implementation of Eq ​

Source

rust
impl Eq for ColumnNormalization

Implementation of PartialEq ​

Source

rust
impl PartialEq for ColumnNormalization

eq ​

rust
fn eq(&self, other: &Self) -> bool

Source

Implementation of StructuralPartialEq ​

Source

rust
impl StructuralPartialEq for ColumnNormalization

Implementation of Freeze ​

rust
impl Freeze for ColumnNormalization

Implementation of RefUnwindSafe ​

rust
impl RefUnwindSafe for ColumnNormalization

Implementation of Send ​

rust
impl Send for ColumnNormalization

Implementation of Sync ​

rust
impl Sync for ColumnNormalization

Implementation of Unpin ​

rust
impl Unpin for ColumnNormalization

Implementation of UnsafeUnpin ​

rust
impl UnsafeUnpin for ColumnNormalization

Implementation of UnwindSafe ​

rust
impl UnwindSafe for ColumnNormalization

Implementation of Any ​

rust
impl<T> Any for T where T: 'static + ?Sized

Implementation of Boilerplate ​

rust
impl<T> Boilerplate for T where T: Copy + Send + Sync + Debug + PartialEq + 'static

Implementation of Borrow ​

rust
impl<T> Borrow<T> for T where T: ?Sized

Implementation of BorrowMut ​

rust
impl<T> BorrowMut<T> for T where T: ?Sized

Implementation of ByRef ​

rust
impl<T> ByRef<T> for T

Implementation of CastableFrom ​

rust
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT where ST: ?Sized, DT: ?Sized

Implementation of CastableFrom ​

rust
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT where ST: ?Sized, DT: ?Sized

Implementation of CloneToUninit ​

rust
impl<T> CloneToUninit for T where T: Clone

Implementation of Equivalent ​

rust
impl<Q, K> Equivalent<K> for Q where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized

Implementation of Equivalent ​

rust
impl<Q, K> Equivalent<K> for Q where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized

Implementation of From ​

rust
impl<T> From<T> for T

Implementation of Imply ​

rust
impl<T, U> Imply<T> for U where T: ?Sized, U: ?Sized

Implementation of Into ​

rust
impl<T, U> Into<U> for T where U: From<T>

Implementation of IntoEither ​

rust
impl<T> IntoEither for T

Implementation of Pointable ​

rust
impl<T> Pointable for T

Implementation of Read ​

rust
impl<T> Read<Exclusive, BecauseExclusive> for T where T: ?Sized

Implementation of Same ​

rust
impl<T> Same for T

Implementation of Scalar ​

rust
impl<T> Scalar for T where T: 'static + Clone + PartialEq + Debug

Implementation of SupersetOf ​

rust
impl<SS, SP> SupersetOf<SS> for SP where SS: SubsetOf<SP>

Implementation of ToOwned ​

rust
impl<T> ToOwned for T where T: Clone

Implementation of TryFrom ​

rust
impl<T, U> TryFrom<U> for T where U: Into<T>

Implementation of TryInto ​

rust
impl<T, U> TryInto<U> for T where U: TryFrom<T>

Released under the MIT and Apache 2.0 licenses.