lazymatrix::FittedRowNormalization
LazyMatrix for Rust · 0.9.0
rust
pub struct FittedRowNormalization<P>A row recipe retained alongside the parameters fitted for particular rows.
Retaining the recipe lets a chain prepare new samples without reusing training rows' fitted values. The underlying parameter type remains RowNormalizationParams, with owned vectors or borrowed slices.
Inherent implementation
rust
impl<F: Scalar, S: AsRef<[F]>> FittedRowNormalization<lazymatrix::RowNormalizationParams<F, S>>view
rust
pub fn view(
&self
) -> FittedRowNormalization<lazymatrix::RowNormalizationParamsView<'_, F>>Borrow the saved row parameters without copying their values.
Inherent implementation
rust
impl<P> FittedRowNormalization<P>from_parts
rust
pub fn from_parts(recipe: RowNormalization, parameters: P) -> SelfPair an explicit or computed set of row parameters with its refitting recipe.
This performs no fitting and leaves the supplied parameters unchanged.
into_parts
rust
pub fn into_parts(self) -> (RowNormalization, P)Recover the row recipe and saved parameters.
parameters
rust
pub fn parameters(&self) -> &PThe saved parameters for these rows.
recipe
rust
pub fn recipe(&self) -> RowNormalizationThe recipe to fit when preparing new samples.
Implementation of Clone
rust
impl<P: core::clone::Clone> Clone for FittedRowNormalization<P>clone
rust
fn clone(&self) -> SelfImplementation of Copy
rust
impl<P: core::marker::Copy> Copy for FittedRowNormalization<P>Implementation of Debug
rust
impl<P: core::fmt::Debug> Debug for FittedRowNormalization<P>fmt
rust
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::ResultImplementation of NormalizationParams
rust
impl<F: Scalar, S: AsRef<[F]>> NormalizationParams for FittedRowNormalization<lazymatrix::RowNormalizationParams<F, S>>Scalar
rust
type Scalar = F;Implementation of Params
rust
impl<F: Scalar, S: AsRef<[F]>> Params for FittedRowNormalization<lazymatrix::RowNormalizationParams<F, S>>assert_shape
rust
fn assert_shape(&self, nrows: usize, ncols: usize)Implementation of PartialEq
rust
impl<P: core::cmp::PartialEq> PartialEq for FittedRowNormalization<P>eq
rust
fn eq(&self, other: &Self) -> boolImplementation of Stage
rust
impl<F: Scalar, S: AsRef<[F]>> Stage for FittedRowNormalization<lazymatrix::RowNormalizationParams<F, S>>Kind
rust
type Kind = Rows;NewRows
rust
type NewRows = FittedRowNormalization<RowNormalizationParams<F>>;View
rust
type View<'a> = FittedRowNormalization<RowNormalizationParams<F, &'a [F]>> where Self: 'a;assert_columns
rust
fn assert_columns(&self, _ncols: usize)entry
rust
fn entry(&self, value: F, row: usize, _column: usize) -> Fprepare_dense
rust
fn prepare_dense<M, P>(
self,
data: &M,
prefix: &P
) -> Result<<Self as >::NewRows, <M as MatrixErrorType>::Error> where M: MatrixRead<F> + MatrixErrorType, P: Stage<Scalar = F>stage_view
rust
fn stage_view(&self) -> <Self as >::View<'_>Implementation of StructuralPartialEq
rust
impl<P: core::cmp::PartialEq> StructuralPartialEq for FittedRowNormalization<P>Implementation of Freeze
rust
impl<P> Freeze for FittedRowNormalization<P> where P: FreezeImplementation of RefUnwindSafe
rust
impl<P> RefUnwindSafe for FittedRowNormalization<P> where P: RefUnwindSafeImplementation of Send
rust
impl<P> Send for FittedRowNormalization<P> where P: SendImplementation of Sync
rust
impl<P> Sync for FittedRowNormalization<P> where P: SyncImplementation of Unpin
rust
impl<P> Unpin for FittedRowNormalization<P> where P: UnpinImplementation of UnsafeUnpin
rust
impl<P> UnsafeUnpin for FittedRowNormalization<P> where P: UnsafeUnpinImplementation of UnwindSafe
rust
impl<P> UnwindSafe for FittedRowNormalization<P> where P: UnwindSafeImplementation of Any
rust
impl<T> Any for T where T: 'static + ?SizedImplementation of Boilerplate
rust
impl<T> Boilerplate for T where T: Copy + Send + Sync + Debug + PartialEq + 'staticImplementation 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>
