Skip to content

lazymatrix::RowNormalization ​

LazyMatrix for Rust · 0.9.0

Source

rust
pub struct RowNormalization

A row normalization specification with independent Centering and Scaling choices.

The default performs no centering or scaling. Norms (L1, L2, and MaxAbs) are fitted to centered rows when centering is active. Standard deviations, ranges, and quantile ranges are translation-invariant. Use crate::RowNormalizedMatrix::new to fit each row independently.

Fields ​

center ​

rust
pub center: Centering

Source

How to center each row.

scale ​

rust
pub scale: Scaling

Source

How to scale each row.

Inherent implementation ​

Source

rust
impl RowNormalization

min_max ​

rust
pub const fn min_max() -> Self

Source

Subtract each row's minimum and divide by its range.

Finite, nonconstant rows span [0, 1] on the fitting data. Fitting replaces exact zero ranges with one, so finite constant rows become zero. Reusing parameters does not clip values to [0, 1].

new ​

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

Source

Build a specification from its centering and scaling choices.

robust ​

rust
pub fn robust() -> Self

Source

Subtract each row's median and divide by its interquartile range.

Quantiles use linear interpolation at (ncols - 1) * q. There is no standard-normal calibration. 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 row's mean and divide by its population standard deviation.

The variance uses ncols as its divisor. Fitting replaces exact zero scales with one, so finite constant rows become zero. For sample standard deviations, use Self::new(Centering::Mean, Scaling::Sd { df: 1 }).

Implementation of Clone ​

Source

rust
impl Clone for RowNormalization

clone ​

rust
fn clone(&self) -> Self

Source

Implementation of Copy ​

Source

rust
impl Copy for RowNormalization

Implementation of Debug ​

Source

rust
impl Debug for RowNormalization

fmt ​

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

Source

Implementation of Default ​

Source

rust
impl Default for RowNormalization

default ​

rust
fn default() -> Self

Source

Implementation of Eq ​

Source

rust
impl Eq for RowNormalization

Implementation of PartialEq ​

Source

rust
impl PartialEq for RowNormalization

eq ​

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

Source

Implementation of StructuralPartialEq ​

Source

rust
impl StructuralPartialEq for RowNormalization

Implementation of Freeze ​

rust
impl Freeze for RowNormalization

Implementation of RefUnwindSafe ​

rust
impl RefUnwindSafe for RowNormalization

Implementation of Send ​

rust
impl Send for RowNormalization

Implementation of Sync ​

rust
impl Sync for RowNormalization

Implementation of Unpin ​

rust
impl Unpin for RowNormalization

Implementation of UnsafeUnpin ​

rust
impl UnsafeUnpin for RowNormalization

Implementation of UnwindSafe ​

rust
impl UnwindSafe for RowNormalization

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.