Skip to content

lazymatrix::NormalizationParams ​

LazyMatrix for Rust · 0.8.1

Source

rust
pub struct NormalizationParams<F = f64>

Fitted column normalization, reusable on matrices with the same column count.

Present scales are nonzero. Computed normalization replaces exact zero scales with one before constructing these parameters. Explicit parameters preserve negative scales and nonfinite values.

Inherent implementation ​

Source

rust
impl<F: lazymatrix::Scalar> NormalizationParams<F>

centers ​

rust
pub fn centers(&self) -> Option<&[F]>

Source

Fitted column centers, if centering is active.

from_parts ​

rust
pub fn from_parts(
    ncols: usize,
    centers: Option<Vec<F>>,
    scales: Option<Vec<F>>
) -> Self

Source

Construct validated explicit parameters.

Panics ​

Panics if either vector has a different length from ncols, or if a scale is exact positive or negative zero.

into_parts ​

rust
pub fn into_parts(self) -> NormalizationStats<F>

Source

Recover the fitted centers and scales without copying.

ncols ​

rust
pub fn ncols(&self) -> usize

Source

Number of columns these parameters describe.

scales ​

rust
pub fn scales(&self) -> Option<&[F]>

Source

Fitted column scales, if scaling is active.

Implementation of Clone ​

Source

rust
impl<F: core::clone::Clone> Clone for NormalizationParams<F>

clone ​

rust
fn clone(&self) -> Self

Source

Implementation of Debug ​

Source

rust
impl<F: core::fmt::Debug> Debug for NormalizationParams<F>

fmt ​

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

Source

Implementation of PartialEq ​

Source

rust
impl<F: core::cmp::PartialEq> PartialEq for NormalizationParams<F>

eq ​

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

Source

Implementation of StructuralPartialEq ​

Source

rust
impl<F: core::cmp::PartialEq> StructuralPartialEq for NormalizationParams<F>

Implementation of Freeze ​

rust
impl<F> Freeze for NormalizationParams<F> where Option<Vec<F>>: Freeze + Freeze

Implementation of RefUnwindSafe ​

rust
impl<F> RefUnwindSafe for NormalizationParams<F> where Option<Vec<F>>: RefUnwindSafe + RefUnwindSafe

Implementation of Send ​

rust
impl<F> Send for NormalizationParams<F> where Option<Vec<F>>: Send + Send

Implementation of Sync ​

rust
impl<F> Sync for NormalizationParams<F> where Option<Vec<F>>: Sync + Sync

Implementation of Unpin ​

rust
impl<F> Unpin for NormalizationParams<F> where Option<Vec<F>>: Unpin + Unpin

Implementation of UnsafeUnpin ​

rust
impl<F> UnsafeUnpin for NormalizationParams<F> where Option<Vec<F>>: UnsafeUnpin + UnsafeUnpin

Implementation of UnwindSafe ​

rust
impl<F> UnwindSafe for NormalizationParams<F> where Option<Vec<F>>: UnwindSafe + UnwindSafe

Implementation of Any ​

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

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