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

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

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

Clustering fundamentals

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

Cluster Analysis: Basic Concepts and Algorithms

Clustering Basic Concepts and Algorithms 1

Lecture Notes for Chapter 8. Introduction to Data Mining

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

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

Data Mining. 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 7. Introduction to Data Mining, 2 nd Edition

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

What is Cluster Analysis?

Clustering Part 2. A Partitional Clustering

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

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

Unsupervised Learning : Clustering

University of Florida CISE department Gator Engineering. Clustering Part 2

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

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

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

Clustering CS 550: Machine Learning

Introduction to Clustering

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

Data Mining: Clustering

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

Cluster analysis. Agnieszka Nowak - Brzezinska

CSE 5243 INTRO. TO DATA MINING

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

Introduction to Data Mining. Komate AMPHAWAN

Cluster Analysis. Ying Shen, SSE, Tongji University

Cluster Analysis: Basic Concepts and Algorithms

MIS2502: Data Analytics Clustering and Segmentation. Jing Gong

数据挖掘 Introduction to Data Mining

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

CS7267 MACHINE LEARNING

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

DATA MINING LECTURE 1. Introduction

Unsupervised Learning

CSE 5243 INTRO. TO DATA MINING

CSE 494/598 Lecture-11: Clustering & Classification

CSE 347/447: DATA MINING

Hierarchical clustering

Gene Clustering & Classification

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

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

ECLT 5810 Clustering

Clustering Lecture 3: Hierarchical Methods

ECLT 5810 Clustering

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

Online Social Networks and Media. Community detection

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

Clustering. Supervised vs. Unsupervised Learning

Introduction to Data Mining

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

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

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

6.867 Machine learning

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

INF4820, Algorithms for AI and NLP: Evaluating Classifiers Clustering

Data Mining Concepts & Techniques

A Comparison of Document Clustering Techniques

Clustering Part 3. Hierarchical Clustering

Clustering Part 4 DBSCAN

Hierarchical Clustering 4/5/17

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

CSE 5243 INTRO. TO DATA MINING

6.867 Machine learning

Unsupervised Learning I: K-Means Clustering

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

University of Florida CISE department Gator Engineering. Clustering Part 4

Clustering: Overview and K-means algorithm

Clustering: Overview and K-means algorithm

Information Retrieval and Web Search Engines

Clustering in Data Mining

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

Clustering Part 1. CSC 4510/9010: Applied Machine Learning. Dr. Paula Matuszek

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

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

University of Florida CISE department Gator Engineering. Clustering Part 5

Data Mining Algorithms

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

Cluster Analysis. CSE634 Data Mining

INF4820 Algorithms for AI and NLP. Evaluating Classifiers Clustering

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

INF4820 Algorithms for AI and NLP. Evaluating Classifiers Clustering

Clust Clus e t ring 2 Nov

Administrative. Machine learning code. Supervised learning (e.g. classification) Machine learning: Unsupervised learning" BANANAS APPLES

Clustering part II 1

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

CHAPTER 4: CLUSTER ANALYSIS

Cluster Analysis: Agglomerate Hierarchical Clustering

Data Warehousing and Machine Learning

Road map. Basic concepts

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

Information Retrieval and Web Search Engines

Clustering. Chapter 10 in Introduction to statistical learning

Transcription:

Data Mining Cluster Analsis: Basic Concepts and Algorithms Lecture Notes for Chapter Introduction to Data Mining b Tan, Steinbach, Kumar What is Cluster Analsis? 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) the objects in other groups Intra-cluster distances are minimized Inter-cluster distances are maimized Tan,Steinbach, Kumar Introduction to Data Mining // Tan,Steinbach, Kumar Introduction to Data Mining // Applications of Cluster Analsis What is not 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 Supervised classification Have class label information. Clustering is also called unsupervised classification. Simple segmentation Dividing students into different registration groups alphabeticall, b last name. Clustering precipitation in Australia Tan,Steinbach, Kumar Introduction to Data Mining // Tan,Steinbach, Kumar Introduction to Data Mining // Notion of a Cluster can be Ambiguous Tpes of Clusterings How man clusters? Two Clusters Si Clusters Four Clusters A clustering is a set of clusters Important distinction between hierarchical and partitional sets of clusters Partitional Clustering A division of 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 Tan,Steinbach, Kumar Introduction to Data Mining // Tan,Steinbach, Kumar Introduction to Data Mining //

Partitional Clustering Hierarchical Clustering p p p p p p p p Hierarchical Clustering Dendrogram A Partitional Clustering Tan,Steinbach, Kumar Introduction to Data Mining // 7 Tan,Steinbach, Kumar Introduction to Data Mining // Other Distinctions Between Sets of Clusters Eclusive versus non-eclusive In non-eclusive clusterings, points ma belong to multiple clusters. Can represent multiple classes or border points Fuzz versus non-fuzz In fuzz clustering, a point belongs to ever cluster with some weight between and Weights must sum to Probabilistic clustering has similar characteristics Partial versus complete In some cases, we onl want to cluster some of the data Heterogeneous versus homogeneous Cluster of widel different sizes, shapes, and densities Tpes of Clusters Well-separated clusters Center-based clusters Contiguous clusters Densit-based clusters Propert or Conceptual Described b an Objective Function Tan,Steinbach, Kumar Introduction to Data Mining // 9 Tan,Steinbach, Kumar Introduction to Data Mining // Tpes of Clusters: Well-Separated Well-Separated Clusters: A cluster is a set of points such that an point in a cluster is closer (or more similar) to ever other point in the cluster than to an point not in the cluster. Tpes of Clusters: Center-Based Center-based A cluster is a set of objects such that an object in a cluster is closer (more similar) to the center of a cluster, than to the center of an other cluster The center of a cluster is often a centroid, the average of all the points in the cluster, or a medoid, the most representative point of a cluster well-separated clusters center-based clusters Tan,Steinbach, Kumar Introduction to Data Mining // Tan,Steinbach, Kumar Introduction to Data Mining //

Tpes of Clusters: Contiguit-Based Contiguous Cluster (Nearest neighbor or Transitive) A cluster is a set of points such that a point in a cluster is closer (or more similar) to one or more other points in the cluster than to an point not in the cluster. Tpes of Clusters: Densit-Based Densit-based A cluster is a dense region of points, which is separated b low-densit regions, from other regions of high densit. Used when the clusters are irregular or intertwined, and when noise and outliers are present. contiguous clusters densit-based clusters Tan,Steinbach, Kumar Introduction to Data Mining // Tan,Steinbach, Kumar Introduction to Data Mining // Tpes of Clusters: Conceptual Clusters Shared Propert or Conceptual Clusters Finds clusters that share some common propert or represent a particular concept.. Overlapping Rings Tpes of Clusters: Objective Function Clusters Defined b an Objective Function Finds clusters that minimize or maimize an objective function. Enumerate all possible was of dividing the points into clusters and evaluate the qualit of each potential set of clusters b using the given objective function. (NP Hard) Can have global or local objectives. Hierarchical clustering algorithms tpicall have local objectives Partitioning algorithms tpicall have global objectives A variation of the global objective function approach is to fit the data to a parameterized model. Parameters for the model are determined from the data. Miture models assume that the data is a miture' of a number of probabilit distributions. Tan,Steinbach, Kumar Introduction to Data Mining // Tan,Steinbach, Kumar Introduction to Data Mining // Clustering Algorithms K-means and its variants Hierarchical clustering Densit-based clustering K-means Clustering Partitioning 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 ver simple Tan,Steinbach, Kumar Introduction to Data Mining // 7 Tan,Steinbach, Kumar Introduction to Data Mining //

K-means Clustering Details Eample: Old Faithful 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, Manhattan 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 Tan,Steinbach, Kumar Introduction to Data Mining // 9 Tan,Steinbach, Kumar Introduction to Data Mining // Eample: Old Faithful Two different K-means Clusterings (a) (b) (c) (d)... (e) (f) (g) (h) - -. - -..... (i).... - -. - -... Optimal Clustering - -. - -... Sub-optimal Clustering Tan,Steinbach, Kumar Introduction to Data Mining // Tan,Steinbach, Kumar Introduction to Data Mining // Importance of Choosing Initial Centroids Importance of Choosing Initial Centroids. Iteration. Iteration. Iteration Iteration....... - -. - -... - -. - -... - -. - -.... Iteration Iteration Iteration.......... - -. - -... - -. - -... - -. - -... - -. - -... Tan,Steinbach, Kumar Introduction to Data Mining // Tan,Steinbach, Kumar Introduction to Data Mining //

Importance of Choosing Initial Centroids Importance of Choosing Initial Centroids. Iteration. Iteration Iteration...... - -. - -... - -. - -... Iteration Iteration Iteration.......... - -. - -... - -. - -... - -. - -... - -. - -... Tan,Steinbach, Kumar Introduction to Data Mining // Tan,Steinbach, Kumar Introduction to Data Mining // Evaluating K-means Clusters K-means: Eample 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= C i dist ( m, ) is a data point in cluster C i and m i is the representative point for cluster C i can show that m i corresponds to the center (mean) of the cluster Given two clusterings, we 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 (due to local minima). i obj - - C () m () = m () = C () + C () + = = Tan,Steinbach, Kumar Introduction to Data Mining // 7 Tan,Steinbach, Kumar Introduction to Data Mining // K-means: Eample K-means: Eample d (,m ) = (-) + (-) = +9 = d (,m ) = (-) + (-) = +9 = d (,m ) = (-) + (--) = +9 = d (,m ) = (-) + (--) = +9 = 9 d (,m ) = (--) + (-) = d (,m ) = (--) + (-) = Assign to cluster Assign to cluster Assign to cluster obj - - C () C () C () d (,m ) = (-) + (-) = d (,m ) = (-) + (-) = Assign to cluster m () = + = m () = + = Tan,Steinbach, Kumar Introduction to Data Mining // 9 Tan,Steinbach, Kumar Introduction to Data Mining //

K-means: Eample Solution obtained obj - - C () C () C () Algorithm has converged because no reassignment have taken place. - - - Tan,Steinbach, Kumar Introduction to Data Mining // Tan,Steinbach, Kumar Introduction to Data Mining // K-means: Eample Problems with Selecting Initial Points obj - - C () C () C () 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 What happens if we start from this initial assignment? Calculate m () and m () and the resulting C (). 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 Tan,Steinbach, Kumar Introduction to Data Mining // Tan,Steinbach, Kumar Introduction to Data Mining // Clusters Eample Clusters Eample Iteration Iteration Iteration - - - - Iteration Iteration - - - - - - Starting with two initial centroids in one cluster of each pair of clusters Tan,Steinbach, Kumar Introduction to Data Mining // Starting with two initial centroids in one cluster of each pair of clusters Tan,Steinbach, Kumar Introduction to Data Mining //

Clusters Eample Clusters Eample Iteration Iteration Iteration - - - - Iteration Iteration - - - - - - Starting with some pairs of clusters having three initial centroids, while other have onl one. Tan,Steinbach, Kumar Introduction to Data Mining // 7 Starting with some pairs of clusters having three initial centroids, while other have onl one. Tan,Steinbach, Kumar Introduction to Data Mining // 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 Not as susceptible to initialization issues Handling Empt Clusters Basic K-means algorithm can ield empt clusters Several strategies Choose the point that contributes most to SSE Choose a point from the cluster with the highest SSE If there are several empt clusters, the above can be repeated several times. Tan,Steinbach, Kumar Introduction to Data Mining // 9 Tan,Steinbach, Kumar Introduction to Data Mining // Updating Centers Incrementall In the basic K-means algorithm, centroids are updated after all points are assigned to a centroid An alternative is to update the centroids after each assignment (incremental approach) Each assignment updates zero or two centroids More epensive Introduces an order dependenc Never get an empt cluster Can use weights to change the impact Pre-processing and Post-processing Pre-processing Normalize the data Eliminate outliers Post-processing Eliminate small clusters that ma represent outliers Split loose clusters, i.e., clusters with relativel high SSE Merge clusters that are close and that have relativel low SSE Tan,Steinbach, Kumar Introduction to Data Mining // Tan,Steinbach, Kumar Introduction to Data Mining //

Bisecting K-means Bisecting K-means Eample Bisecting K-means algorithm Variant of K-means that can produce a partitional or a hierarchical clustering Tan,Steinbach, Kumar Introduction to Data Mining // Tan,Steinbach, Kumar Introduction to Data Mining // Limitations of K-means Limitations of K-means: Differing Sizes K-means has problems when clusters are of differing Sizes Densities Non-globular shapes K-means has problems when the data contains outliers. K-means ( Clusters) Tan,Steinbach, Kumar Introduction to Data Mining // Tan,Steinbach, Kumar Introduction to Data Mining // Limitations of K-means: Differing Densit Limitations of K-means: Non-globular Shapes K-means ( Clusters) K-means ( Clusters) Tan,Steinbach, Kumar Introduction to Data Mining // 7 Tan,Steinbach, Kumar Introduction to Data Mining //

Overcoming K-means Limitations 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. Tan,Steinbach, Kumar Introduction to Data Mining // 9 Tan,Steinbach, Kumar Introduction to Data Mining // Overcoming K-means Limitations K-means Clusters Tan,Steinbach, Kumar Introduction to Data Mining //