pub struct NMF {
pub n_components: usize,
pub max_iter: usize,
pub tol: f32,
pub alpha: f32,
pub l1_ratio: f32,
pub components_: Option<Vec<Vec<f32>>>,
pub reconstruction_err_: Option<f32>,
pub n_iter_: usize,
}Expand description
Non-negative Matrix Factorization using multiplicative updates
Fields§
§n_components: usize§max_iter: usize§tol: f32§alpha: f32§l1_ratio: f32§components_: Option<Vec<Vec<f32>>>§reconstruction_err_: Option<f32>§n_iter_: usizeImplementations§
Source§impl NMF
impl NMF
pub fn new(n_components: usize) -> Self
pub fn max_iter(self, n: usize) -> Self
pub fn alpha(self, alpha: f32) -> Self
pub fn fit(&mut self, x: &Tensor)
pub fn transform(&self, x: &Tensor) -> Tensor
pub fn fit_transform(&mut self, x: &Tensor) -> Tensor
pub fn inverse_transform(&self, w: &Tensor) -> Tensor
Auto Trait Implementations§
impl Freeze for NMF
impl RefUnwindSafe for NMF
impl Send for NMF
impl Sync for NMF
impl Unpin for NMF
impl UnwindSafe for NMF
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> 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