Docsity

Clustering Algorithms: Terminology, Applications, Examples, and Classifications, Slides of Database Management Systems (DBMS)

Partial preview of the text

Download Clustering Algorithms: Terminology, Applications, Examples, and Classifications and more Slides Database Management Systems (DBMS) in PDF only on Docsity!

Clustering Algorithms

Terminology

  • Cluster: a small group or bunch of something
  • Clustering: the unsupervised classification of patterns (observations, data items, or feature vectors) into clusters. Also referred to as data clustering, cluster analysis, typological analysis
  • Centroid: center of a cluster
  • Distance Measure: determines how the similarity between two elements is calculated.
  • Dendrogram: a tree diagram frequently used to illustrate the arrangement of the clusters

Simple Example

Idea Behind Unsupervised Learning

  • You walk into a bar.
  • A stranger approaches and tells you:
    • “I’ve got data from k classes. Each class produces observations with a normal distribution and variance σ^2 I. Standard simple multivariate Gaussian assumptions. I can tell you all the P(w (^) i )’s .”
  • So far, looks straightforward.
    • “I need a maximum likelihood estimate of the μi ’s .“
  • No problem:
    • “There’s just one thing. None of the data are labeled. I have datapoints, but I don’t know what class they’re from (any of them!)

Exclusive Clustering

  • Data that is grouped in an exclusive way, so that if a particular data belongs to a definite cluster then it could not be included in another cluster.

Separation of points are achieved by a straight line on a bi- dimensional plane.

Overlapping Clustering

  • Uses fuzzy sets to cluster data, so that each point may belong to two or more clusters with different degrees of membership.

Various data belongs to multiple clusters.

Probabilistic Clustering

  • Typically shown as a model in an attempt to optimize the fit between the data and the model using a probabilistic approach. Each cluster can be represented by a parametric distribution, like a Gaussian (continuous) or a Poisson (discrete) and the entire data set is therefore modeled by a mixture of these distributions.

Mixture of Multivariate Gaussian

Distance Measure

  • Common Measures
    • Euclidean distance
    • Manhattan distance
    • Maximum norm
    • Mahalanobis distance
    • Hamming distance
    • Minkowski distance (higher dimensional data)

K-means

  • An Exclusive Clustering algorithm whose steps are as follows:
    1. Let k be the number of clusters
  1. Randomly generate k clusters and determine the cluster centers, or generate k random points as temporary cluster centers

  2. Assign each point to the nearest cluster center

  3. Recompute the new cluster centers

  4. Repeat steps 3 and 4 until the centroids no longer move

K-means

  • Suppose: n vectors x 1 , x 2 , ..., xn where each fall into k compact clusters, k < n. Let mi be the center points of the vectors in cluster i. - Make initial guesses for the points m 1 , m 2 , ..., mk - Until there are no changes in any point - Use the estimated points to classify the samples into clusters - For every cluster, replace mi with the point of all of the samples for cluster i

Sample points m 1 and m 2 moving towards the center of two clusters

Fuzzy C-means

  • Suppose: 20 data and 3 clusters are used to initialize the

algorithm and to compute the U matrix. Color of the data in the graph below is that of the nearest cluster. Assume a fuzzyness coefficient m = 2 and ε = 0.3.

Initial graph Final condition reached after 8 steps

Fuzzy C-means

  • Can we do better? Yes, but the result is more computations. Assume same conditions as before except ε = 0.01.

Result? Final condition reached after 37 steps!

Hierarchical

  • There is also a divisive hierarchical clustering which does the reverse by starting with all objects in one cluster and subdividing , however divisive methods are generally not available, and rarely have been applied.

Single-Linkage

  • Definitions: proximity matrix D=[d(i,j)] and L(k) is the level of the kth clustering. d[(r),(s)] = proximity between clusters (r) and (s). Follow these steps: 1) Begin with level L(0) = 0 and sequence number m = 0
  1. Find a pair (r), (s), such that d[(r),(s)] = min d[(i),(j)] where the minimum is over all pairs of clusters in the current clustering.

  2. Increment the sequence number: m = m + 1 and merge clusters (r) and (s) into a single cluster, L(m) = d[(r),(s)]

  3. Update D by deleting the rows and columns for clusters (r) and (s) and adding a row and column for the newly formed cluster. The proximity between new cluster (r,s) and old cluster (k) is: d[(k), (r,s)] = min d[(k), (r)], d[(k), (s)]

  4. Repeat steps 2 thru 4 until all objects are in one cluster