[][src]Struct linfa_hierarchical::HierarchicalCluster

pub struct HierarchicalCluster<T> { /* fields omitted */ }

Agglomerative hierarchical clustering

In this clustering algorithm each point is first considered as a seperate cluster. In 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 transformed 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.

impl<'a, F: Float, T: Targets> Transformer<Dataset<Kernel<ArrayBase<ViewRepr<&'a F>, Dim<[usize; 2]>>>, T>, Dataset<Kernel<ArrayBase<ViewRepr<&'a F>, Dim<[usize; 2]>>>, Vec<usize, Global>>> for HierarchicalCluster<F>[src]

pub fn transform(
    &self,
    dataset: Dataset<Kernel<ArrayView2<'a, F>>, T>
) -> Dataset<Kernel<ArrayView2<'a, F>>, Vec<usize>>
[src]

Perform hierarchical clustering of a similarity matrix

Returns the class id for each data point

impl<'b: 'a, 'a, F: Float> Transformer<Kernel<ArrayBase<ViewRepr<&'a F>, Dim<[usize; 2]>>>, Dataset<Kernel<ArrayBase<ViewRepr<&'a F>, Dim<[usize; 2]>>>, Vec<usize, Global>>> for HierarchicalCluster<F>[src]

pub fn transform(
    &self,
    kernel: Kernel<ArrayView2<'a, F>>
) -> Dataset<Kernel<ArrayView2<'a, F>>, Vec<usize>>
[src]

Perform hierarchical clustering of a similarity matrix

Returns the class id for each data point

Auto Trait Implementations

impl<T> RefUnwindSafe for HierarchicalCluster<T> where
    T: RefUnwindSafe

impl<T> Send for HierarchicalCluster<T> where
    T: Send

impl<T> Sync for HierarchicalCluster<T> where
    T: Sync

impl<T> Unpin for HierarchicalCluster<T> where
    T: Unpin

impl<T> UnwindSafe for HierarchicalCluster<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.