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

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

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. Lecture Notes for Chapter 8. Introduction to Data Mining

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

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

Clustering fundamentals

Data Mining. Cluster Analysis: Basic Concepts and Algorithms

Clustering Part 2. A Partitional Clustering

and Algorithms Dr. Hui Xiong Rutgers University Introduction to Data Mining 8/30/ Introduction to Data Mining 08/06/2006 1

Data Mining Cluster Analysis: Basic Concepts and Algorithms. Lecture Notes for Chapter 7. Introduction to Data Mining, 2 nd Edition

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

Lecture Notes for Chapter 8. Introduction to Data Mining

Hierarchical Clustering

CSE 5243 INTRO. TO DATA MINING

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. Lecture Notes for Chapter 8. Introduction to Data Mining

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

9/17/2009. Wenyan Li (Emily Li) Sep. 15, Introduction to Clustering Analysis

Data Mining Concepts & Techniques

Clustering Part 3. Hierarchical Clustering

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

CSE 347/447: DATA MINING

CS7267 MACHINE LEARNING

Clustering CS 550: Machine Learning

CSE 5243 INTRO. TO DATA MINING

Cluster analysis. Agnieszka Nowak - Brzezinska

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

University of Florida CISE department Gator Engineering. Clustering Part 2

Hierarchical Clustering

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

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

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

Clustering Lecture 3: Hierarchical Methods

Unsupervised Learning : Clustering

CSE 5243 INTRO. TO DATA MINING

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

Hierarchical clustering

Cluster Analysis. Ying Shen, SSE, Tongji University

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

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

Clustering Basic Concepts and Algorithms 1

University of Florida CISE department Gator Engineering. Clustering Part 5

Cluster Analysis: Basic Concepts and Algorithms

Unsupervised Learning

What is Cluster Analysis?

Gene Clustering & Classification

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

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

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

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

Online Social Networks and Media. Community detection

Clustering Tips and Tricks in 45 minutes (maybe more :)

Statistics 202: Data Mining. c Jonathan Taylor. Clustering Based in part on slides from textbook, slides of Susan Holmes.

Knowledge Discovery in Databases

SYDE Winter 2011 Introduction to Pattern Recognition. Clustering

Cluster Analysis: Basic Concepts and Algorithms

Statistics 202: Data Mining. c Jonathan Taylor. Week 8 Based in part on slides from textbook, slides of Susan Holmes. December 2, / 1

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

Clustering: Overview and K-means algorithm

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

MIS2502: Data Analytics Clustering and Segmentation. Jing Gong

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

! Introduction. ! Partitioning methods. ! Hierarchical methods. ! Model-based methods. ! Density-based methods. ! Scalability

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

Road map. Basic concepts

Clustering. Supervised vs. Unsupervised Learning

INF4820, Algorithms for AI and NLP: Hierarchical Clustering

Based on Raymond J. Mooney s slides

INF4820, Algorithms for AI and NLP: Evaluating Classifiers Clustering

CHAPTER 4: CLUSTER ANALYSIS

Information Retrieval and Web Search Engines

Information Retrieval and Web Search Engines

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

Introduction to Data Mining

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

Cluster Analysis: Agglomerate Hierarchical Clustering

Unsupervised Learning

Clustering and Visualisation of Data

Unsupervised Learning and Clustering

Data Informatics. Seon Ho Kim, Ph.D.

Chapter 6: Cluster Analysis

Clustering: Overview and K-means algorithm

9/29/13. Outline Data mining tasks. Clustering algorithms. Applications of clustering in biology

Chapters 11 and 13, Graph Data Mining

Understanding Clustering Supervising the unsupervised

Clustering in Data Mining

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

Introduction to Computer Science

Clustering part II 1

Foundations of Machine Learning CentraleSupélec Fall Clustering Chloé-Agathe Azencot

CSE 494/598 Lecture-11: Clustering & Classification

Clustering Results. Result List Example. Clustering Results. Information Retrieval

Lecture on Modeling Tools for Clustering & Regression

DS504/CS586: Big Data Analytics Big Data Clustering Prof. Yanhua Li

Unsupervised Data Mining: Clustering. Izabela Moise, Evangelos Pournaras, Dirk Helbing

Unsupervised Learning and Clustering

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

Hierarchical Clustering

COSC 6397 Big Data Analytics. Fuzzy Clustering. Some slides based on a lecture by Prof. Shishir Shah. Edgar Gabriel Spring 2015.

Machine Learning (BSMC-GA 4439) Wenke Liu

Transcription:

7 Supervised learning vs unsupervised learning Unsupervised Learning Supervised learning: discover patterns in the data that relate data attributes with a target (class) attribute These patterns are then utilized to predict the values of the target attribute in future data instances Unsupervised learning: The data have no target attribute We want to eplore the data to find some intrinsic structures in them What is Cluster Analsis? Finding groups of objects in data 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 maimized Applications of Cluster Analsis Understanding Group related documents for browsing, group genes and proteins that have similar functionalit, or group stocks with similar price fluctuations Summarization Reduce the size of large data sets Tpes of Clusterings A clustering is a set of clusters Partitional Clustering Important distinction between hierarchical and partitional sets of clusters Partitional Clustering A division data objects into non-overlapping subsets (clusters) such that each data object is in eactl one subset Hierarchical clustering A set of nested clusters organized as a hierarchical tree A Partitional Clustering

7 Hierarchical Clustering Clustering Algorithms K-means and its variants p p p p Traditional Hierarchical Clustering p p p p Traditional Dendrogram Hierarchical clustering Densit-based clustering p p p p p p p p Non-traditional Hierarchical Clustering Non-traditional Dendrogram 7 K-means clustering K-means is a partitional clustering algorithm Let the set of data points (or instances) D be {,,, n }, where i = ( i, i,, ir ) is a vector in a real-valued space X R r, and r is the number of attributes (dimensions) in the data The k-means algorithm partitions the given data into k clusters Each cluster has a cluster center, called centroid k is specified b the user K-means Clustering Basic algorithm 9 Stopping/convergence criterion no (or minimum) re-assignments of data points to different clusters, no (or minimum) change of centroids, or minimum decrease in the sum of squared error (SSE), SSE k j C j dist(, m j ) C i is the jth cluster, m j is the centroid of cluster C j (the mean vector of all the data points in C j ), and dist(, m j ) is the distance between data point and centroid m j K-means Clustering Details Initial centroids are often chosen randoml Clusters produced var from one run to another The centroid is (tpicall) the mean of the points in the cluster Closeness is measured b Euclidean distance, cosine similarit, correlation, etc K-means will converge for common similarit measures mentioned above Most of the convergence happens in the first few iterations Often the stopping condition is changed to Until relativel few points change clusters Compleit is O( n * K * I * d ) n = number of points, K = number of clusters, I = number of iterations, d = number of attributes

7 Two different K-means Clusterings Importance of Choosing Initial Centroids Iteration - - - - - - - - - - - - Optimal Clustering - - - - Sub-optimal Clustering Importance of Choosing Initial Centroids Evaluating K-means Clusters Iteration - - - - Iteration Iteration - - - - Iteration Iteration - - - - Iteration Most common measure is Sum of Squared Error (SSE) For each point, the error is the distance to the nearest cluster SSE k j C j dist(, m j ) Given two clusters, we can choose the one with the smallest error One eas wa 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 - - - - - - - - - - - - Importance of Choosing Initial Centroids Importance of Choosing Initial Centroids Iteration Iteration Iteration - - - - - - - - Iteration Iteration Iteration - - - - - - - - - - - - - - - - 7

7 Problems with Selecting Initial Clusters Eample If there are K real clusters then the chance of selecting one centroid from each cluster is small Chance is relativel small when K is large If clusters are the same size, n, then Iteration For eample, if K =, then probabilit =!/ = Sometimes the initial centroids will readjust themselves in right wa, and sometimes the don t Consider an eample of five pairs of clusters - - - Starting with two initial centroids in one cluster of each pair of clusters 9 Clusters Eample Clusters Eample Iteration Iteration Iteration - - - - - - Iteration - - Iteration - - - - - - - Starting with two initial centroids in one cluster of each pair of clusters Starting with some pairs of clusters having three initial centroids, while other have onl one Clusters Eample Iteration - - - Iteration - - - Iteration - - - Iteration - - - Starting with some pairs of clusters having three initial centroids, while other have onl one Solutions to Initial Centroids Problem Multiple runs Helps, but probabilit is not on our 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 widel separated Postprocessing Bisecting K-means

7 Pre-processing and Post-processing Pre-processing Normalize the data (X norm = i min()/ma() min()) Eliminate outliers Post-processing Eliminate small clusters that ma represent outliers Split loose clusters, ie, clusters with relativel high SSE Merge clusters that are close and that have relativel low SSE Can use these steps during the clustering process ISODATA- ISODATA is a method of unsupervised classification 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 Limitations of K-means: Differing Sizes Limitations of K-means: Differing Densit K-means ( Clusters) K-means ( Clusters) 7 Limitations of K-means: Non-globular Shapes Overcoming K-means Limitations K-means ( Clusters) K-means Clusters One solution is to use man clusters Find parts of clusters, but need to put together 9

7 Overcoming K-means Limitations Overcoming K-means Limitations K-means Clusters K-means Clusters 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 Strengths of Hierarchical Clustering Do not have to assume an particular number of clusters An desired number of clusters can be obtained b cutting the dendogram at the proper level The ma correspond to meaningful taonomies Eample in biological sciences (eg, animal kingdom, phlogen reconstruction, ) Hierarchical Clustering Agglomerative Clustering Algorithm Two main tpes of hierarchical clustering Agglomerative: Start with the points as individual clusters At each step, merge the closest pair of clusters until onl 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 similarit or distance matri Merge or split one cluster at a time More popular hierarchical clustering technique Basic algorithm is straightforward Compute the proimit matri Let each data point be a cluster Repeat Merge the two closest clusters Update the proimit matri Until onl a single cluster remains Ke operation is the computation of the proimit of two clusters Different approaches to defining the distance between clusters distinguish the different algorithms

7 Starting Situation Start with clusters of individual points and a proimit matri p p p p p p p p p p Proimit Matri Intermediate Situation After some merging steps, we have some clusters C C C C C C C C C C C C Proimit Matri C C C p p p p p9 p p p 7 p p p p p9 p p p Intermediate Situation We want to merge the two closest clusters (C and C) and update the proimit matri C C C C C C C Proimit Matri C C C C C C After Merging The question is How do we update the proimit matri? C C C C C U C C C C C U C??????? C C Proimit Matri C C p p p p p9 p p p 9 C U C p p p p p9 p p p How to Define Inter-Cluster Similarit How to Define Inter-Cluster Similarit p p p p p p p p p p Similarit? p p p p p p MIN MAX Group Average Distance Between Centroids Other methods driven b an objective function Ward s Method uses squared error p p Proimit Matri MIN MAX Group Average Distance Between Centroids Other methods driven b an objective function Ward s Method uses squared error p p Proimit Matri 7

7 How to Define Inter-Cluster Similarit How to Define Inter-Cluster Similarit p p p p p p p p p p MIN MAX Group Average Distance Between Centroids Other methods driven b an objective function Ward s Method uses squared error p p p p p Proimit Matri MIN MAX Group Average Distance Between Centroids Other methods driven b an objective function Ward s Method uses squared error p p p p p Proimit Matri How to Define Inter-Cluster Similarit MIN MAX Group Average Distance Between Centroids Other methods driven b an objective function Ward s Method uses squared error p p p p p p p p p p Proimit Matri Cluster Similarit: MIN or Single Link Similarit of two clusters is based on the two most similar (closest) points in the different clusters Determined b one pair of points, ie, b one link in the proimit graph I I I I I I 9 I 9 7 I 7 I I Hierarchical Clustering: MIN Strength of MIN Two Clusters Nested Clusters Dendrogram Can handle non-elliptical shapes 7

7 Limitations of MIN Cluster Similarit: MAX or Complete Linkage Similarit of two clusters is based on the two least similar (most distant) points in the different clusters Determined b all pairs of points in the two clusters Sensitive to noise and outliers Two Clusters I I I I I I 9 I 9 7 I 7 I I 9 Strength of MAX Limitations of MAX Two Clusters Two Clusters Less susceptible to noise and outliers Tends to break large clusters Biased towards globular clusters (globular -- küresel) Cluster Similarit: Group Average Proimit of two clusters is the average of pairwise proimit between points in the two clusters pi Cluster i p Cluster proimit(p,p ) j j proimit(cluster i,clusterj ) Cluster Cluster Need to use average connectivit for scalabilit since total proimit favors large clusters I I I I I I 9 I 9 7 I 7 I I i i j j Hierarchical Clustering: Group Average Nested Clusters Dendrogram 9

7 Hierarchical Clustering: Group Average Compromise between Single and Complete Link Strengths Less susceptible to noise and outliers Limitations Biased towards globular (küresel) clusters Cluster Similarit: Ward s Method Similarit of two clusters is based on the increase in squared error when two clusters are merged Similar to group average if distance between points is distance squared Less susceptible to noise and outliers Biased towards globular clusters Hierarchical analogue of K-means Can be used to initialize K-means Cluster Validit For supervised classification we have a variet of measures to evaluate how good our model is Accurac, precision, recall For cluster analsis, the analogous question is how to evaluate the goodness of the resulting clusters? But clusters are in the ee of the beholder! Clusters found in Random Data Random 9 7 9 7 DBSCAN Then wh do we want to evaluate them? To avoid finding patterns in noise To compare clustering algorithms To compare two sets of clusters To compare two clusters K-means 9 7 9 7 Complete Link 7 Different Aspects of Cluster Validation Determining the clustering tendenc of a set of data, ie, distinguishing whether non-random structure actuall eists in the data Comparing the results of a cluster analsis to eternall known results, eg, to eternall given class labels Evaluating how well the results of a cluster analsis fit the data without reference to eternal information - Use onl the data Comparing the results of two different sets of cluster analses to determine which is better Determining the correct number of clusters For,, and, we can further distinguish whether we want to evaluate the entire clustering or just individual clusters Measures of Cluster Validit Numerical measures that are applied to judge various aspects of cluster validit, are classified into the following three tpes Eternal Inde: Used to measure the etent to which cluster labels match eternall supplied class labels Entrop Internal Inde: Used to measure the goodness of a clustering structure without respect to eternal information Sum of Squared Error (SSE) Relative Inde: Used to compare two different clusterings or clusters Often an eternal or internal inde is used for this function, eg, SSE or entrop Sometimes these are referred to as criteria instead of indices However, sometimes criterion is the general strateg and inde is the numerical measure that implements the criterion 9

7 Measuring Cluster Validit Via Correlation Two matrices Proimit Matri (Yakınlık matrisi) Incidence Matri (Tekrar Oranı Matrisi) One row and one column for each data point An entr is if the associated pair of points belong to the same cluster An entr is if the associated pair of points belongs to different clusters Compute the correlation between the two matrices Since the matrices are smmetric, onl the correlation between n(n-) / entries needs to be calculated High correlation indicates that points that belong to the same cluster are close to each other Not a good measure for some densit or contiguit based clusters Measuring Cluster Validit Via Correlation Correlation of incidence and proimit matrices for the K-means clusterings of the following two data sets 9 7 9 7 Corr = -9 Corr = - Using Similarit Matri for Cluster Validation Order the similarit matri with respect to cluster labels and inspect visuall Using Similarit Matri for Cluster Validation Clusters in random data are not so crisp 9 9 9 9 7 7 7 7 7 7 9 9 Similarit Similarit DBSCAN Using Similarit Matri for Cluster Validation Clusters in random data are not so crisp Using Similarit Matri for Cluster Validation Clusters in random data are not so crisp 9 9 9 9 7 7 7 7 7 7 9 9 Similarit Similarit K-means Complete Link

SSE 7 Using Similarit Matri for Cluster Validation 7 DBSCAN 9 7 7 Internal Measures: Cohesion and Separation Cluster Cohesion: Measures how closel related are objects in a cluster Eample: SSE Cluster Separation: Measure how distinct or wellseparated a cluster is from other clusters Eample: Squared Error Cohesion is measured b the within cluster sum of squares (SSE) WSS ( mi ) i C i Separation is measured b the between cluster sum of squares BSS C ( m i m i i Where C i is the size of cluster i ) Hierarchical Clustering: Comparison Internal Measures: SSE MIN MAX Ward s Method Group Average Clusters in more complicated figures aren t well separated Internal Inde: Used to measure the goodness of a clustering structure without respect to eternal information SSE SSE is good for comparing two clusterings or two clusters (average SSE) Can also be used to estimate the number of clusters - - 9 7 9 - K 7 Internal Measures: SSE SSE curve for a more complicated data set 7 SSE of clusters found using K-means 7