Struct linfa_hierarchical::HierarchicalCluster [−][src]
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
impl<F: Float> HierarchicalCluster<F>[src]
pub fn with_method(self, method: Method) -> HierarchicalCluster<F>[src]
Select a merging method
pub fn num_clusters(self, num_clusters: usize) -> HierarchicalCluster<F>[src]
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.
pub fn max_distance(self, max_distance: F) -> HierarchicalCluster<F>[src]
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
impl<T> Default for HierarchicalCluster<T>[src]
Initialize hierarchical clustering, which averages in-cluster points and stops when two clusters are reached.
fn default() -> HierarchicalCluster<T>[src]
impl<F: Float, T> Transformer<DatasetBase<KernelBase<ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>, CsMatBase<F, usize, Vec<usize, Global>, Vec<usize, Global>, Vec<F, Global>, usize>>, T>, DatasetBase<KernelBase<ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>, CsMatBase<F, usize, Vec<usize, Global>, Vec<usize, Global>, Vec<F, Global>, usize>>, Vec<usize, Global>>> for HierarchicalCluster<F>[src]
fn transform(
&self,
dataset: DatasetBase<Kernel<F>, T>
) -> DatasetBase<Kernel<F>, Vec<usize>>[src]
&self,
dataset: DatasetBase<Kernel<F>, T>
) -> DatasetBase<Kernel<F>, Vec<usize>>
Perform hierarchical clustering of a similarity matrix
Returns the class id for each data point
impl<F: Float> Transformer<KernelBase<ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>, CsMatBase<F, usize, Vec<usize, Global>, Vec<usize, Global>, Vec<F, Global>, usize>>, DatasetBase<KernelBase<ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>, CsMatBase<F, usize, Vec<usize, Global>, Vec<usize, Global>, Vec<F, Global>, usize>>, Vec<usize, Global>>> for HierarchicalCluster<F>[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for HierarchicalCluster<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for HierarchicalCluster<T> where
T: Send,
T: Send,
impl<T> Sync for HierarchicalCluster<T> where
T: Sync,
T: Sync,
impl<T> Unpin for HierarchicalCluster<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for HierarchicalCluster<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,