Struct linfa_hierarchical::HierarchicalCluster
source · pub struct HierarchicalCluster<T: Float>(/* private fields */);
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§
source§impl<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§
source§impl<T: Clone + Float> Clone for HierarchicalCluster<T>
impl<T: Clone + Float> Clone for HierarchicalCluster<T>
source§fn clone(&self) -> HierarchicalCluster<T>
fn clone(&self) -> HierarchicalCluster<T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<T: Default + Float> Default for HierarchicalCluster<T>
impl<T: Default + Float> Default for HierarchicalCluster<T>
source§fn default() -> HierarchicalCluster<T>
fn default() -> HierarchicalCluster<T>
source§impl<F: Float> ParamGuard for HierarchicalCluster<F>
impl<F: Float> ParamGuard for HierarchicalCluster<F>
§type Checked = ValidHierarchicalCluster<F>
type Checked = ValidHierarchicalCluster<F>
§type Error = HierarchicalError<F>
type Error = HierarchicalError<F>
source§fn check_ref(&self) -> Result<&Self::Checked, Self::Error>
fn check_ref(&self) -> Result<&Self::Checked, Self::Error>
source§fn check(self) -> Result<Self::Checked, Self::Error>
fn check(self) -> Result<Self::Checked, Self::Error>
source§fn check_unwrap(self) -> Self::Checkedwhere
Self: Sized,
fn check_unwrap(self) -> Self::Checkedwhere
Self: Sized,
check()
and unwraps the resultsource§impl<T: PartialEq + Float> PartialEq for HierarchicalCluster<T>
impl<T: PartialEq + Float> PartialEq for HierarchicalCluster<T>
source§fn eq(&self, other: &HierarchicalCluster<T>) -> bool
fn eq(&self, other: &HierarchicalCluster<T>) -> bool
self
and other
values to be equal, and is used
by ==
.