pub struct LLE { /* private fields */ }Expand description
Implementations§
Source§impl LLE
impl LLE
Sourcepub fn new(n_components: usize) -> Self
pub fn new(n_components: usize) -> Self
Create a new LLE with n_components embedding dimensions.
Defaults: n_neighbors = 5, reg = 1e-3.
Sourcepub fn with_n_neighbors(self, k: usize) -> Self
pub fn with_n_neighbors(self, k: usize) -> Self
Set the number of nearest neighbors.
Sourcepub fn n_components(&self) -> usize
pub fn n_components(&self) -> usize
Return the configured number of components.
Sourcepub fn n_neighbors(&self) -> usize
pub fn n_neighbors(&self) -> usize
Return the configured number of neighbors.
Trait Implementations§
Source§impl Fit<ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>, ()> for LLE
impl Fit<ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>, ()> for LLE
Source§fn fit(&self, x: &Array2<f64>, _y: &()) -> Result<FittedLLE, FerroError>
fn fit(&self, x: &Array2<f64>, _y: &()) -> Result<FittedLLE, FerroError>
Fit LLE by computing reconstruction weights and finding the
bottom eigenvectors of (I - W)^T (I - W).
§Errors
FerroError::InvalidParameterifn_componentsis zero,n_neighborsis zero, or parameters are out of range.FerroError::InsufficientSamplesif there are fewer thann_neighbors + 1samples.FerroError::NumericalInstabilityif a local covariance matrix is singular.
Source§type Error = FerroError
type Error = FerroError
The error type returned by
fit.Auto Trait Implementations§
impl Freeze for LLE
impl RefUnwindSafe for LLE
impl Send for LLE
impl Sync for LLE
impl Unpin for LLE
impl UnsafeUnpin for LLE
impl UnwindSafe for LLE
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