Data Mining for Knowledge Management. Clustering



Similar documents
Chapter 7. Cluster Analysis

Data Mining 5. Cluster Analysis

Data Mining Project Report. Document Clustering. Meryem Uzun-Per

Cluster Analysis. Isabel M. Rodrigues. Lisboa, Instituto Superior Técnico

Cluster Analysis: Basic Concepts and Methods

Data Mining. Session 9 Main Theme Clustering. Dr. Jean-Claude Franchitti

Data Mining 資 料 探 勘. 分 群 分 析 (Cluster Analysis)

CHAPTER 20. Cluster Analysis

Clustering. Clustering. What is Clustering? What is Clustering? What is Clustering? Types of Data in Cluster Analysis

Data Clustering Techniques Qualifying Oral Examination Paper

Clustering Artificial Intelligence Henry Lin. Organizing data into clusters such that there is

DATA MINING CLUSTER ANALYSIS: BASIC CONCEPTS

Data Mining: Concepts and Techniques. Jiawei Han. Micheline Kamber. Simon Fräser University К MORGAN KAUFMANN PUBLISHERS. AN IMPRINT OF Elsevier

. Learn the number of classes and the structure of each class using similarity between unlabeled training patterns

Chapter ML:XI (continued)

An Introduction to Cluster Analysis for Data Mining

Clustering and Outlier Detection

An Analysis on Density Based Clustering of Multi Dimensional Spatial Data

Medical Information Management & Mining. You Chen Jan,15, 2013 You.chen@vanderbilt.edu

Social Media Mining. Data Mining Essentials

Unsupervised learning: Clustering

Clustering. Adrian Groza. Department of Computer Science Technical University of Cluj-Napoca

Clustering. Danilo Croce Web Mining & Retrieval a.a. 2015/201 16/03/2016

Cluster Analysis: Basic Concepts and Algorithms

Cluster Analysis: Advanced Concepts

Data Mining. Cluster Analysis: Advanced Concepts and Algorithms

UNSUPERVISED MACHINE LEARNING TECHNIQUES IN GENOMICS

Example: Document Clustering. Clustering: Definition. Notion of a Cluster can be Ambiguous. Types of Clusterings. Hierarchical Clustering

Clustering. Data Mining. Abraham Otero. Data Mining. Agenda

How To Solve The Cluster Algorithm

Standardization and Its Effects on K-Means Clustering Algorithm

How To Cluster

Comparison and Analysis of Various Clustering Methods in Data mining On Education data set Using the weak tool

Robust Outlier Detection Technique in Data Mining: A Univariate Approach

Clustering methods for Big data analysis

On Clustering Validation Techniques

Clustering. Chapter Introduction to Clustering Techniques Points, Spaces, and Distances

Data Mining for Knowledge Management. Classification

A comparison of various clustering methods and algorithms in data mining

K-Means Cluster Analysis. Tan,Steinbach, Kumar Introduction to Data Mining 4/18/2004 1

Going Big in Data Dimensionality:

Distances, Clustering, and Classification. Heatmaps

Neural Networks Lesson 5 - Cluster Analysis

A Comparative Study of clustering algorithms Using weka tools

Clustering Techniques: A Brief Survey of Different Clustering Algorithms

Machine Learning using MapReduce

USING THE AGGLOMERATIVE METHOD OF HIERARCHICAL CLUSTERING AS A DATA MINING TOOL IN CAPITAL MARKET 1. Vera Marinova Boncheva

Dynamical Clustering of Personalized Web Search Results

Cluster Analysis Overview. Data Mining Techniques: Cluster Analysis. What is Cluster Analysis? What is Cluster Analysis?

Data Clustering Using Data Mining Techniques

Data Mining: An Overview. David Madigan

Data Preprocessing. Week 2

Principles of Data Mining by Hand&Mannila&Smyth

CLUSTERING LARGE DATA SETS WITH MIXED NUMERIC AND CATEGORICAL VALUES *

There are a number of different methods that can be used to carry out a cluster analysis; these methods can be classified as follows:

Unsupervised Data Mining (Clustering)

Clustering & Visualization

Data Exploration and Preprocessing. Data Mining and Text Mining (UIC Politecnico di Milano)

Data Mining Process Using Clustering: A Survey

PERFORMANCE ANALYSIS OF CLUSTERING ALGORITHMS IN DATA MINING IN WEKA

Introduction to Data Mining

Segmentation of stock trading customers according to potential value

Outlier Detection in Clustering

Comparision of k-means and k-medoids Clustering Algorithms for Big Data Using MapReduce Techniques

Cluster Analysis. Alison Merikangas Data Analysis Seminar 18 November 2009

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

A Two-Step Method for Clustering Mixed Categroical and Numeric Data

Extensions to the k-means Algorithm for Clustering Large Data Sets with Categorical Values

An Overview of Knowledge Discovery Database and Data mining Techniques

Cluster Analysis: Basic Concepts and Algorithms

Statistical Databases and Registers with some datamining

Chapter 4 Data Mining A Short Introduction. 2006/7, Karl Aberer, EPFL-IC, Laboratoire de systèmes d'informations répartis Data Mining - 1

ARTIFICIAL INTELLIGENCE (CSCU9YE) LECTURE 6: MACHINE LEARNING 2: UNSUPERVISED LEARNING (CLUSTERING)

SoSe 2014: M-TANI: Big Data Analytics

Data Mining Clustering (2) Sheets are based on the those provided by Tan, Steinbach, and Kumar. Introduction to Data Mining

Summary Data Mining & Process Mining (1BM46) Content. Made by S.P.T. Ariesen

Comparison of K-means and Backpropagation Data Mining Algorithms

Cluster analysis Cosmin Lazar. COMO Lab VUB

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

The SPSS TwoStep Cluster Component

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

DESCRIPTIVE STATISTICS. The purpose of statistics is to condense raw data to make it easier to answer specific questions; test hypotheses.

A Study of Web Log Analysis Using Clustering Techniques

A Survey of Clustering Techniques

Quality Assessment in Spatial Clustering of Data Mining

Information Management course

Chapter 3: Cluster Analysis

A Comparative Analysis of Various Clustering Techniques used for Very Large Datasets

BUSINESS ANALYTICS. Data Pre-processing. Lecture 3. Information Systems and Machine Learning Lab. University of Hildesheim.

A Survey of Clustering Algorithms for Big Data: Taxonomy & Empirical Analysis

A Distribution-Based Clustering Algorithm for Mining in Large Spatial Databases

Classification Techniques (1)

Data Mining Cluster Analysis: Advanced Concepts and Algorithms. Lecture Notes for Chapter 9. Introduction to Data Mining

Transcription:

Data Mining for Knowledge Management Clustering Themis Palpanas University of Trento http://disi.unitn.eu/~themis Data Mining for Knowledge Management Thanks for slides to: Jiawei Han Eamonn Keogh Jeff Ullman Data Mining for Knowledge Management

Roadmap. What is Cluster Analysis?. Types of Data in Cluster Analysis 3. A Categorization of Major Clustering Methods 4. Partitioning Methods 5. Hierarchical Methods 6. Density-Based Methods 7. Grid-Based Methods 8. Model-Based Methods 9. Clustering High-Dimensional Data 0. Constraint-Based Clustering. Summary Data Mining for Knowledge Management 3 What is Cluster Analysis? Cluster: a collection of data objects Similar to one another within the same cluster Dissimilar to the objects in other clusters Cluster analysis Finding similarities between data according to the characteristics found in the data and grouping similar data objects into clusters Data Mining for Knowledge Management 4

3 Eample: Clusters Data Mining for Knowledge Management 5 Eample: Clusters Data Mining for Knowledge Management 6

4 What is Cluster Analysis? Cluster: a collection of data objects Similar to one another within the same cluster Dissimilar to the objects in other clusters Cluster analysis Finding similarities between data according to the characteristics found in the data and grouping similar data objects into clusters Unsupervised learning: no predefined classes Typical applications As a stand-alone tool to get insight into data distribution As a preprocessing step for other algorithms Data Mining for Knowledge Management 7 Clustering: Rich Applications and Multidisciplinary Efforts Pattern Recognition Spatial Data Analysis Create thematic maps in GIS by clustering feature spaces Detect spatial clusters or for other spatial mining tasks Image Processing Economic Science (especially market research) WWW Document classification Cluster Weblog data to discover groups of similar access patterns Data Mining for Knowledge Management 8

5 Eamples of Clustering Applications Marketing: Help marketers discover distinct groups in their customer bases, and then use this knowledge to develop targeted marketing programs Land use: Identification of areas of similar land use in an earth observation database Insurance: Identifying groups of motor insurance policy holders with a high average claim cost City-planning: Identifying groups of houses according to their house type, value, and geographical location Earth-quake studies: Observed earth quake epicenters should be clustered along continent faults Data Mining for Knowledge Management 9 Quality: What Is Good Clustering? A good clustering method will produce high quality clusters with high intra-class similarity low inter-class similarity The quality of a clustering result depends on both the similarity measure used by the method and its implementation The quality of a clustering method is also measured by its ability to discover some or all of the hidden patterns Data Mining for Knowledge Management 0

6 Measure the Quality of Clustering Dissimilarity/Similarity metric: Similarity is epressed in terms of a distance function, typically metric: d(i, j) There is a separate quality function that measures the goodness of a cluster. The definitions of distance functions are usually very different for interval-scaled, boolean, categorical, ordinal ratio, vector, and string variables. Weights should be associated with different variables based on applications and data semantics. It is hard to define similar enough or good enough the answer is typically highly subjective. Data Mining for Knowledge Management Problems With Clustering Clustering in two dimensions looks easy. Clustering small amounts of data looks easy. And in most cases, looks are not deceiving. Data Mining for Knowledge Management

7 The Curse of Dimensionality Many applications involve not, but 0 or 0,000 dimensions. High-dimensional spaces look different: almost all pairs of points are at about the same distance. Eample: assume random points within a bounding bo, e.g., values between 0 and in each dimension. Data Mining for Knowledge Management 3 Eample: SkyCat A catalog of billion sky objects represents objects by their radiation in 9 dimensions (frequency bands). Problem: cluster into similar objects, e.g., galaies, nearby stars, quasars, etc. Sloan Sky Survey is a newer, better version. Data Mining for Knowledge Management 4

8 Eample: Clustering CD s (Collaborative Filtering) Intuitively: music divides into categories, and customers prefer a few categories. But what are categories really? Represent a CD by the customers who bought it. Similar CD s have similar sets of customers, and viceversa. Data Mining for Knowledge Management 5 The Space of CD s Think of a space with one dimension for each customer. Values in a dimension may be 0 or only. A CD s point in this space is (,,, k ), where i = iff the i th customer bought the CD. Compare with the shingle/signature matri: rows = customers; cols. = CD s. For Amazon, the dimension count is tens of millions. Data Mining for Knowledge Management 6

9 Eample: Clustering Documents Represent a document by a vector (,,, k ), where i = iff the i th word (in some order) appears in the document. It actually doesn t matter if k is infinite; i.e., we don t limit the set of words. Documents with similar sets of words may be about the same topic. Data Mining for Knowledge Management 7 Eample: Gene Sequences Objects are sequences of {C,A,T,G}. Distance between sequences is edit distance, the minimum number of inserts and deletes needed to turn one into the other. Note there is a distance, but no convenient space in which points live. Data Mining for Knowledge Management 8

0 Requirements of Clustering in Data Mining Scalability Ability to deal with different types of attributes Ability to handle dynamic data Discovery of clusters with arbitrary shape Minimal requirements for domain knowledge to determine input parameters Able to deal with noise and outliers Insensitive to order of input records High dimensionality Incorporation of user-specified constraints Interpretability and usability Data Mining for Knowledge Management 9 Roadmap. What is Cluster Analysis?. Types of Data in Cluster Analysis 3. A Categorization of Major Clustering Methods 4. Partitioning Methods 5. Hierarchical Methods 6. Density-Based Methods 7. Grid-Based Methods 8. Model-Based Methods 9. Clustering High-Dimensional Data 0. Constraint-Based Clustering. Summary Data Mining for Knowledge Management 0

Type of data in clustering analysis Interval-scaled variables Binary variables Categorical (or Nominal), ordinal, and ratio variables Variables of mied types Data Mining for Knowledge Management Interval-valued variables Standardize data Calculate the mean absolute deviation: s (... f n m m f f f f where m f n ( nf f f f... Calculate the standardized measurement (z-score) m if f zif s nf ). f Using mean absolute deviation is more robust than using standard deviation m ) Data Mining for Knowledge Management

Similarity and Dissimilarity Between Objects Distances are normally used to measure the similarity or dissimilarity between two data objects Some popular ones include: Minkowski distance: q d ( i, j) q (... ) i j i j ip jp where i = ( i, i,, ip ) and j = ( j, j,, jp ) are two p- dimensional data objects, and q is a positive integer q q Also, one can use weighted distance, parametric Pearson product moment correlation, or other dissimilarity measures Data Mining for Knowledge Management 3 Similarity and Dissimilarity Between Objects (Cont.) If q =, d is Manhattan distance d( i, j) i j i j... ip j p Data Mining for Knowledge Management 4

3 Data Mining for Knowledge Management 5 Similarity and Dissimilarity Between Objects (Cont.) Data Mining for Knowledge Management 6 Similarity and Dissimilarity Between Objects (Cont.) If q =, d is Manhattan distance If q =, d is Euclidean distance: )... ( ), ( p p j i j i j i j i d... ), ( p p j i j i j i j i d

4 Metric Distances Is distance d(i,j) a metric (or distance measure)? Data Mining for Knowledge Management 7 Metric Distances Is distance d(i,j) a metric (or distance measure)? Aioms of a distance measure d is a distance measure if it is a function from pairs of points to real numbers such that: d(i,j) 0 d(i,i) = 0 d(i,j) = d(j,i) d(i,j) d(i,k) + d(k,j) (triangle inequality) Data Mining for Knowledge Management 8

5 Binary Variables A contingency table for binary data Object i 0 sum Object j 0 a b c d a c b d sum a b c d p Data Mining for Knowledge Management 9 Binary Variables A contingency table for binary data Object i 0 sum Object j 0 a b c d a c b d sum a b c d p Distance measure for symmetric binary variables: d ( i, j) a b b c c d Data Mining for Knowledge Management 30

6 Binary Variables A contingency table for binary data Object i 0 sum Object j 0 a b c d a c b d sum a b c d p Distance measure for symmetric binary variables: Distance measure for asymmetric binary variables: d ( i, j) d ( i, j) b c a b c d b c a b c Data Mining for Knowledge Management 3 Binary Variables A contingency table for binary data Distance measure for symmetric binary variables: Distance measure for asymmetric binary variables: Jaccard coefficient (similarity measure for asymmetric binary variables): equals to: size of intersection over size of union (-sim Jaccard ) is a distance measure Object i d ( i, j) d ( i, j) b b Data Mining for Knowledge Management 3 0 sum a a sim Jaccard ( i, j) Object j 0 a c c b b d c c d b c a b c a a b d c sum a c p b d

7 Dissimilarity between Binary Variables Eample Name Gender Fever Cough Test- Test- Test-3 Test-4 Jack M Y N P N N N Mary F Y N P N P N Jim M Y P N N N N gender is a symmetric attribute the remaining attributes are asymmetric binary let the values Y and P be set to, and the value N be set to 0 then, if we only take into account the asymmetric variables: d( jack, mary ) 0 0 0.33 d( jack, jim) 0.67 d( jim, mary ) 0.75 Data Mining for Knowledge Management 33 Categorical (Nominal) Variables A generalization of the binary variable in that it can take more than states, e.g., red, yellow, blue, green Method : Simple matching m: # of matches, p: total # of variables d ( i, j) p p m Method : use a large number of binary variables creating a new binary variable for each of the M nominal states Data Mining for Knowledge Management 34

8 Ordinal Variables An ordinal variable can be discrete or continuous Order is important, e.g., rank Can be treated like interval-scaled replace if by their rank map the range of each variable onto [0, ] by replacing i-th object in the f-th variable by r if zif M compute the dissimilarity using methods for interval-scaled variables f r if {,..., M } f Data Mining for Knowledge Management 35 Ratio-Scaled Variables Ratio-scaled variable: a positive measurement on a nonlinear scale, approimately at eponential scale, such as Ae Bt or Ae -Bt Methods: treat them like interval-scaled variables not a good choice! (why? the scale can be distorted) apply logarithmic transformation y if = log( if ) treat them as continuous ordinal data treat their rank as intervalscaled Data Mining for Knowledge Management 36

9 Variables of Mied Types A database may contain all the si types of variables symmetric binary, asymmetric binary, categorical, ordinal, interval and ratio One may use a weighted formula to combine their effects d( i, j) p f ( f ) ( f ) ij ij ( f ) ij f is binary or nominal: d (f) ij = 0 if if = jf, or d (f) ij = otherwise f is interval-based: use the normalized distance f is ordinal or ratio-scaled compute ranks r if and if and treat z if as interval-scaled z r if M p f d Data Mining for Knowledge Management 37 f Vector Objects Vector objects: keywords in documents, gene features in microarrays, etc. Broad applications: information retrieval, biologic taonomy, etc. Cosine distance cosine distance is a distance measure A variant: Tanimoto coefficient epresses the ration of number of attributes shared by and y to the number of total attributes of and y Data Mining for Knowledge Management 38

0 String Objects string objects: words of a document, genes, etc. Edit distance number of inserts and deletes to change one string into another. edit distance is a distance measure eample: = abcde ; y = bcduve. Turn into y by deleting a, then inserting u and v after d. Edit-distance = 3. Data Mining for Knowledge Management 39 Roadmap. What is Cluster Analysis?. Types of Data in Cluster Analysis 3. A Categorization of Major Clustering Methods 4. Partitioning Methods 5. Hierarchical Methods 6. Density-Based Methods 7. Grid-Based Methods 8. Model-Based Methods 9. Clustering High-Dimensional Data 0. Constraint-Based Clustering. Summary Data Mining for Knowledge Management 40

Major Clustering Approaches (I) Partitioning approach: Construct various partitions and then evaluate them by some criterion, e.g., minimizing the sum of square errors Typical methods: k-means, k-medoids, CLARANS Hierarchical approach: Create a hierarchical decomposition of the set of data (or objects) using some criterion Typical methods: Diana, Agnes, BIRCH, ROCK, CAMELEON Density-based approach: Based on connectivity and density functions Typical methods: DBSACN, OPTICS, DenClue Data Mining for Knowledge Management 4 Major Clustering Approaches (II) Grid-based approach: based on a multiple-level granularity structure Typical methods: STING, WaveCluster, CLIQUE Model-based: A model is hypothesized for each of the clusters and tries to find the best fit of that model to each other Typical methods: EM, SOM, COBWEB Frequent pattern-based: Based on the analysis of frequent patterns Typical methods: pcluster User-guided or constraint-based: Clustering by considering user-specified or application-specific constraints Typical methods: COD (obstacles), constrained clustering Data Mining for Knowledge Management 4

Typical Alternatives to Calculate the Distance between Clusters Single link: smallest distance between an element in one cluster and an element in the other, i.e., dis(k i, K j ) = min(t ip, t jq ) Complete link: largest distance between an element in one cluster and an element in the other, i.e., dis(k i, K j ) = ma(t ip, t jq ) Average: avg distance between an element in one cluster and an element in the other, i.e., dis(k i, K j ) = avg(t ip, t jq ) Centroid: distance between the centroids of two clusters, i.e., dis(k i, K j ) = dis(c i, C j ) Medoid: distance between the medoids of two clusters, i.e., dis(k i, K j ) = dis(m i, M j ) Medoid: one chosen, centrally located object in the cluster Data Mining for Knowledge Management 43 Centroid, Radius and Diameter of a Cluster (for numerical data sets) Centroid: the middle of a cluster C m N ( tip ) i N Radius: square root of average distance from any point of the cluster to its centroid Diameter: square root of average mean squared distance between all pairs of points in the cluster R m D m N i ( t ip N N i c m ) N ( t i ip N( N ) t iq ) Data Mining for Knowledge Management 44

Roadmap. What is Cluster Analysis?. Types of Data in Cluster Analysis 3. A Categorization of Major Clustering Methods 4. Partitioning Methods 5. Hierarchical Methods 6. Density-Based Methods 7. Grid-Based Methods 8. Model-Based Methods 9. Clustering High-Dimensional Data 0. Constraint-Based Clustering. Summary Data Mining for Knowledge Management 45 Partitioning Algorithms: Basic Concept Partitioning method: Construct a partition of a database D of n objects into a set of k clusters, s.t., min sum of squared distance k m t Km( Cm tmi) Given a k, find a partition of k clusters that optimizes the chosen partitioning criterion Global optimal: ehaustively enumerate all partitions Heuristic methods: k-means and k-medoids algorithms mi k-means (MacQueen 67): Each cluster is represented by the center of the cluster k-medoids or PAM (Partition around medoids) (Kaufman & Rousseeuw 87): Each cluster is represented by one of the objects in the cluster Data Mining for Knowledge Management 46 3

4 The K-Means Clustering Method. Decide on a value for k.. Initialize the k cluster centers (randomly, if necessary). 3. Decide the class memberships of the N objects by assigning them to the nearest cluster center. 4. Re-estimate the k cluster centers, by assuming the memberships found above are correct. 5. If none of the N objects changed membership in the last iteration, eit. Otherwise goto 3. Data Mining for Knowledge Management 47 The K-Means Clustering Method Eample 0 9 8 7 6 5 4 3 0 0 3 4 5 6 7 8 9 0 Assign each objects to most similar center 0 9 8 7 6 5 4 3 0 0 3 4 5 6 7 8 9 0 Update the cluster means 0 9 8 7 6 5 4 3 0 0 3 4 5 6 7 8 9 0 reassign K= Arbitrarily choose K object as initial cluster center reassign 0 9 8 7 6 5 4 3 0 0 3 4 5 6 7 8 9 0 Update the cluster means 0 9 8 7 6 5 4 3 0 0 3 4 5 6 7 8 9 0 Data Mining for Knowledge Management 48

Comments on the K-Means Method Strength: Relatively efficient: O(tkn), where n is # objects, k is # clusters, and t is # iterations. Normally, k, t << n. Comparing: PAM: O(k(n-k) ), CLARA: O(ks + k(n-k)) Comment: Often terminates at a local optimum. The global optimum may be found using techniques such as: deterministic annealing and genetic algorithms Weakness Applicable only when mean is defined, then what about categorical data? Need to specify k, the number of clusters, in advance Unable to handle noisy data and outliers Not suitable to discover clusters with non-conve shapes Data Mining for Knowledge Management 55 Variations of the K-Means Method A few variants of the k-means which differ in Selection of the initial k means Dissimilarity calculations Strategies to calculate cluster means Handling categorical data: k-modes (Huang 98) Replacing means of clusters with modes Using new dissimilarity measures to deal with categorical objects Using a frequency-based method to update modes of clusters A miture of categorical and numerical data: k-prototype method Data Mining for Knowledge Management 56 5

6 What Is the Problem of the K-Means Method? The k-means algorithm is sensitive to outliers! Since an object with an etremely 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. 0 9 8 7 6 5 4 3 0 0 3 4 5 6 7 8 9 0 0 9 8 7 6 5 4 3 0 0 3 4 5 6 7 8 9 0 Data Mining for Knowledge Management 57 The K-Medoids Clustering Method Find representative objects, called medoids, in clusters PAM (Partitioning Around Medoids, 987) starts from an initial set of medoids and iteratively replaces one of the medoids by one of the non-medoids if it improves the total distance of the resulting clustering PAM works effectively for small data sets, but does not scale well for large data sets CLARA (Kaufmann & Rousseeuw, 990) CLARANS (Ng & Han, 994): Randomized sampling Focusing + spatial data structure (Ester et al., 995) Data Mining for Knowledge Management 58