Struct linfa_hierarchical::HierarchicalCluster
source · [−]pub struct HierarchicalCluster<T: Float>(_);
Expand description
Agglomerative hierarchical clustering
In this clustering algorithm, each point is first considered as a separate cluster. During each step, two points are merged into new clusters, until a stopping criterion is reached. The distance between the points is computed as the negative-log transform of the similarity kernel.
Implementations
sourceimpl<F: Float> HierarchicalCluster<F>
impl<F: Float> HierarchicalCluster<F>
sourcepub fn with_method(self, method: Method) -> HierarchicalCluster<F>
pub fn with_method(self, method: Method) -> HierarchicalCluster<F>
Select a merging method
sourcepub fn num_clusters(self, num_clusters: usize) -> HierarchicalCluster<F>
pub fn num_clusters(self, num_clusters: usize) -> HierarchicalCluster<F>
Stop merging when a certain number of clusters are reached
In the fitting process points are merged until a certain criterion is reached. With this option the merging process will stop, when the number of clusters drops below this value.
sourcepub fn max_distance(self, max_distance: F) -> HierarchicalCluster<F>
pub fn max_distance(self, max_distance: F) -> HierarchicalCluster<F>
Stop merging when a certain distance is reached
In the fitting process points are merged until a certain criterion is reached. With this option the merging process will stop, then the distance exceeds this value.
Trait Implementations
sourceimpl<T: Clone + Float> Clone for HierarchicalCluster<T>
impl<T: Clone + Float> Clone for HierarchicalCluster<T>
sourcefn clone(&self) -> HierarchicalCluster<T>
fn clone(&self) -> HierarchicalCluster<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<T: Debug + Float> Debug for HierarchicalCluster<T>
impl<T: Debug + Float> Debug for HierarchicalCluster<T>
sourceimpl<T: Default + Float> Default for HierarchicalCluster<T>
impl<T: Default + Float> Default for HierarchicalCluster<T>
sourcefn default() -> HierarchicalCluster<T>
fn default() -> HierarchicalCluster<T>
Returns the “default value” for a type. Read more
sourceimpl<F: Float> ParamGuard for HierarchicalCluster<F>
impl<F: Float> ParamGuard for HierarchicalCluster<F>
type Checked = ValidHierarchicalCluster<F>
type Checked = ValidHierarchicalCluster<F>
The checked hyperparameters
type Error = HierarchicalError<F>
type Error = HierarchicalError<F>
Error type resulting from failed hyperparameter checking
sourcefn check_ref(&self) -> Result<&Self::Checked, Self::Error>
fn check_ref(&self) -> Result<&Self::Checked, Self::Error>
Checks the hyperparameters and returns a reference to the checked hyperparameters if successful Read more
sourcefn check(self) -> Result<Self::Checked, Self::Error>
fn check(self) -> Result<Self::Checked, Self::Error>
Checks the hyperparameters and returns the checked hyperparameters if successful
sourcefn check_unwrap(self) -> Self::Checked
fn check_unwrap(self) -> Self::Checked
Calls check()
and unwraps the result
sourceimpl<T: PartialEq + Float> PartialEq<HierarchicalCluster<T>> for HierarchicalCluster<T>
impl<T: PartialEq + Float> PartialEq<HierarchicalCluster<T>> for HierarchicalCluster<T>
sourcefn eq(&self, other: &HierarchicalCluster<T>) -> bool
fn eq(&self, other: &HierarchicalCluster<T>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &HierarchicalCluster<T>) -> bool
fn ne(&self, other: &HierarchicalCluster<T>) -> bool
This method tests for !=
.
impl<T: Float> StructuralPartialEq for HierarchicalCluster<T>
impl<F: Float> TransformGuard for HierarchicalCluster<F>
Auto Trait Implementations
impl<T> RefUnwindSafe for HierarchicalCluster<T> where
T: RefUnwindSafe,
impl<T> Send for HierarchicalCluster<T>
impl<T> Sync for HierarchicalCluster<T>
impl<T> Unpin for HierarchicalCluster<T>
impl<T> UnwindSafe for HierarchicalCluster<T> where
T: UnwindSafe,
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