lazymatrix::RowNormalizationParams
LazyMatrix for Rust · 0.9.0
pub struct RowNormalizationParams<F = f64>Fitted normalization for particular rows of a matrix.
Present vectors have one entry per row, and scales are nonzero. Explicit parameters preserve negative scales and nonfinite values. Parameters may be reapplied to matrices with the same row count, but they describe the fitted rows, not a transformation learned across samples. Fit new samples' row parameters independently.
Inherent implementation
impl<F: lazymatrix::Scalar> RowNormalizationParams<F>centers
pub fn centers(&self) -> Option<&[F]>Fitted row centers, if centering is active.
from_parts
pub fn from_parts(
nrows: usize,
centers: Option<Vec<F>>,
scales: Option<Vec<F>>
) -> SelfConstruct validated explicit parameters without changing their values.
Panics
Panics if either vector has a different length from nrows, or if a scale is exact positive or negative zero. A zero-scale panic reports the zero-based row index.
into_parts
pub fn into_parts(self) -> RowNormalizationStats<F>Recover the fitted centers and scales without copying.
nrows
pub fn nrows(&self) -> usizeNumber of rows these parameters describe.
scales
pub fn scales(&self) -> Option<&[F]>Fitted row scales, if scaling is active.
Implementation of Clone
impl<F: core::clone::Clone> Clone for RowNormalizationParams<F>clone
fn clone(&self) -> SelfImplementation of Debug
impl<F: core::fmt::Debug> Debug for RowNormalizationParams<F>fmt
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::ResultImplementation of PartialEq
impl<F: core::cmp::PartialEq> PartialEq for RowNormalizationParams<F>eq
fn eq(&self, other: &Self) -> boolImplementation of StructuralPartialEq
impl<F: core::cmp::PartialEq> StructuralPartialEq for RowNormalizationParams<F>Implementation of Freeze
impl<F> Freeze for RowNormalizationParams<F> where Option<Vec<F>>: Freeze + FreezeImplementation of RefUnwindSafe
impl<F> RefUnwindSafe for RowNormalizationParams<F> where Option<Vec<F>>: RefUnwindSafe + RefUnwindSafeImplementation of Send
impl<F> Send for RowNormalizationParams<F> where Option<Vec<F>>: Send + SendImplementation of Sync
impl<F> Sync for RowNormalizationParams<F> where Option<Vec<F>>: Sync + SyncImplementation of Unpin
impl<F> Unpin for RowNormalizationParams<F> where Option<Vec<F>>: Unpin + UnpinImplementation of UnsafeUnpin
impl<F> UnsafeUnpin for RowNormalizationParams<F> where Option<Vec<F>>: UnsafeUnpin + UnsafeUnpinImplementation of UnwindSafe
impl<F> UnwindSafe for RowNormalizationParams<F> where Option<Vec<F>>: UnwindSafe + UnwindSafeImplementation of Any
impl<T> Any for T where T: 'static + ?SizedImplementation of Borrow
impl<T> Borrow<T> for T where T: ?SizedImplementation of BorrowMut
impl<T> BorrowMut<T> for T where T: ?SizedImplementation of ByRef
impl<T> ByRef<T> for TImplementation of CastableFrom
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT where ST: ?Sized, DT: ?SizedImplementation of CastableFrom
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT where ST: ?Sized, DT: ?SizedImplementation of CloneToUninit
impl<T> CloneToUninit for T where T: CloneImplementation of From
impl<T> From<T> for TImplementation of Imply
impl<T, U> Imply<T> for U where T: ?Sized, U: ?SizedImplementation of Into
impl<T, U> Into<U> for T where U: From<T>Implementation of IntoEither
impl<T> IntoEither for TImplementation of Pointable
impl<T> Pointable for TImplementation of Read
impl<T> Read<Exclusive, BecauseExclusive> for T where T: ?SizedImplementation of Same
impl<T> Same for TImplementation of Scalar
impl<T> Scalar for T where T: 'static + Clone + PartialEq + DebugImplementation of SupersetOf
impl<SS, SP> SupersetOf<SS> for SP where SS: SubsetOf<SP>Implementation of ToOwned
impl<T> ToOwned for T where T: CloneImplementation 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>
