pub struct MDS { /* private fields */ }Expand description
Implementations§
Source§impl MDS
impl MDS
Sourcepub fn new(n_components: usize) -> Self
pub fn new(n_components: usize) -> Self
Create a new MDS that embeds into n_components dimensions.
By default the input is treated as a feature matrix
(Dissimilarity::Euclidean).
Sourcepub fn with_dissimilarity(self, d: Dissimilarity) -> Self
pub fn with_dissimilarity(self, d: Dissimilarity) -> Self
Set the dissimilarity mode.
Sourcepub fn n_components(&self) -> usize
pub fn n_components(&self) -> usize
Return the configured number of components.
Sourcepub fn dissimilarity(&self) -> Dissimilarity
pub fn dissimilarity(&self) -> Dissimilarity
Return the configured dissimilarity mode.
Trait Implementations§
Source§impl Fit<ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>, ()> for MDS
impl Fit<ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>, ()> for MDS
Source§fn fit(&self, x: &Array2<f64>, _y: &()) -> Result<FittedMDS, FerroError>
fn fit(&self, x: &Array2<f64>, _y: &()) -> Result<FittedMDS, FerroError>
Fit classical MDS.
§Errors
FerroError::InvalidParameterifn_componentsis zero or too large.FerroError::InsufficientSamplesif there are fewer than 2 samples.FerroError::ShapeMismatchifPrecomputedis set but the matrix is not square.
Source§type Error = FerroError
type Error = FerroError
The error type returned by
fit.Auto Trait Implementations§
impl Freeze for MDS
impl RefUnwindSafe for MDS
impl Send for MDS
impl Sync for MDS
impl Unpin for MDS
impl UnsafeUnpin for MDS
impl UnwindSafe for MDS
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