Shrinkage

shrinkage::Normalization

Shrinkage for Rust · rust · 0.3.0

pub enum Normalization

Training-column normalization applied before fitting.

Penalties act on normalized coefficients. Fitted coefficients and predictions use the original input scale. Except for Self::Auto, choices are independent of whether an intercept is fitted. Explicit centering without a fitted intercept can therefore induce a fixed original-scale intercept.

Norm and maximum-absolute-value scales use the columns after any requested centering. Standard deviations and ranges are invariant to centering. Computed zero scales are replaced with one.

Variants

Auto

Auto

Divide by population standard deviations, centering by column means only when fitting an intercept. This is the default fitting policy.

Center

Center

Subtract column means without scaling.

Custom

Custom { center: Centering, scale: Scaling }

Choose centering and scaling independently using LazyMatrix's options.

Use Scaling::Sd { df: 1 } for sample standard deviations, or combine Centering::Median with Scaling::QuantileRange for robust scaling.

center

center: Centering

How to center each column.

scale

scale: Scaling

How to scale each column after centering.

L1

L1

Divide by column L1 norms without centering.

L2

L2

Divide by column L2 norms without centering.

MaxAbs

MaxAbs

Divide by column maximum absolute values without centering.

MinMax

MinMax

Subtract column minima and divide by column ranges.

None

None

Use the raw design without centering or scaling.

Standardize

Standardize

Subtract column means and divide by population standard deviations.

Inherent implementation

impl Normalization

Implementation of Clone

impl Clone for Normalization

clone

fn clone(&self) -> Self

Implementation of Copy

impl Copy for Normalization

Implementation of Debug

impl Debug for Normalization

fmt

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

Implementation of Default

impl Default for Normalization

default

fn default() -> Self

Implementation of Eq

impl Eq for Normalization

Implementation of PartialEq

impl PartialEq for Normalization

eq

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

Implementation of StructuralPartialEq

impl StructuralPartialEq for Normalization

Implementation of Freeze

impl Freeze for Normalization

Implementation of RefUnwindSafe

impl RefUnwindSafe for Normalization

Implementation of Send

impl Send for Normalization

Implementation of Sync

impl Sync for Normalization

Implementation of Unpin

impl Unpin for Normalization

Implementation of UnsafeUnpin

impl UnsafeUnpin for Normalization

Implementation of UnwindSafe

impl UnwindSafe for Normalization

Implementation of Any

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

Implementation of Boilerplate

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

Implementation of Borrow

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

Implementation of BorrowMut

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

Implementation of ByRef

impl<T> ByRef<T> for T

Implementation of CastableFrom

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

Implementation of CastableFrom

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

Implementation of CloneToUninit

impl<T> CloneToUninit for T where T: Clone

Implementation of Equivalent

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

Implementation of Equivalent

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

Implementation of From

impl<T> From<T> for T

Implementation of Imply

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

Implementation of Into

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

Implementation of IntoEither

impl<T> IntoEither for T

Implementation of Pointable

impl<T> Pointable for T

Implementation of Read

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

Implementation of Same

impl<T> Same for T

Implementation of Scalar

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

Implementation of SupersetOf

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

Implementation of ToOwned

impl<T> ToOwned for T where T: Clone

Implementation 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>