CS 478 – Tools for Machine Learning and Data Mining Clustering: Distance-based Approaches.

Slides:



Advertisements
Similar presentations
Clustering.
Advertisements

Clustering k-mean clustering Genome 559: Introduction to Statistical and Computational Genomics Elhanan Borenstein.
5 x4. 10 x2 9 x3 10 x9 10 x4 10 x8 9 x2 9 x4.
Clustering AMCS/CS 340: Data Mining Xiangliang Zhang
SEEM Tutorial 4 – Clustering. 2 What is Cluster Analysis?  Finding groups of objects such that the objects in a group will be similar (or.
Clustering.
Cluster Analysis: Basic Concepts and Algorithms
Hierarchical Clustering. Produces a set of nested clusters organized as a hierarchical tree Can be visualized as a dendrogram – A tree-like diagram that.
Hierarchical Clustering, DBSCAN The EM Algorithm
PARTITIONAL CLUSTERING
Clustering Paolo Ferragina Dipartimento di Informatica Università di Pisa This is a mix of slides taken from several presentations, plus my touch !
© Tan,Steinbach, Kumar Introduction to Data Mining 4/18/ What is Cluster Analysis? l Finding groups of objects such that the objects in a group will.
Cluster Analysis.
Clustering II.
Clustering… in General In vector space, clusters are vectors found within  of a cluster vector, with different techniques for determining the cluster.
© University of Minnesota Data Mining for the Discovery of Ocean Climate Indices 1 CSci 8980: Data Mining (Fall 2002) Vipin Kumar Army High Performance.
1 Text Clustering. 2 Clustering Partition unlabeled examples into disjoint subsets of clusters, such that: –Examples within a cluster are very similar.
Cluster Analysis: Basic Concepts and Algorithms
Clustering. 2 Outline  Introduction  K-means clustering  Hierarchical clustering: COBWEB.
Unsupervised Learning and Data Mining
Clustering. 2 Outline  Introduction  K-means clustering  Hierarchical clustering: COBWEB.
Semi-Supervised Clustering Jieping Ye Department of Computer Science and Engineering Arizona State University
K-means Clustering. What is clustering? Why would we want to cluster? How would you determine clusters? How can you do this efficiently?
Chapter 3: Cluster Analysis  3.1 Basic Concepts of Clustering  3.2 Partitioning Methods  3.3 Hierarchical Methods The Principle Agglomerative.
Evaluating Performance for Data Mining Techniques
CSC 4510 – Machine Learning Dr. Mary-Angela Papalaskari Department of Computing Sciences Villanova University Course website:
Unsupervised Learning. CS583, Bing Liu, UIC 2 Supervised learning vs. unsupervised learning Supervised learning: discover patterns in the data that relate.
START OF DAY 8 Reading: Chap. 14. Midterm Go over questions General issues only Specific issues: visit with me Regrading may make your grade go up OR.
Text Clustering.
Clustering Supervised vs. Unsupervised Learning Examples of clustering in Web IR Characteristics of clustering Clustering algorithms Cluster Labeling 1.
Basic Machine Learning: Clustering CS 315 – Web Search and Data Mining 1.
1 Motivation Web query is usually two or three words long. –Prone to ambiguity –Example “keyboard” –Input device of computer –Musical instruments How can.
Dimension reduction : PCA and Clustering Slides by Agnieszka Juncker and Chris Workman modified by Hanne Jarmer.
CLUSTER ANALYSIS Introduction to Clustering Major Clustering Methods.
Data Science and Big Data Analytics Chap 4: Advanced Analytical Theory and Methods: Clustering Charles Tappert Seidenberg School of CSIS, Pace University.
Clustering Clustering is a technique for finding similarity groups in data, called clusters. I.e., it groups data instances that are similar to (near)
Machine Learning Queens College Lecture 7: Clustering.
Compiled By: Raj Gaurang Tiwari Assistant Professor SRMGPC, Lucknow Unsupervised Learning.
Definition Finding groups of objects such that the objects in a group will be similar (or related) to one another and different from (or unrelated to)
Basic Machine Learning: Clustering CS 315 – Web Search and Data Mining 1.
Clustering (1) Chapter 7. Outline Introduction Clustering Strategies The Curse of Dimensionality Hierarchical k-means.
CZ5211 Topics in Computational Biology Lecture 4: Clustering Analysis for Microarray Data II Prof. Chen Yu Zong Tel:
Clustering Wei Wang. Outline What is clustering Partitioning methods Hierarchical methods Density-based methods Grid-based methods Model-based clustering.
Clustering Machine Learning Unsupervised Learning K-means Optimization objective Random initialization Determining Number of Clusters Hierarchical Clustering.
Data Mining and Text Mining. The Standard Data Mining process.
Clustering. What is Clustering? Unsupervised learning Seeks to organize data into “reasonable” groups Often based on some similarity (or distance) measure.
Data Mining: Basic Cluster Analysis
Unsupervised Learning: Clustering
Unsupervised Learning: Clustering
Semi-Supervised Clustering
Clustering CSC 600: Data Mining Class 21.
Chapter 15 – Cluster Analysis
Constrained Clustering -Semi Supervised Clustering-
Machine Learning Lecture 9: Clustering
Data Mining K-means Algorithm
Data Clustering Michael J. Watts
CSE 5243 Intro. to Data Mining
K-means and Hierarchical Clustering
Clustering.
Hierarchical and Ensemble Clustering
Clustering.
DATA MINING Introductory and Advanced Topics Part II - Clustering
Data Mining – Chapter 4 Cluster Analysis Part 2
Clustering Wei Wang.
Cluster Analysis.
Text Categorization Berlin Chen 2003 Reference:
Clustering Techniques
Unsupervised Learning: Clustering
SEEM4630 Tutorial 3 – Clustering.
Presentation transcript:

CS 478 – Tools for Machine Learning and Data Mining Clustering: Distance-based Approaches

What is Clustering? Unsupervised learning. Seeks to organize data elements into “reasonable” groups. Typically based on some similarity (or distance) measure defined over data elements. Quantitative characterization may include – Centroid / Medoid – Radius – Diameter

Clustering Taxonomy Partitional methods: – Algorithm produces a single partition or clustering of the data elements Hierarchical methods: – Algorithm produces a series of nested partitions, each of which represents a possible clustering of the data elements Symbolic Methods: – Algorithm produces hierarchy of concepts

K-means Overview Algorithm builds a single k-subset partition Works with numeric data only Starts with k random centroids Uses iterative re-assignment of data items to clusters based on some distance to centroids until all assignments remain unchanged

K-means Algorithm 1)Pick a number, k, of cluster centers (at random, do not have to be data items) 2)Assign every item to its nearest cluster center (e.g., using Euclidean distance) 3)Move each cluster center to the mean of its assigned items 4)Repeat steps 2 and 3 until convergence (e.g., change in cluster assignments less than a threshold)

K-means Demo

K-means Discussion Result can vary significantly depending on initial choice of seeds Can get trapped in local minimum – Example: – Restart with different random seeds Does not handle outliers well Does not scale very well instances initial cluster centers

K-means Summary Advantages Simple, understandable Items automatically assigned to clusters Disadvantages Must pick number of clusters beforehand All items forced into a cluster Sensitive to outliers

K-medoids Overview Also known as Partitioning Around Medoids (PAM) Algorithm builds a single k-subset partition Works with numeric data only Starts with k random medoids Uses iterative re-assignment of medoids as long as overall clustering quality improves

K-medoids Quality Measures Clustering quality: – Sum of all distances from a non-medoid object to the medoid for the cluster it is in (an item is assigned to the cluster represented by the medoid to which it is closest) Quality impact: – C jih = cost change for item j associated with swapping medoid i for non-medoid h – Total impact to clustering quality by medoid change (h replaces i):

K-medoids Algorithm 1)Pick a number, k, of random data items as medoids 2)Calculate 3)If TC mn < 0, replace m by n and go back to 2 4)Assign every item to its nearest medoid The pair (n,m) of medoid/non-medoid with the smallest impact on clustering quality

K-medoids Example (I) Assume k=2 Select X5 and X9 as medoids Current clustering: {X1,X2,X5,X6,X7},{X3,X4,X8,X9,X10}

K-medoids Example (II) Must try to replace X5 by X1, X2, X3, X4, X6, X7, X8, X10 Must try to replace X9 by X1, X2, X3, X4, X6, X7, X8, X10 Replace X5 by X4: -9 Replace X5 by X6: -5 Replace X5 by X7: 0 Replace X5 by X8: -1 Replace X5 by X10: 1  Replace X5 by X3 Replace X9 by X1: -7 Replace X9 by X2: -5 Replace X9 by X3: -7 Replace X9 by X4: -8 Replace X9 by X6: -3 Replace X9 by X7: 5 Replace X9 by X8: -1 Replace X9 by X10: -4

K-medoids Example (III) X3 and X9 are new medoids Current clustering: {X1,X2,X3,X4},{X5,X6,X7,X8,X9,X10} No change in medoids yields better quality  DONE! (I think)

K-medoids Discussion As in K-means, user must select the value of k, but the resulting clustering is independent of the initial choice of medoids Handles outliers well Does not scale well – CLARA and CLARANS improve on the time complexity of K-medoids by using sampling and neighborhoods

K-medoids Summary Advantages Simple, understandable Items automatically assigned to clusters Handles outliers Disadvantages Must pick number of clusters beforehand High time complexity

Hierarchical Clustering Focus on the agglomerative approach: 1.Assign each data item to its own cluster 2.Compute pairwise distances between clusters 3.Merge the two closest clusters 4.If more than one cluster is left, go to step 2

Cluster Distances Complete-link – Maximum pairwise distance between the items of two different clusters Single-link – Minimum pairwise distance between the items of two different clusters Average-link – Average pairwise distance between the items of two different clusters

HAC Example Assume single-link

HAC Demo

HAC Discussion Best implementation is O(n 2 logn) No need to specify number of clusters Still need to know when to stop: * – Too early  clustering too fine – Too late  clustering too coarse – Trade one parameter (K) for another (distance threshold)? * May also be done after the dendrogram is built

Picking “the” Threshold Guessing (sub-optimal) Looking for “jumps” in the distance function (subjective) Human examination (expensive, unreasonable) Semi-supervised learning – Must-link, cannot-link constraints – Stated explicitly or implicitly (e.g., through labels)

Simple Solution Select random sample S of items Label items in S Cluster S Find the threshold value T that maximizes some clustering quality measure on S Cluster complete dataset up to T |S|=50 was shown to give reasonable results