Enum linfa_reduction::ReductionError
source · [−]#[non_exhaustive]
pub enum ReductionError {
NotEnoughSamples,
EmbeddingTooSmall(usize),
StepsZero,
LinalgError(LinalgError),
LinfaError(Error),
}
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NotEnoughSamples
EmbeddingTooSmall(usize)
StepsZero
LinalgError(LinalgError)
LinfaError(Error)
Trait Implementations
sourceimpl Debug for ReductionError
impl Debug for ReductionError
sourceimpl Display for ReductionError
impl Display for ReductionError
sourceimpl Error for ReductionError
impl Error for ReductionError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
🔬 This is a nightly-only experimental API. (
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎 Deprecated since 1.42.0:
use the Display impl or to_string()
sourceimpl<T, D: Data<Elem = f64>> Fit<ArrayBase<D, Dim<[usize; 2]>>, T, ReductionError> for PcaParams
impl<T, D: Data<Elem = f64>> Fit<ArrayBase<D, Dim<[usize; 2]>>, T, ReductionError> for PcaParams
Fit a PCA model given a dataset
The Principal Component Analysis takes the records of a dataset and tries to find the best fit in a lower dimensional space such that the maximal variance is retained.
Parameters
dataset
: A dataset with records in N dimensions
Returns
A fitted PCA model with origin and hyperplane
sourceimpl From<Error> for ReductionError
impl From<Error> for ReductionError
sourceimpl From<LinalgError> for ReductionError
impl From<LinalgError> for ReductionError
sourcefn from(source: LinalgError) -> Self
fn from(source: LinalgError) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for ReductionError
impl Send for ReductionError
impl Sync for ReductionError
impl Unpin for ReductionError
impl UnwindSafe for ReductionError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more