ml-hclust
    Preparing search index...

    Class Cluster

    Index

    Constructors

    Properties

    children: Cluster[]
    height: number
    index: number
    isLeaf: boolean
    size: number

    Methods

    • Creates an array of clusters where the maximum height is smaller than the threshold.

      Parameters

      • threshold: number

      Returns Cluster[]

      The cut clusters.

    • Merge the leaves in the minimum way to have groups number of clusters.

      Parameters

      • groups: number

        Them number of children the first level of the tree should have.

      Returns Cluster

    • Returns a list of indices for all the leaves of this cluster. The list is ordered in such a way that a dendrogram could be drawn without crossing branches.

      Returns number[]

    • Traverses the tree depth-first and calls the provided callback with each individual node

      Parameters

      • cb: (cluster: Cluster) => void

        The callback to be called on each node encounter

      Returns void