lazymatrix::NormalizationParams
LazyMatrix for Rust · 0.8.1
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
rust
impl<F: lazymatrix::Scalar> NormalizationParams<F>centers
rust
pub fn centers(&self) -> Option<&[F]>Fitted column centers, if centering is active.
from_parts
rust
pub fn from_parts(
ncols: usize,
centers: Option<Vec<F>>,
scales: Option<Vec<F>>
) -> SelfConstruct 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>Recover the fitted centers and scales without copying.
ncols
rust
pub fn ncols(&self) -> usizeNumber of columns these parameters describe.
scales
rust
pub fn scales(&self) -> Option<&[F]>Fitted column scales, if scaling is active.
Implementation of Clone
rust
impl<F: core::clone::Clone> Clone for NormalizationParams<F>clone
rust
fn clone(&self) -> SelfImplementation of Debug
rust
impl<F: core::fmt::Debug> Debug for NormalizationParams<F>fmt
rust
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::ResultImplementation of PartialEq
rust
impl<F: core::cmp::PartialEq> PartialEq for NormalizationParams<F>eq
rust
fn eq(&self, other: &Self) -> boolImplementation of StructuralPartialEq
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 + FreezeImplementation of RefUnwindSafe
rust
impl<F> RefUnwindSafe for NormalizationParams<F> where Option<Vec<F>>: RefUnwindSafe + RefUnwindSafeImplementation of Send
rust
impl<F> Send for NormalizationParams<F> where Option<Vec<F>>: Send + SendImplementation of Sync
rust
impl<F> Sync for NormalizationParams<F> where Option<Vec<F>>: Sync + SyncImplementation of Unpin
rust
impl<F> Unpin for NormalizationParams<F> where Option<Vec<F>>: Unpin + UnpinImplementation of UnsafeUnpin
rust
impl<F> UnsafeUnpin for NormalizationParams<F> where Option<Vec<F>>: UnsafeUnpin + UnsafeUnpinImplementation of UnwindSafe
rust
impl<F> UnwindSafe for NormalizationParams<F> where Option<Vec<F>>: UnwindSafe + UnwindSafeImplementation of Any
rust
impl<T> Any for T where T: 'static + ?SizedImplementation of Borrow
rust
impl<T> Borrow<T> for T where T: ?SizedImplementation of BorrowMut
rust
impl<T> BorrowMut<T> for T where T: ?SizedImplementation of ByRef
rust
impl<T> ByRef<T> for TImplementation of CastableFrom
rust
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT where ST: ?Sized, DT: ?SizedImplementation of CastableFrom
rust
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT where ST: ?Sized, DT: ?SizedImplementation of CloneToUninit
rust
impl<T> CloneToUninit for T where T: CloneImplementation of From
rust
impl<T> From<T> for TImplementation of Imply
rust
impl<T, U> Imply<T> for U where T: ?Sized, U: ?SizedImplementation of Into
rust
impl<T, U> Into<U> for T where U: From<T>Implementation of IntoEither
rust
impl<T> IntoEither for TImplementation of Pointable
rust
impl<T> Pointable for TImplementation of Read
rust
impl<T> Read<Exclusive, BecauseExclusive> for T where T: ?SizedImplementation of Same
rust
impl<T> Same for TImplementation of Scalar
rust
impl<T> Scalar for T where T: 'static + Clone + PartialEq + DebugImplementation 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: CloneImplementation 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>
