Example: air traffic controller

15-381 Artificial Intelligence Henry Lin

1 Clustering15-381 Artificial IntelligenceHenry LinModified from excellent slides of Eamonn Keogh, Ziv Bar-Joseph, and Andrew Moore Organizing data into clusterssuch that there is high intra-cluster similarity low inter-cluster similarity Informally, finding natural groupings among objects. Why do we want to do that? Any REAL application?What is clustering ?What is clustering ?2 Example: clustyExample: clustering genes Microarrays measures the activities of all genes in different conditions clustering genes provide a lot of information about the genes An early killer application in this area The most cited (7,812) paper in PNAS!3 Why clustering ? Organizing data into clusters shows internal structure of the data Ex.

3 Why clustering? • Organizing data into clusters shows internal structure of the data – Ex. Clusty and clustering genes above • Sometimes the partitioning is the goal

Tags:

  Clustering

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of 15-381 Artificial Intelligence Henry Lin

1 1 Clustering15-381 Artificial IntelligenceHenry LinModified from excellent slides of Eamonn Keogh, Ziv Bar-Joseph, and Andrew Moore Organizing data into clusterssuch that there is high intra-cluster similarity low inter-cluster similarity Informally, finding natural groupings among objects. Why do we want to do that? Any REAL application?What is clustering ?What is clustering ?2 Example: clustyExample: clustering genes Microarrays measures the activities of all genes in different conditions clustering genes provide a lot of information about the genes An early killer application in this area The most cited (7,812) paper in PNAS!3 Why clustering ? Organizing data into clusters shows internal structure of the data Ex.

2 Clusty and clustering genes above Sometimes the partitioning is the goal Ex. Market segmentation Prepare for other AI techniques Ex. Summarize news (cluster and then find centroid) Techniques for clustering is useful in knowledge discovery in data Ex. Underlying rules, reoccurring patterns, topics, Motivation Distance measure Hierarchical clustering Partitional clustering K-means Gaussian Mixture Models Number of clusters4 What is a natural grouping among these objects?What is a natural grouping among these objects?School EmployeesSimpson's FamilyMalesFemalesClustering is subjectiveClustering is subjectiveWhat is a natural grouping among these objects?What is a natural grouping among these objects?

3 5 What is Similarity?What is Similarity?The quality or state of being similar; likeness; resemblance; as, a similarity of is hard to define, We know it when we see it The real meaning of similarity is a philosophical question. We will take a more pragmatic approach. Webster's DictionaryDefining Distance MeasuresDefining Distance MeasuresDefinition: Let O1and O2be two objects from the universe of possible objects. The distance (dissimilarity) between O1and O2is a real number denoted by D(O1,O2) properties should a distance measure have?What properties should a distance measure have? D(A,B) = D(B,A)Symmetry D(A,B) = 0 iif A = BConstancy of Self-Similarity D(A,B) 0 Positivity D(A,B) D(A,C) + D(B,C)Triangular Inequality3d('', '') = 0 d(s, '') = d('', d('', '') = 0 d(s, '') = d('', d('', '') = 0 d(s, '') = d('', d('', '') = 0 d(s, '') = d('', s) = |s| s) = |s| s) = |s| s) = |s| length length length length of s d(s1+ch1, of s d(s1+ch1, of s d(s1+ch1, of s d(s1+ch1, s2+ch2) = min( d(s1, s2+ch2) = min( d(s1, s2+ch2) = min( d(s1, s2+ch2) = min( d(s1, s2) + if ch1=ch2 then s2) + if ch1=ch2 then s2) + if ch1=ch2 then s2) + if ch1=ch2 then 0 else 1 fi, d(s1+ch1, 0 else 1 fi, d(s1+ch1, 0 else 1 fi, d(s1+ch1, 0 else 1 fi, d(s1+ch1, s2) + 1, d(s1, s2))))))))

4 + 1, d(s1, s2) + 1, d(s1, s2) + 1, d(s1, ssss2+ch2) 2+ch2) 2+ch2) 2+ch2) + 1 ) + 1 ) + 1 ) + 1 ) Inside these black boxes: some function on two variables (might be simple or very complex)gene2gene1 Outline Motivation Distance measure Hierarchical clustering Partitional clustering K-means Gaussian Mixture Models Number of clusters7 Two Types of ClusteringTwo Types of ClusteringHierarchicalHierarchical Partitional algorithms:Construct various partitions and then evaluate them by some criterion (we will see an example called BIRCH) Hierarchical algorithms:Create a hierarchical decomposition of the set of objects using some criterionPartitionalPartitionalDesirable Properties of a clustering AlgorithmDesirable Properties of a clustering Algorithm Scalability (in terms of both time and space)

5 Ability to deal with different data types Minimal requirements for domain knowledge to determine input parameters Able to deal with noise and outliers Insensitive to order of input records Incorporation of user-specified constraints Interpretability and usability8A Useful Tool for Summarizing Similarity MeasurementsA Useful Tool for Summarizing Similarity MeasurementsIn order to better appreciate and evaluate the examples given in the early part of this talk, we will now introduce the BranchTerminal BranchLeafInternal NodeRootInternal BranchTerminal BranchLeafInternal NodeThe similarity between two objects in a dendrogram is represented as the height of the lowest internal node they & EconomyB2 BFinanceShoppingJobsAerospace Banking ApparelCareer Workspace Note that hierarchies are commonly used to organize information, for example in a web s hierarchy is manually created, we will focus on automatic creation of hierarchies in data can look at the dendrogram to determine the correct number of clusters.

6 In this case, the two highly separated subtrees are highly suggestive of two clusters. (Things are rarely this clear cut, unfortunately)OutlierOne potential use of a dendrogram is to detect outliersOne potential use of a dendrogram is to detect outliersThe single isolated branch is suggestive of a data point that is very different to all others10(How-to) Hierarchical ClusteringThe number of dendrograms with nleafs = (2n-3)!/[(2(n -2)) (n -2)!]Number Number of Possibleof LeafsDendrograms ,459,425 Since we cannot test all possible trees we will have to heuristic search of all possible trees. We could do (agglomerative):Starting with each item in its own cluster, find the best pair to merge into a new cluster.

7 Repeat until all clusters are fused together. Top-Down (divisive):Starting with all the data in a single cluster, consider every possible way to divide the cluster into two. Choose the best division and recursively operate on both ( , ) = 8D( , ) = 1We begin with a distance matrix which contains the distances between every pair of objects in our (Up (agglomerativeagglomerative):):Starting with each item in its own cluster, find the best pair to merge into a new cluster. Repeat until all clusters are fused together..Consider all possible the bestBottomBottom--Up (Up (agglomerativeagglomerative):):Starting with each item in its own cluster, find the best pair to merge into a new cluster.

8 Repeat until all clusters are fused together..Consider all possible the bestConsider all possible the best12 BottomBottom--Up (Up (agglomerativeagglomerative):):Starting with each item in its own cluster, find the best pair to merge into a new cluster. Repeat until all clusters are fused together..Consider all possible the bestConsider all possible the bestConsider all possible the (Up (agglomerativeagglomerative):):Starting with each item in its own cluster, find the best pair to merge into a new cluster. Repeat until all clusters are fused together..Consider all possible the bestConsider all possible the bestConsider all possible the criteria: Single Link cluster similarity = similarity of two mostsimilar members-Potentially long and skinny clustersHierarchical: Complete Link cluster similarity = similarity of two leastsimilar members+tight clusters14 Hierarchical.

9 Average Link cluster similarity = average similarity of all pairsthe most widely used similarity measureRobust against noise29 2 611 917101324252620223027 1 3 8 412 51423151618192128 71234567 Average linkageSingle linkage15 Summary of Hierarchal clustering MethodsSummary of Hierarchal clustering Methods No need to specify the number of clusters in advance. Hierarchical structure maps nicely onto human intuition for some domains They do not scale well: time complexity of at least O(n2), where nis the number of total objects. Like any heuristic search algorithms, local optima are a problem. Interpretation of results is (very) subjective. Partitional ClusteringPartitional clustering Nonhierarchical, each instance is placed in exactly one of K non-overlapping clusters.

10 Since only one set of clusters is output, the user normally has to input the desired number of clusters clustering : Initializationmeans clustering : InitializationDecide K, and initialize Kcenters (randomly)k1k2k3012345012345KK--means clustering : Iteration 1means clustering : Iteration 1 Assign all objects to the nearest a center to the mean of its clustering : Iteration 2means clustering : Iteration 2 After moving centers, re-assign the clustering : Iteration 2means clustering : Iteration 2k1k2k3 After moving centers, re-assign the objects to nearest a center to the mean of its new clustering : Finished!means clustering : Finished!Re-assign and move centers, until ..no objects changed Decide on a value for K, the number of Initialize the Kcluster centers (randomly, if necessary).


Related search queries