CSE 5243 INTRO. TO DATA MINING

Similar documents
CSE 5243 INTRO. TO DATA MINING

BBS654 Data Mining. Pinar Duygulu. Slides are adapted from Nazli Ikizler

Hierarchical Clustering

Data Mining Concepts & Techniques

Lecture Notes for Chapter 7. Introduction to Data Mining, 2 nd Edition. by Tan, Steinbach, Karpatne, Kumar

CSE 347/447: DATA MINING

CSE 5243 INTRO. TO DATA MINING

Clustering Part 3. Hierarchical Clustering

DATA MINING LECTURE 7. Hierarchical Clustering, DBSCAN The EM Algorithm

Notes. Reminder: HW2 Due Today by 11:59PM. Review session on Thursday. Midterm next Tuesday (10/09/2018)

University of Florida CISE department Gator Engineering. Clustering Part 2

CS7267 MACHINE LEARNING

Hierarchical Clustering

Data Mining Cluster Analysis: Basic Concepts and Algorithms. Lecture Notes for Chapter 8. Introduction to Data Mining

Data Mining Cluster Analysis: Basic Concepts and Algorithms. Slides From Lecture Notes for Chapter 8. Introduction to Data Mining

DATA MINING - 1DL105, 1Dl111. An introductory class in data mining

Clustering Lecture 3: Hierarchical Methods

Unsupervised Learning. Supervised learning vs. unsupervised learning. What is Cluster Analysis? Applications of Cluster Analysis

Hierarchical clustering

Cluster Analysis. Ying Shen, SSE, Tongji University

Clustering CS 550: Machine Learning

Lecture Notes for Chapter 8. Introduction to Data Mining

Cluster analysis. Agnieszka Nowak - Brzezinska

Unsupervised Learning : Clustering

Data Mining Cluster Analysis: Basic Concepts and Algorithms. Lecture Notes for Chapter 8. Introduction to Data Mining

5/15/16. Computational Methods for Data Analysis. Massimo Poesio UNSUPERVISED LEARNING. Clustering. Unsupervised learning introduction

Data Mining Cluster Analysis: Basic Concepts and Algorithms. Lecture Notes for Chapter 8. Introduction to Data Mining

MultiDimensional Signal Processing Master Degree in Ingegneria delle Telecomunicazioni A.A

Unsupervised Learning

Knowledge Discovery in Databases

What is Cluster Analysis?

Clustering Part 2. A Partitional Clustering

Gene Clustering & Classification

Notes. Reminder: HW2 Due Today by 11:59PM. Review session on Thursday. Midterm next Tuesday (10/10/2017)

Part I. Hierarchical clustering. Hierarchical Clustering. Hierarchical clustering. Produces a set of nested clusters organized as a

Lecture Notes for Chapter 7. Introduction to Data Mining, 2 nd Edition. by Tan, Steinbach, Karpatne, Kumar

Clustering. CE-717: Machine Learning Sharif University of Technology Spring Soleymani

Clustering part II 1

Data Mining: Concepts and Techniques. Chapter March 8, 2007 Data Mining: Concepts and Techniques 1

CLUSTERING. CSE 634 Data Mining Prof. Anita Wasilewska TEAM 16

COMP20008 Elements of Data Processing. Outlier Detection and Clustering

Clustering Basic Concepts and Algorithms 1

Cluster Analysis. Prof. Thomas B. Fomby Department of Economics Southern Methodist University Dallas, TX April 2008 April 2010

Online Social Networks and Media. Community detection

Clustering. Informal goal. General types of clustering. Applications: Clustering in information search and analysis. Example applications in search

ECLT 5810 Clustering

Cluster Analysis: Basic Concepts and Algorithms

INF4820. Clustering. Erik Velldal. Nov. 17, University of Oslo. Erik Velldal INF / 22

PAM algorithm. Types of Data in Cluster Analysis. A Categorization of Major Clustering Methods. Partitioning i Methods. Hierarchical Methods

Tan,Steinbach, Kumar Introduction to Data Mining 4/18/ Tan,Steinbach, Kumar Introduction to Data Mining 4/18/

CHAPTER 4: CLUSTER ANALYSIS

Data Mining Cluster Analysis: Basic Concepts and Algorithms. Lecture Notes for Chapter 8. Introduction to Data Mining

Working with Unlabeled Data Clustering Analysis. Hsiao-Lung Chan Dept Electrical Engineering Chang Gung University, Taiwan

Lesson 3. Prof. Enza Messina

Clustering fundamentals

Data Mining. Dr. Raed Ibraheem Hamed. University of Human Development, College of Science and Technology Department of Computer Science

Information Retrieval and Web Search Engines

ECLT 5810 Clustering

Machine Learning (BSMC-GA 4439) Wenke Liu

Machine Learning 15/04/2015. Supervised learning vs. unsupervised learning. What is Cluster Analysis? Applications of Cluster Analysis

What is Cluster Analysis? COMP 465: Data Mining Clustering Basics. Applications of Cluster Analysis. Clustering: Application Examples 3/17/2015

Data Mining Cluster Analysis: Basic Concepts and Algorithms. Lecture Notes for Chapter 8. Introduction to Data Mining

Unsupervised Learning. Andrea G. B. Tettamanzi I3S Laboratory SPARKS Team

Clustering: Overview and K-means algorithm

Data Mining Chapter 9: Descriptive Modeling Fall 2011 Ming Li Department of Computer Science and Technology Nanjing University

Clustering: K-means and Kernel K-means

Machine Learning (BSMC-GA 4439) Wenke Liu

Clustering algorithms

K-Means. Oct Youn-Hee Han

Unsupervised Learning Partitioning Methods

Unsupervised Learning. Presenter: Anil Sharma, PhD Scholar, IIIT-Delhi

Tan,Steinbach, Kumar Introduction to Data Mining 4/18/ Tan,Steinbach, Kumar Introduction to Data Mining 4/18/

Data Informatics. Seon Ho Kim, Ph.D.

Data Mining Algorithms

Hard clustering. Each object is assigned to one and only one cluster. Hierarchical clustering is usually hard. Soft (fuzzy) clustering

Introduction to Mobile Robotics

Information Retrieval and Web Search Engines

CS 1675 Introduction to Machine Learning Lecture 18. Clustering. Clustering. Groups together similar instances in the data sample

Cluster Analysis: Basic Concepts and Algorithms

CS 2750 Machine Learning. Lecture 19. Clustering. CS 2750 Machine Learning. Clustering. Groups together similar instances in the data sample

Olmo S. Zavala Romero. Clustering Hierarchical Distance Group Dist. K-means. Center of Atmospheric Sciences, UNAM.

Kapitel 4: Clustering

Cluster Analysis. CSE634 Data Mining

What to come. There will be a few more topics we will cover on supervised learning

Hierarchical Clustering

SYDE Winter 2011 Introduction to Pattern Recognition. Clustering

INF4820, Algorithms for AI and NLP: Evaluating Classifiers Clustering

Unsupervised Learning and Clustering

Today s lecture. Clustering and unsupervised learning. Hierarchical clustering. K-means, K-medoids, VQ

Clustering. Chapter 10 in Introduction to statistical learning

Measure of Distance. We wish to define the distance between two objects Distance metric between points:

Clustering. Bruno Martins. 1 st Semester 2012/2013

Lecture-17: Clustering with K-Means (Contd: DT + Random Forest)

INF4820 Algorithms for AI and NLP. Evaluating Classifiers Clustering

CS570: Introduction to Data Mining

Based on Raymond J. Mooney s slides

Multivariate Analysis

Hierarchical Clustering Lecture 9

Road map. Basic concepts

Clustering Algorithms for general similarity measures

Transcription:

CSE 5243 INTRO. TO DATA MINING Cluster Analysis: Basic Concepts and Methods Huan Sun, CSE@The Ohio State University 09/25/2017 Slides adapted from UIUC CS412, Fall 2017, by Prof. Jiawei Han

2 Chapter 10. Cluster Analysis: Basic Concepts and Methods Cluster Analysis: An Introduction Partitioning Methods Hierarchical Methods Density- and Grid-Based Methods Evaluation of Clustering Summary

What Is Cluster Analysis? What is a cluster? A cluster is a collection of data objects which are Similar (or related) to one another within the same group (i.e., cluster) Dissimilar (or unrelated) to the objects in other groups (i.e., clusters) Cluster analysis (or clustering, data segmentation, ) Given a set of data points, partition them into a set of groups (i.e., clusters), such that the objects in a group will be similar (or related) to one another and different from (or unrelated to) the objects in other groups Intra-cluster distances are minimized Inter-cluster distances are maximized 3

4 Partitional Clustering Original Points A Partitional Clustering

5 Hierarchical Clustering p1 p2 p3 p4 Traditional Hierarchical Clustering p1 p2 p3 p4 Traditional Dendrogram p1 p2 p3 p4 Non-traditional Hierarchical Clustering p1 p2 p3 p4 Non-traditional Dendrogram

6 Clustering Algorithms K-means and its variants Hierarchical clustering Density-based clustering

7 K-means Clustering Partitional clustering approach Each cluster is associated with a centroid (center point) Each point is assigned to the cluster with the closest centroid Number of clusters, K, must be specified The basic algorithm is very simple Often chosen randomly Measured by Euclidean distance, cosine similarity, etc. Typically the mean of the points in the cluster

8 K-means Clustering Details Initial centroids are often chosen randomly. Clusters produced vary from one run to another. The centroid is (typically) the mean of the points in the cluster. Closeness is measured by Euclidean distance, cosine similarity, correlation, etc. K-means will converge for common similarity measures mentioned above. Most of the convergence happens in the first few iterations. Often the stopping condition is changed to Until relatively few points change clusters Complexity is O( n * K * I * d ) n = number of points, K = number of clusters, I = number of iterations, d = number of attributes

Example: K-Means Clustering Assign points to clusters Recompute cluster centers The original data points & randomly select K = 2 centroids Execution of the K-Means Clustering Algorithm Select K points as initial centroids Repeat Form K clusters by assigning each point to its closest centroid Re-compute the centroids (i.e., mean point) of each cluster Until convergence criterion is satisfied Next iteration Redo point assignment 9

10 Two different K-means Clusterings 3 2.5 Original Points 2 1.5 y 1 0.5 0 3-2 -1.5-1 -0.5 0 0.5 1 1.5 2 x 3 2.5 2.5 2 2 1.5 1.5 y y 1 1 0.5 0.5 0 0-2 -1.5-1 -0.5 0 0.5 1 1.5 2 x Optimal Clustering -2-1.5-1 -0.5 0 0.5 1 1.5 2 x Sub-optimal Clustering

11 Importance of Choosing Initial Centroids (1) 3 Iteration 1 3 Iteration 2 3 Iteration 3 2.5 2.5 2.5 2 2 2 1.5 1.5 1.5 y y y 1 1 1 0.5 0.5 0.5 0 0 0-2 -1.5-1 -0.5 0 0.5 1 1.5 2 x -2-1.5-1 -0.5 0 0.5 1 1.5 2 x -2-1.5-1 -0.5 0 0.5 1 1.5 2 x 3 Iteration 4 3 Iteration 5 3 Iteration 6 2.5 2.5 2.5 2 2 2 y 1.5 y 1.5 y 1.5 Optimal 1 0.5 1 0.5 1 0.5 Clustering 0 0 0-2 -1.5-1 -0.5 0 0.5 1 1.5 2 x -2-1.5-1 -0.5 0 0.5 1 1.5 2 x -2-1.5-1 -0.5 0 0.5 1 1.5 2 x

12 Importance of Choosing Initial Centroids (2) 3 Iteration 1 3 Iteration 2 2.5 2.5 2 2 y 1.5 1 y 1.5 1 0.5 0.5 0 0-2 -1.5-1 -0.5 0 0.5 1 1.5 2 x -2-1.5-1 -0.5 0 0.5 1 1.5 2 x 3 Iteration 3 3 Iteration 4 3 Iteration 5 2.5 2.5 2.5 2 2 2 y 1.5 y 1.5 y 1.5 Sub-optimal 1 0.5 1 0.5 1 0.5 Clustering 0 0 0-2 -1.5-1 -0.5 0 0.5 1 1.5 2 x -2-1.5-1 -0.5 0 0.5 1 1.5 2 x -2-1.5-1 -0.5 0 0.5 1 1.5 2 x

13 Evaluating K-means Clusters Most common measure is Sum of Squared Error (SSE) For each point, the error is the distance to the nearest cluster To get SSE, we square these errors and sum them. SSE = K i= 1 x C i dist 2 ( m, x) i x is a data point in cluster C i and m i is the representative point for cluster C i

14 Evaluating K-means Clusters Most common measure is Sum of Squared Error (SSE) For each point, the error is the distance to the nearest cluster To get SSE, we square these errors and sum them. K SSE( C) = x c k= 1 x i C k i k 2 Using Euclidean Distance Xi is a data point in cluster C k and c k is the representative point for cluster C k can show that c k corresponds to the center (mean) of the cluster

15 Evaluating K-means Clusters Most common measure is Sum of Squared Error (SSE) For each point, the error is the distance to the nearest cluster To get SSE, we square these errors and sum them. K SSE( C) = x c k= 1 x i C k i k 2 Xi is a data point in cluster C k and c k is the representative point for cluster C k can show that c k corresponds to the center (mean) of the cluster Given two clusters, we can choose the one with the smallest error One easy way to reduce SSE is to increase K, the number of clusters A good clustering with smaller K can have a lower SSE than a poor clustering with higher K

16 K-Means: From Optimization Angle Partitioning method: Discovering the groupings in the data by optimizing a specific objective function and iteratively improving the quality of partitions

17 K-Means: From Optimization Angle Partitioning method: Discovering the groupings in the data by optimizing a specific objective function and iteratively improving the quality of partitions K-partitioning method: Partitioning a dataset D of n objects into a set of K clusters so that an objective function is optimized (e.g., the sum of squared distances is minimized, where c k is the centroid or medoid of cluster C k ) A typical objective function: Sum of Squared Errors (SSE) K SSE( C) = x c k= 1 x i C k i k 2 The optimization problem: arg min SSE(C) C

Partitioning Algorithms: From Optimization Angle Partitioning method: Discovering the groupings in the data by optimizing a specific objective function and iteratively improving the quality of partitions K-partitioning method: Partitioning a dataset D of n objects into a set of K clusters so that an objective function is optimized (e.g., the sum of squared distances is minimized, where c k is the centroid or medoid of cluster C k ) A typical objective function: Sum of Squared Errors (SSE) SSE( C) = x c Problem definition: Given K, find a partition of K clusters that optimizes the chosen partitioning criterion Global optimal: Needs to exhaustively enumerate all partitions K k= 1 x i C k i k 2 18 Heuristic methods (i.e., greedy algorithms): K-Means, K-Medians, K-Medoids, etc.

Two different K-means Clusterings 3 3 3 2.5 2.5 2.5 2 2 2 1.5 1.5 1.5 y y y 1 1 1 0.5 0.5 0.5 0 0 0-2 -1.5-1 -0.5 0 0.5 1 1.5 2 Original Points x -2-1.5-1 -0.5 0 0.5 1 1.5 2 x Optimal Clustering -2-1.5-1 -0.5 0 0.5 1 1.5 2 x Sub-optimal Clustering 3 Iteration 1 3 Iteration 1 2.5 2.5 2 2 1.5 1.5 y y 1 1 0.5 0.5 0 0 19-2 -1.5-1 -0.5 0 0.5 1 1.5 2 x -2-1.5-1 -0.5 0 0.5 1 1.5 2 x

20 Problems with Selecting Initial Points If there are K real clusters then the chance of selecting one centroid from each cluster is small. Chance is relatively small when K is large If clusters are the same size, n, then For example, if K = 10, then probability = 10!/10 10 = 0.00036 Sometimes the initial centroids will readjust themselves in right way, and sometimes they don t Consider an example of five pairs of clusters

21 Solutions to Initial Centroids Problem Multiple runs Helps, but probability is not on your side Sample and use hierarchical clustering to determine initial centroids Select more than k initial centroids and then select among these initial centroids Select most widely separated Postprocessing

Pre-processing and Post-processing Pre-processing Normalize the data Eliminate outliers Post-processing Eliminate small clusters that may represent outliers Split loose clusters, i.e., clusters with relatively high SSE Merge clusters that are close and that have relatively low SSE Can use these steps during the clustering process ISODATA 22

K-Means++ Original proposal (MacQueen 67): Select K seeds randomly Need to run the algorithm multiple times using different seeds There are many methods proposed for better initialization of k seeds K-Means++ (Arthur & Vassilvitskii 07): The first centroid is selected at random The next centroid selected is the one that is farthest from the currently selected (selection is based on a weighted probability score) The selection continues until K centroids are obtained 23

Handling Outliers: From K-Means to K-Medoids The K-Means algorithm is sensitive to outliers! since an object with an extremely large value may substantially distort the distribution of the data K-Medoids: Instead of taking the mean value of the object in a cluster as a reference point, medoids can be used, which is the most centrally located object in a cluster The K-Medoids clustering algorithm: Select K points as the initial representative objects (i.e., as initial K medoids) Repeat Assigning each point to the cluster with the closest medoid Randomly select a non-representative object o i 24 Compute the total cost S of swapping the medoid m with o i If S < 0, then swap m with o i to form the new set of medoids Until convergence criterion is satisfied

PAM: A Typical K-Medoids Algorithm 10 10 10 9 9 9 8 8 8 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7 8 9 10 Arbitrary choose K object as initial medoids 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7 8 9 10 Assign each remaining object to nearest medoids 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7 8 9 10 K = 2 Select initial K-Medoids randomly Randomly select a nonmedoid object,o ramdom Repeat Object re-assignment Swap medoid m with o i if it improves the clustering quality Swapping O and O ramdom If quality is improved 10 9 8 7 6 5 4 3 2 Compute total cost of swapping 10 9 8 7 6 5 4 3 2 Until convergence criterion is satisfied 1 0 0 1 2 3 4 5 6 7 8 9 10 1 0 0 1 2 3 4 5 6 7 8 9 10 25

26 K-Medians: Handling Outliers by Computing Medians Medians are less sensitive to outliers than means Think of the median salary vs. mean salary of a large firm when adding a few top executives! K-Medians: Instead of taking the mean value of the object in a cluster as a reference point, medians are used (L 1 -norm as the distance measure) K The criterion function for the K-Medians algorithm: The K-Medians clustering algorithm: S = x med k= 1 x Select K points as the initial representative objects (i.e., as initial K medians) Repeat Assign every point to its nearest median Re-compute the median using the median of each individual feature Until convergence criterion is satisfied i C k ij kj

27 K-Modes: Clustering Categorical Data K-Means cannot handle non-numerical (categorical) data Mapping categorical value to 1/0 cannot generate quality clusters for high-dimensional data K-Modes: An extension to K-Means by replacing means of clusters with modes Dissimilarity measure between object X and the center of a cluster Z Φ(x j, z j ) = 1 n jr /n l when x j = z j ; 1 when x j ǂ z j where z j is the categorical value of attribute j in Z l, n l is the number of objects in cluster l, and n jr is the number of objects whose attribute value is r This dissimilarity measure (distance function) is frequency-based Algorithm is still based on iterative object cluster assignment and centroid update A fuzzy K-Modes method is proposed to calculate a fuzzy cluster membership value for each object to each cluster A mixture of categorical and numerical data: Using a K-Prototype method

Limitations of K-means K-means has problems when clusters are of differing Sizes Densities Non-globular shapes K-means has problems when the data contains outliers. The mean may often not be a real point! 28

29 Limitations of K-means: Differing Density Original Points K-means (3 Clusters)

30 Limitations of K-means: Non-globular Shapes Original Points K-means (2 Clusters)

31 Overcoming K-means Limitations Original Points K-means Clusters

32 Chapter 10. Cluster Analysis: Basic Concepts and Methods Cluster Analysis: An Introduction Partitioning Methods Hierarchical Methods Density- and Grid-Based Methods Evaluation of Clustering Summary

33 Hierarchical Clustering Produces a set of nested clusters organized as a hierarchical tree Can be visualized as a dendrogram A tree-like diagram that records the sequences of merges or splits 6 4 3 4 2 5 2 5 0.2 0.15 0.1 3 1 1 0.05 0 1 3 2 5 4 6

34 Dendrogram: Shows How Clusters are Merged/Splitted Dendrogram: Decompose a set of data objects into a tree of clusters by multi-level nested partitioning A clustering of the data objects is obtained by cutting the dendrogram at the desired level, then each connected component forms a cluster Hierarchical clustering generates a dendrogram (a hierarchy of clusters)

35 Strengths of Hierarchical Clustering Do not have to assume any particular number of clusters Any desired number of clusters can be obtained by cutting the dendogram at the proper level They may correspond to meaningful taxonomies Example in biological sciences (e.g., animal kingdom, phylogeny reconstruction, )

36 Hierarchical Clustering Two main types of hierarchical clustering Agglomerative: Divisive:

Hierarchical Clustering Two main types of hierarchical clustering Agglomerative: Start with the points as individual clusters At each step, merge the closest pair of clusters until only one cluster (or k clusters) left Build a bottom-up hierarchy of clusters Divisive: Step 0 Step 1 Step 2 Step 3 Step 4 a agglomerative a b b c a b c d e c d e d d e e 37

38 Hierarchical Clustering Two main types of hierarchical clustering Agglomerative: Start with the points as individual clusters At each step, merge the closest pair of clusters until only one cluster (or k clusters) left Build a bottom-up hierarchy of clusters Divisive: Start with one, all-inclusive cluster At each step, split a cluster until each cluster contains a point (or there are k clusters) Generate a top-down hierarchy of clusters Step 0 Step 1 Step 2 Step 3 Step 4 a agglomerative a b b c d a b c d e c d e d e e divisive Step 4 Step 3 Step 2 Step 1 Step 0

39 Hierarchical Clustering Two main types of hierarchical clustering Agglomerative: Start with the points as individual clusters At each step, merge the closest pair of clusters until only one cluster (or k clusters) left Divisive: Start with one, all-inclusive cluster At each step, split a cluster until each cluster contains a point (or there are k clusters) Traditional hierarchical algorithms use a similarity or distance matrix Merge or split one cluster at a time

40 Agglomerative Clustering Algorithm More popular hierarchical clustering technique Basic algorithm is straightforward 1. Compute the proximity matrix 2. Let each data point be a cluster 3. Repeat 4. Merge the two closest clusters 5. Update the proximity matrix 6. Until only a single cluster remains Step 0 Step 1 Step 2 Step 3 Step 4 a agglomerative a b b c a b c d e c d e d d e e

41 Agglomerative Clustering Algorithm More popular hierarchical clustering technique Basic algorithm is straightforward 1. Compute the proximity matrix 2. Let each data point be a cluster 3. Repeat 4. Merge the two closest clusters 5. Update the proximity matrix 6. Until only a single cluster remains Key operation is the computation of the proximity of two clusters Different approaches to defining the distance/similarity between clusters distinguish the different algorithms

42 Starting Situation Start with clusters of individual points and a proximity matrix p1 p1 p2 p3 p4 p5... p2 p3 p4 p5... Proximity Matrix 12 data points... p1 p2 p3 p4 p9 p10 p11 p12

43 Intermediate Situation After some merging steps, we have some clusters C1 C2 C3 C4 C5 C1 C2 C3 C4 C3 C4 C5 C1 Proximity Matrix C2 C5... p1 p2 p3 p4 p9 p10 p11 p12

Intermediate Situation We want to merge the two closest clusters (C2 and C5) and update the proximity matrix. C1 C2 C3 C4 C5 C1 C3 C4 C2 C3 Proximity Matrix C4 C1 C5 C2 C5 44... p1 p2 p3 p4 p9 p10 p11 p12

45 After Merging How do we update the proximity matrix? C1 C2 U C5 C3 C4 C1? C3 C4 C2 U C5 C3 C4?????? Proximity Matrix C1 C2 U C5... p1 p2 p3 p4 p9 p10 p11 p12

46 How to Define Inter-Cluster Similarity p1 p2 p3 p4 p5... Similarity? p1 MIN MAX Group Average Distance Between Centroids p2 p3 p4 p5... Proximity Matrix

47 How to Define Inter-Cluster Similarity p1 p2 p3 p4 p5... MIN MAX Group Average Distance Between Centroids p1 p2 p3 p4 p5... Proximity Matrix

48 How to Define Inter-Cluster Similarity p1 p2 p3 p4 p5... MIN MAX Group Average Distance Between Centroids p1 p2 p3 p4 p5... Proximity Matrix

49 How to Define Inter-Cluster Similarity p1 p2 p3 p4 p5... MIN MAX Group Average Distance Between Centroids p1 p2 p3 p4 p5... Proximity Matrix

50 How to Define Inter-Cluster Similarity MIN MAX Group Average Distance Between Centroids p1 p2 p3 p4 p5... p1 p2 p3 p4 p5... Proximity Matrix

Cluster Similarity: MIN or Single Link Similarity of two clusters is based on the two most similar (closest) points in the different clusters Determined by one pair of points, i.e., by one link in the proximity graph. 51

Cluster Similarity: MIN or Single Link Similarity of two clusters is based on the two most similar (closest) points in the different clusters Determined by one pair of points, i.e., by one link in the proximity graph. I1 I2 I3 I4 I5 I1 1.00 0.90 0.10 0.65 0.20 I2 0.90 1.00 0.70 0.60 0.50 I3 0.10 0.70 1.00 0.40 0.30 I4 0.65 0.60 0.40 1.00 0.80 I5 0.20 0.50 0.30 0.80 1.00 1 2 3 4 5 52

Cluster Similarity: MIN or Single Link Similarity of two clusters is based on the two most similar (closest) points in the different clusters Determined by one pair of points, i.e., by one link in the proximity graph. I1 I2 I3 I4 I5 I1 1.00 0.90 0.10 0.65 0.20 I2 0.90 1.00 0.70 0.60 0.50 I3 0.10 0.70 1.00 0.40 0.30 I4 0.65 0.60 0.40 1.00 0.80 I5 0.20 0.50 0.30 0.80 1.00 53

Cluster Similarity: MIN or Single Link Similarity of two clusters is based on the two most similar (closest) points in the different clusters Determined by one pair of points, i.e., by one link in the proximity graph. I1 I2 I3 I4 I5 I1 1.00 0.90 0.10 0.65 0.20 I2 0.90 1.00 0.70 0.60 0.50 I3 0.10 0.70 1.00 0.40 0.30 I4 0.65 0.60 0.40 1.00 0.80 I5 0.20 0.50 0.30 0.80 1.00 1 2 3 4 5 54

Cluster Similarity: MIN or Single Link Similarity of two clusters is based on the two most similar (closest) points in the different clusters Determined by one pair of points, i.e., by one link in the proximity graph. I1 I2 I3 I4 I5 I1 1.00 0.90 0.10 0.65 0.20 I2 0.90 1.00 0.70 0.60 0.50 I3 0.10 0.70 1.00 0.40 0.30 I4 0.65 0.60 0.40 1.00 0.80 I5 0.20 0.50 0.30 0.80 1.00 1 2 3 4 5 55

Cluster Similarity: MIN or Single Link Similarity of two clusters is based on the two most similar (closest) points in the different clusters Determined by one pair of points, i.e., by one link in the proximity graph. {I1,I2} I3 I4 I5 {I1,I2} 1.00 0.70 0.65 0.50 I3 0.70 1.00 0.40 0.30 I4 0.65 0.40 1.00 0.80 I5 0.50 0.30 0.80 1.00 Update proximity matrix with new cluster {I1, I2} 56

Cluster Similarity: MIN or Single Link Similarity of two clusters is based on the two most similar (closest) points in the different clusters Determined by one pair of points, i.e., by one link in the proximity graph. {I1,I2} I3 I4 I5 {I1,I2} 1.00 0.70 0.65 0.50 I3 0.70 1.00 0.40 0.30 I4 0.65 0.40 1.00 0.80 I5 0.50 0.30 0.80 1.00 Update proximity matrix with new cluster {I1, I2} 1 2 3 4 5 57

58 Cluster Similarity: MIN or Single Link Similarity of two clusters is based on the two most similar (closest) points in the different clusters Determined by one pair of points, i.e., by one link in the proximity graph. {I1,I2} I3 {I4,I5} {I1,I2} 1.00 0.70 0.65 I3 0.70 1.00 0.40 {I4,I5} 0.65 0.40 1.00 Update proximity matrix with new cluster {I1, I2} and {I4, I5} 1 2 3 4 5

59 Cluster Similarity: MIN or Single Link Similarity of two clusters is based on the two most similar (closest) points in the different clusters Determined by one pair of points, i.e., by one link in the proximity graph. {I1,I2, I3} {I4,I5} {I1,I2, I3} 1.00 0.65 {I4,I5} 0.65 1.00 Only two clusters are left. 1 2 3 4 5

60 Hierarchical Clustering: MIN 5 2 2 3 3 1 5 1 6 0.2 0.15 0.1 0.05 4 4 0 3 6 2 5 4 1 Nested Clusters Dendrogram

61 Strength of MIN Original Points Two Clusters Can handle non-elliptical shapes

62 Limitations of MIN Original Points Two Clusters Sensitive to noise and outliers

Cluster Similarity: MAX or Complete Linkage Similarity of two clusters is based on the two least similar (most distant) points in the different clusters Determined by all pairs of points in the two clusters I1 I2 I3 I4 I5 I1 1.00 0.90 0.10 0.65 0.20 I2 0.90 1.00 0.70 0.60 0.50 I3 0.10 0.70 1.00 0.40 0.30 I4 0.65 0.60 0.40 1.00 0.80 I5 0.20 0.50 0.30 0.80 1.00 1 2 3 4 5 63

Cluster Similarity: MAX or Complete Linkage Similarity of two clusters is based on the two least similar (most distant) points in the different clusters Determined by all pairs of points in the two clusters {I1,I2} I3 I4 I5 I1 1.00 0.10 0.60 0.20 I3 0.10 1.00 0.40 0.30 I4 0.60 0.40 1.00 0.80 I5 0.20 0.30 0.80 1.00 1 2 3 4 5 64

Cluster Similarity: MAX or Complete Linkage Similarity of two clusters is based on the two least similar (most distant) points in the different clusters Determined by all pairs of points in the two clusters {I1,I2} I3 I4 I5 I1 1.00 0.10 0.60 0.20 I3 0.10 1.00 0.40 0.30 I4 0.60 0.40 1.00 0.80 I5 0.20 0.30 0.80 1.00 1 2 3 4 5 Which two clusters should be merged next? 65

Cluster Similarity: MAX or Complete Linkage Similarity of two clusters is based on the two least similar (most distant) points in the different clusters Determined by all pairs of points in the two clusters {I1,I2} I3 I4 I5 I1 1.00 0.10 0.60 0.20 I3 0.10 1.00 0.40 0.30 I4 0.60 0.40 1.00 0.80 I5 0.20 0.30 0.80 1.00 1 2 3 4 5 Merge {3} with {4,5}, why? 66

67 Hierarchical Clustering: MAX 5 4 1 2 5 2 3 6 3 1 4 0.4 0.35 0.3 0.25 0.2 0.15 0.1 0.05 0 3 6 4 1 2 5 Nested Clusters Dendrogram

68 Strength of MAX Original Points Two Clusters Less susceptible to noise and outliers

69 Limitations of MAX Original Points Two Clusters Tends to break large clusters Biased towards globular clusters

70 Cluster Similarity: Group Average Proximity of two clusters is the average of pairwise proximity between points in the two clusters. pi Clusteri p Cluster proximity(p,p j j proximity(cluster i, Clusterj) = Cluster Cluster Need to use average connectivity for scalability since total proximity favors large clusters i i j j ) I1 I2 I3 I4 I5 I1 1.00 0.90 0.10 0.65 0.20 I2 0.90 1.00 0.70 0.60 0.50 I3 0.10 0.70 1.00 0.40 0.30 I4 0.65 0.60 0.40 1.00 0.80 I5 0.20 0.50 0.30 0.80 1.00 1 2 3 4 5

71 Hierarchical Clustering: Group Average 5 5 2 2 4 4 3 3 1 1 6 0.25 0.2 0.15 0.1 0.05 0 3 6 4 1 2 5 Nested Clusters Dendrogram

Hierarchical Clustering: Group Average Compromise between Single and Complete Link Strengths Less susceptible to noise and outliers Limitations Biased towards globular clusters 72

Hierarchical Clustering: Time and Space requirements O(N 2 ) space since it uses the proximity matrix. N is the number of points. O(N 3 ) time in many cases There are N steps and at each step the size, N 2, proximity matrix must be updated and searched Complexity can be reduced to O(N 2 log(n) ) time for some approaches 73

Hierarchical Clustering: Problems and Limitations Once a decision is made to combine two clusters, it cannot be undone No objective function is directly minimized Different schemes have problems with one or more of the following: Sensitivity to noise and outliers Difficulty handling different sized clusters and convex shapes Breaking large clusters 74