Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

BIRCH

From Wikipedia, the free encyclopedia
Clustering using tree-based data aggregation
This article is about the clustering algorithm. For the tree, seeBirch. For other uses, seeBirch (disambiguation).
Part of a series on
Machine learning
anddata mining

BIRCH (balanced iterative reducing and clustering using hierarchies) is an unsuperviseddata mining algorithm used to performhierarchical clustering over particularly large data-sets.[1] With modifications it can also be used to acceleratek-means clustering and Gaussian mixture modeling with theexpectation–maximization algorithm.[2] An advantage of BIRCH is its ability to incrementally and dynamically cluster incoming, multi-dimensional metricdata points in an attempt to produce the best quality clustering for a given set of resources (memory andtime constraints). In most cases, BIRCH only requires a single scan of the database.

Its inventors claim BIRCH to be the "first clustering algorithm proposed in the database area to handle 'noise' (data points that are not part of the underlying pattern) effectively",[1] beatingDBSCAN by two months. The BIRCH algorithm received the SIGMOD 10 year test of time award in 2006.[3]

Problem with previous methods

[edit]

Previous clustering algorithms performed less effectively over very large databases and did not adequately consider the case wherein a data-set was too large to fit inmain memory. As a result, there was a lot of overhead maintaining high clustering quality while minimizing the cost of additional IO (input/output) operations. Furthermore, most of BIRCH's predecessors inspect all data points (or all currently existing clusters) equally for each 'clustering decision' and do not perform heuristic weighting based on the distance between these data points.

Advantages with BIRCH

[edit]

It is local in that each clustering decision is made without scanning all data points and currently existing clusters.It exploits the observation that the data space is not usually uniformly occupied and not every data point is equally important.It makes full use of available memory to derive the finest possible sub-clusters while minimizing I/O costs.It is also an incremental method that does not require the wholedata set in advance.

Algorithm

[edit]

The BIRCH algorithm takes as input a set ofN data points, represented asreal-valued vectors, and a desired number of clustersK. It operates in four phases, the second of which is optional.

The first phase builds a clustering feature (CF{\displaystyle CF}) tree out of the data points, a height-balancedtree data structure, defined as follows:

In the second step, the algorithm scans all the leaf entries in the initialCF{\displaystyle CF} tree to rebuild a smallerCF{\displaystyle CF} tree, while removing outliers and grouping crowded subclusters into larger ones. This step is marked optional in the original presentation of BIRCH.

In step three an existing clustering algorithm is used to cluster all leaf entries. Here an agglomerative hierarchical clustering algorithm is applied directly to the subclusters represented by theirCF{\displaystyle CF} vectors. It also provides the flexibility of allowing the user to specify either the desired number of clusters or the desired diameter threshold for clusters. After this step a set of clusters is obtained that captures major distribution pattern in the data. However, there might exist minor and localized inaccuracies which can be handled by an optional step 4. In step 4 the centroids of the clusters produced in step 3 are used as seeds and redistribute the data points to its closest seeds to obtain a new set of clusters. Step 4 also provides us with an option of discarding outliers. That is a point which is too far from its closest seed can be treated as an outlier.

Calculations with the clustering features

[edit]
icon
This sectionis missing information about BIRCH equations for Diameter D, Distances D0, D1, D3 and D4. Please expand the section to include this information. Further details may exist on thetalk page.(July 2023)

Given only the clustering featureCF=[N,LS,SS]{\displaystyle CF=[N,{\overrightarrow {LS}},SS]}, the same measures can be calculated without the knowledge of the underlying actual values.

In multidimensional cases the square root should be replaced with a suitable norm.

BIRCH uses the distances DO to D3 to find the nearest leaf, then the radius R or the diameter D to decide whether to absorb the data into the existing leaf or whether to add a new leaf.

Numerical issues in BIRCH clustering features

[edit]

Unfortunately, there are numerical issues associated with the use of the termSS{\displaystyle SS} in BIRCH. When subtractingSSN(LSN)2{\displaystyle {\frac {SS}{N}}-{\big (}{\frac {\vec {LS}}{N}}{\big )}^{2}} or similar in the other distances such asD2{\displaystyle D_{2}},catastrophic cancellation can occur and yield a poor precision, and which can in some cases even cause the result to be negative (and the square root then become undefined).[2] This can be resolved by using BETULA cluster featuresCF=(N,μ,S){\displaystyle CF=(N,\mu ,S)} instead, which store the countN{\displaystyle N}, meanμ{\displaystyle \mu }, and sum of squared deviations instead based on numerically more reliableonline algorithms to calculate variance. For these features, a similar additivity theorem holds. When storing a vector respectively a matrix for the squared deviations, the resulting BIRCH CF-tree can also be used to accelerate Gaussian Mixture Modeling with theexpectation–maximization algorithm, besidesk-means clustering andhierarchical agglomerative clustering.

Instead of storing the linear sum and the sum of squares, we can instead store the mean and the squareddeviation from the mean in each cluster featureCF=(N,μ,S){\displaystyle CF'=(N,\mu ,S)},[4] where

  • n{\displaystyle n} is the node weight (number of points)
  • μ{\displaystyle \mu } is the node center vector (arithmetic mean, centroid)
  • S{\displaystyle S} is the sum of squared deviations from the mean (either a vector, or a sum to conserve memory, depending on the application)

The main difference here is that S is computed relative to the center, instead of relative to the origin.

A single pointx{\displaystyle x} can be cast into a cluster featureCFx=(1,x,0){\displaystyle CF_{x}=(1,x,0)}. In order to combine two cluster featuresCFAB=CFA+CFB{\displaystyle CF_{AB}=CF_{A}+CF_{B}}, we use

These computations use numerically more reliable computations (cf.online computation of the variance) that avoid the subtraction of two similar squared values. The centroid is simply the node center vectorμ{\displaystyle \mu }, and can directly be used for distance computations using, e.g., the Euclidean or Manhattan distances. The radius simplifies toR=1NS{\displaystyle R={\sqrt {{\frac {1}{N}}S}}} and the diameter toD=2N1S{\displaystyle D={\sqrt {{\frac {2}{N-1}}S}}}.

We can now compute the different distances D0 to D4 used in the BIRCH algorithm as:[4]

These distances can also be used to initialize the distance matrix for hierarchical clustering, depending on the chosen linkage. For accurate hierarchical clustering and k-means clustering, we also need to use the node weightN{\displaystyle N}.

Clustering Step

[edit]

The CF-tree provides a compressed summary of the data set, but the leaves themselves only provide a very poor data clustering.In a second step, the leaves can be clustered using, e.g.,

  1. k-means clustering, where leaves are weighted by the numbers of points, N.
  2. k-means++, by sampling cluster features proportional toS+Nmini||μci||{\displaystyle S+N\min _{i}||\mu -c_{i}||} where theci{\displaystyle c_{i}} are the previously chosen centers, and(N,μ,S){\displaystyle (N,\mu ,S)} is the BETULA cluster feature.
  3. Gaussian mixture modeling, where also the variance S can be taken into account, and if the leaves store covariances, also the covariances.
  4. Hierarchical agglomerative clustering, where the linkage can be initialized using the following equivalence of linkages to BIRCH distances:[5]
Correspondence between HAC linkages and BIRCH distances[5]
HAC LinkageBIRCH distance
UPGMAD2²
WPGMAD0²
Ward2 D4²

Availability

[edit]
  • ELKI contains BIRCH and BETULA.
  • scikit-learn contains a limited version of BIRCH, which only supports D0 distance, static thresholds, and which uses only the centroids of the leaves in the clustering step.[6]

References

[edit]
  1. ^abZhang, T.; Ramakrishnan, R.; Livny, M. (1996). "BIRCH: an efficient data clustering method for very large databases".Proceedings of the 1996 ACM SIGMOD international conference on Management of data - SIGMOD '96. pp. 103–114.doi:10.1145/233269.233324.
  2. ^abLang, Andreas; Schubert, Erich (2020),"BETULA: Numerically Stable CF-Trees for BIRCH Clustering",Similarity Search and Applications, pp. 281–296,arXiv:2006.12881,doi:10.1007/978-3-030-60936-8_22,ISBN 978-3-030-60935-1,S2CID 219980434, retrieved2021-01-16
  3. ^"2006 SIGMOD Test of Time Award". Archived fromthe original on 2010-05-23.
  4. ^abLang, Andreas; Schubert, Erich (2022)."BETULA: Fast clustering of large data with improved BIRCH CF-Trees".Information Systems.108 101918.doi:10.1016/j.is.2021.101918.
  5. ^abSchubert, Erich; Lang, Andreas (2022-12-31), "5 Cluster Analysis",Machine Learning under Resource Constraints - Fundamentals, De Gruyter, pp. 215–226,arXiv:2309.02552,doi:10.1515/9783110785944-005,ISBN 978-3-11-078594-4
  6. ^as discussed in[1]
Retrieved from "https://en.wikipedia.org/w/index.php?title=BIRCH&oldid=1303434644"
Category:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp