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

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

Clustering fundamentals

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/

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

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

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

Cluster Analysis: Basic Concepts and Algorithms

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

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

Clustering Basic Concepts and Algorithms 1

What is Cluster Analysis?

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

Clustering Part 2. A Partitional Clustering

Hierarchical Clustering

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

CSE 5243 INTRO. TO DATA MINING

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

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

Clustering Part 3. Hierarchical Clustering

Data Mining Concepts & Techniques

Cluster analysis. Agnieszka Nowak - Brzezinska

CSE 347/447: DATA MINING

CS7267 MACHINE LEARNING

Clustering CS 550: Machine Learning

CSE 5243 INTRO. TO DATA MINING

University of Florida CISE department Gator Engineering. Clustering Part 2

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

Hierarchical Clustering

Clustering Lecture 3: Hierarchical Methods

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

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)

Data Mining: Clustering

University of Florida CISE department Gator Engineering. Clustering Part 5

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

Unsupervised Learning

Gene Clustering & Classification

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

Data Mining: Introduction. Lecture Notes for Chapter 1. Introduction to Data Mining

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

Introduction to Data Mining. Komate AMPHAWAN

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

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

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

Online Social Networks and Media. Community detection

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

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

Clustering: Overview and K-means algorithm

Cluster Analysis: Basic Concepts and Algorithms

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

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

Road map. Basic concepts

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

MIS2502: Data Analytics Clustering and Segmentation. Jing Gong

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

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

INF4820, Algorithms for AI and NLP: Evaluating Classifiers Clustering

Clustering. Supervised vs. Unsupervised Learning

DATA MINING LECTURE 1. Introduction

INF4820, Algorithms for AI and NLP: Hierarchical Clustering

Information Retrieval and Web Search Engines

Information Retrieval and Web Search Engines

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

Based on Raymond J. Mooney s slides

Clustering: Overview and K-means algorithm

Unsupervised Learning and Clustering

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

Clustering in Data Mining

Introduction to Data Mining

CHAPTER 4: CLUSTER ANALYSIS

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

Cluster Analysis: Agglomerate Hierarchical Clustering

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

Unsupervised Learning

Clustering and Visualisation of Data

Data Informatics. Seon Ho Kim, Ph.D.

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

Chapters 11 and 13, Graph Data Mining

Understanding Clustering Supervising the unsupervised

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

University of Florida CISE department Gator Engineering. Clustering Part 4

Chapter 6: Cluster Analysis

Lecture on Modeling Tools for Clustering & Regression

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

Clustering (COSC 416) Nazli Goharian. Document Clustering.

Clustering COMS 4771

Unsupervised Learning and Clustering

Clustering Part 4 DBSCAN

Transcription:

// Supervised learning vs unsupervised learning Machine 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 Discovered Clusters Applied-Matl-DOWN,Ba-Network-Down,-COM-DOWN, Cabletron-Ss-DOWN,CISCO-DOWN,HP-DOWN, DSC-Comm-DOWN,INTEL-DOWN,LSI-Logic-DOWN, Micron-Tech-DOWN,Teas-Inst-Down,Tellabs-Inc-Down, Natl-Semiconduct-DOWN,Oracl-DOWN,SGI-DOWN, Sun-DOWN Apple-Comp-DOWN,Autodesk-DOWN,DEC-DOWN, ADV-Micro-Device-DOWN,Andrew-Corp-DOWN, Computer-Assoc-DOWN,Circuit-Cit-DOWN, Compaq-DOWN, EMC-Corp-DOWN, Gen-Inst-DOWN, Motorola-DOWN,Microsoft-DOWN,Scientific-Atl-DOWN Fannie-Mae-DOWN,Fed-Home-Loan-DOWN, MBNA-Corp-DOWN,Morgan-Stanle-DOWN Baker-Hughes-UP,Dresser-Inds-UP,Halliburton-HLD-UP, Louisiana-Land-UP,Phillips-Petro-UP,Unocal-UP, Schlumberger-UP Industr Group Technolog-DOWN Technolog-DOWN Financial-DOWN Oil-UP Clustering precipitation in Australia Tpes of Clusterings A clustering is a set of clusters Partitional Clustering (Bölümsel Kümeleme) 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

// Hierarchical Clustering (Hierarşik Kümeleme) 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), k SSE dist(, m C j) j 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

// 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

// 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

// Pre-processing and Post-processing Limitations of K-means Pre-processing Normalize the data Eliminate outliers Post-processing K-means has problems when clusters are of differing Sizes Densities Non-globular shapes 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 K-means has problems when the data contains outliers ISODATA 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

// 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

// Starting Situation Intermediate Situation Start with clusters of individual points and a proimit matri p p p p p p p p p p Proimit Matri 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

// 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

// 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 p p i Cluster i proimit( p,p ) j Cluster j proimit( Cluster,Cluster) i j Cluster i Cluster j 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 j Hierarchical Clustering: Group Average Nested Clusters Dendrogram 9

// 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

// 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 // 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 ) Etra Hierarchical Clustering: Comparison MIN MAX Group Average Ward s Method 9 7 Internal Measures: SSE 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 Internal Measures: SSE SSE curve for a more complicated data set 9 7 7 - - SSE of clusters found using K-means - K 7 7

Count // Framework for Cluster Validit Need a framework to interpret an measure For eample, if our measure of evaluation has the value,, is that good, fair, or poor? Statistics provide a framework for cluster validit The more atpical a clustering result is, the more likel it represents valid structure in the data Can compare the values of an inde that result from random data or clusterings to those of a clustering result If the value of the inde is unlikel, then the cluster results are valid These approaches are more complicated and harder to understand For comparing the results of two different sets of cluster analses, a framework is less necessar However, there is the question of whether the difference between two inde values is significant Statistical Framework for SSE Eample 9 7 Compare SSE of against three clusters in random data Histogram shows SSE of three clusters in sets of random data points of size distributed over the range for and values SSE 7 7 Statistical Framework for 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 = - 7