pub struct FittedDictionaryLearning { /* private fields */ }Expand description
A fitted dictionary learning model.
Created by calling Fit::fit on a DictionaryLearning. The learned
dictionary is accessible via FittedDictionaryLearning::components.
Implements Transform<Array2<f64>> to compute sparse codes for new data.
Implementations§
Source§impl FittedDictionaryLearning
impl FittedDictionaryLearning
Sourcepub fn components(&self) -> &Array2<f64>
pub fn components(&self) -> &Array2<f64>
The learned dictionary, shape (n_components, n_features).
Sourcepub fn reconstruction_err(&self) -> f64
pub fn reconstruction_err(&self) -> f64
The reconstruction error at convergence.
Trait Implementations§
Source§impl Clone for FittedDictionaryLearning
impl Clone for FittedDictionaryLearning
Source§fn clone(&self) -> FittedDictionaryLearning
fn clone(&self) -> FittedDictionaryLearning
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FittedDictionaryLearning
impl Debug for FittedDictionaryLearning
Source§impl Transform<ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>> for FittedDictionaryLearning
impl Transform<ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>> for FittedDictionaryLearning
Source§fn transform(&self, x: &Array2<f64>) -> Result<Array2<f64>, FerroError>
fn transform(&self, x: &Array2<f64>) -> Result<Array2<f64>, FerroError>
Compute sparse codes for new data using the learned dictionary.
§Errors
Returns FerroError::ShapeMismatch if the number of features does
not match the dictionary.
Source§type Error = FerroError
type Error = FerroError
The error type returned by
transform.Auto Trait Implementations§
impl Freeze for FittedDictionaryLearning
impl RefUnwindSafe for FittedDictionaryLearning
impl Send for FittedDictionaryLearning
impl Sync for FittedDictionaryLearning
impl Unpin for FittedDictionaryLearning
impl UnsafeUnpin for FittedDictionaryLearning
impl UnwindSafe for FittedDictionaryLearning
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