pub struct FittedNMF<F> { /* private fields */ }Expand description
A fitted NMF model holding the learned components and reconstruction error.
Created by calling Fit::fit on an NMF. Implements
Transform<Array2<F>> to project new data onto the learned components.
Implementations§
Trait Implementations§
Source§impl<F: Float + Send + Sync + 'static> FittedPipelineTransformer<F> for FittedNMF<F>
impl<F: Float + Send + Sync + 'static> FittedPipelineTransformer<F> for FittedNMF<F>
Source§fn transform_pipeline(&self, x: &Array2<F>) -> Result<Array2<F>, FerroError>
fn transform_pipeline(&self, x: &Array2<F>) -> Result<Array2<F>, FerroError>
Source§impl<F: Float + Send + Sync + 'static> Transform<ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>> for FittedNMF<F>
impl<F: Float + Send + Sync + 'static> Transform<ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>> for FittedNMF<F>
Source§fn transform(&self, x: &Array2<F>) -> Result<Array2<F>, FerroError>
fn transform(&self, x: &Array2<F>) -> Result<Array2<F>, FerroError>
Project data onto the learned NMF components.
Solves for W in X ~ W * H using multiplicative updates with
H fixed to the learned components.
§Errors
FerroError::ShapeMismatchif the number of columns does not match the number of features seen during fitting.FerroError::InvalidParameterif any entry ofXis negative.
Source§type Error = FerroError
type Error = FerroError
The error type returned by
transform.Auto Trait Implementations§
impl<F> Freeze for FittedNMF<F>where
F: Freeze,
impl<F> RefUnwindSafe for FittedNMF<F>where
F: RefUnwindSafe,
impl<F> Send for FittedNMF<F>where
F: Send,
impl<F> Sync for FittedNMF<F>where
F: Sync,
impl<F> Unpin for FittedNMF<F>where
F: Unpin,
impl<F> UnsafeUnpin for FittedNMF<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for FittedNMF<F>where
F: UnwindSafe + RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more