It is a memory-efficient, online-learning algorithm provided as an alternative to MiniBatchKMeans. It constructs a tree data structure with the cluster centroids being read off the leaf. These can be either the final cluster centroids or can be provided as input to another clustering algorithm such as AgglomerativeClustering. This is a wrapper around the Python class sklearn.cluster.Birch.
References
Tian Zhang, Raghu Ramakrishnan, Maron Livny (1996). BIRCH: An efficient data clustering method for large databases, https://www2.cs.sfu.ca/CourseCentral/459/han/papers/zhang96.pdf.
Roberto Perdisci J. Birch - Java implementation of BIRCH clustering algorithm, https://code.google.com/archive/p/jbirch.
Super classes
rgudhi::PythonClass -> rgudhi::SKLearnClass -> rgudhi::BaseClustering -> Birch
Methods
Method new()
The Birch class constructor.
Usage
Birch$new(
threshold = 0.5,
branching_factor = 50L,
n_clusters = 3L,
compute_labels = TRUE,
copy = TRUE
)Arguments
thresholdA numeric value specifying the upper bound of the radius of the subcluster obtained by merging a new sample and the closest subcluster. Otherwise a new subcluster is started. Setting this value to be very low promotes splitting and vice-versa. Defaults to
0.5.branching_factorAn integer value specifying the maximum number of CF subclusters in each node. If a new sample enters such that the number of subclusters exceeds the
branching_factorthen that node is splitted into two nodes with the subclusters redistributed in each. The parent subcluster of that node is removed and two new subclusters are added as parents of the 2 split nodes.n_clustersEither an integer value or an object of class BaseClustering specifying the number of clusters after the final clustering step, which treats the subclusters from the leaves as new samples.
NULL: the final clustering step is not performed and the subclusters are returned as they are;an object of class BaseClustering: the model is fit treating the subclusters as new samples and the initial data is mapped to the label of the closest subcluster;
integer value: the model fit is AgglomerativeClustering with
n_clustersset to be equal to the integer value. Defaults to3L.
compute_labelsA boolean value specifying whether to compute labels for each fit. Defaults to
TRUE.copyA boolean value specifying whether to make a copy of the given data. If set to
FALSE, the initial data will be overwritten. Defaults toTRUE.