Birch | R Documentation |
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.
rgudhi::PythonClass
-> rgudhi::SKLearnClass
-> rgudhi::BaseClustering
-> Birch
new()
The Birch class constructor.
Birch$new( threshold = 0.5, branching_factor = 50L, n_clusters = 3L, compute_labels = TRUE, copy = TRUE )
threshold
A 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_factor
An 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_factor
then 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_clusters
Either 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_clusters
set to be equal to the integer value.
Defaults to 3L
.
compute_labels
A boolean value specifying whether to compute
labels for each fit. Defaults to TRUE
.
copy
A boolean value specifying whether to make a copy of the
given data. If set to FALSE
, the initial data will be overwritten.
Defaults to TRUE
.
An object of class Birch.
clone()
The objects of this class are cloneable with this method.
Birch$clone(deep = FALSE)
deep
Whether to make a deep clone.
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.
cl <- Birch$new()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.