Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 1 CLUSTERS Prof. George Papadourakis,

Slides:



Advertisements
Similar presentations
CLUSTERING.
Advertisements

Clustering II.
Clustering.
Hierarchical Clustering
Unsupervised Learning
Cluster Analysis: Basic Concepts and Algorithms
1 CSE 980: Data Mining Lecture 16: Hierarchical Clustering.
Hierarchical Clustering. Produces a set of nested clusters organized as a hierarchical tree Can be visualized as a dendrogram – A tree-like diagram that.
Hierarchical Clustering, DBSCAN The EM Algorithm
Albert Gatt Corpora and Statistical Methods Lecture 13.
PARTITIONAL CLUSTERING
© Tan,Steinbach, Kumar Introduction to Data Mining 4/18/ What is Cluster Analysis? l Finding groups of objects such that the objects in a group will.
Data Mining Cluster Analysis: Basic Concepts and Algorithms
More on Clustering Hierarchical Clustering to be discussed in Clustering Part2 DBSCAN will be used in programming project.
Clustering & image segmentation Goal::Identify groups of pixels that go together Segmentation.
Assessment. Schedule graph may be of help for selecting the best solution Best solution corresponds to a plateau before a high jump Solutions with very.
Metrics, Algorithms & Follow-ups Profile Similarity Measures Cluster combination procedures Hierarchical vs. Non-hierarchical Clustering Statistical follow-up.
Introduction to Bioinformatics
Cluster Analysis.
IT 433 Data Warehousing and Data Mining Hierarchical Clustering Assist.Prof.Songül Albayrak Yıldız Technical University Computer Engineering Department.
2004/05/03 Clustering 1 Clustering (Part One) Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information.
© Tan,Steinbach, Kumar Introduction to Data Mining 4/18/ What is Cluster Analysis? l Finding groups of objects such that the objects in a group will.
6-1 ©2006 Raj Jain Clustering Techniques  Goal: Partition into groups so the members of a group are as similar as possible and different.
Lecture 6 Image Segmentation
Clustering II.
Clustering… in General In vector space, clusters are vectors found within  of a cluster vector, with different techniques for determining the cluster.
© University of Minnesota Data Mining for the Discovery of Ocean Climate Indices 1 CSci 8980: Data Mining (Fall 2002) Vipin Kumar Army High Performance.
Lecture 4 Cluster analysis Species Sequence P.symA AATGCCTGACGTGGGAAATCTTTAGGGCTAAGGTTTTTATTTCGTATGCTATGTAGCTTAAGGGTACTGACGGTAG P.xanA AATGCCTGACGTGGGAAATCTTTAGGGCTAAGGTTAATATTCCGTATGCTATGTAGCTTAAGGGTACTGACGGTAG.
Tree Clustering & COBWEB. Remember: k-Means Clustering.
Cluster Analysis: Basic Concepts and Algorithms
What is Cluster Analysis?
© University of Minnesota Data Mining for the Discovery of Ocean Climate Indices 1 CSci 8980: Data Mining (Fall 2002) Vipin Kumar Army High Performance.
Image Segmentation Using Region Growing and Shrinking
Clustering Ram Akella Lecture 6 February 23, & 280I University of California Berkeley Silicon Valley Center/SC.
Chapter 3: Cluster Analysis  3.1 Basic Concepts of Clustering  3.2 Partitioning Methods  3.3 Hierarchical Methods The Principle Agglomerative.
COMP53311 Clustering Prepared by Raymond Wong Some parts of this notes are borrowed from LW Chan ’ s notes Presented by Raymond Wong
COMMON EVALUATION FINAL PROJECT Vira Oleksyuk ECE 8110: Introduction to machine Learning and Pattern Recognition.
Partitional and Hierarchical Based clustering Lecture 22 Based on Slides of Dr. Ikle & chapter 8 of Tan, Steinbach, Kumar.
1 Motivation Web query is usually two or three words long. –Prone to ambiguity –Example “keyboard” –Input device of computer –Musical instruments How can.
Clustering What is clustering? Also called “unsupervised learning”Also called “unsupervised learning”
Cluster Analysis Cluster Analysis Cluster analysis is a class of techniques used to classify objects or cases into relatively homogeneous groups.
CSE5334 DATA MINING CSE4334/5334 Data Mining, Fall 2014 Department of Computer Science and Engineering, University of Texas at Arlington Chengkai Li (Slides.
CS654: Digital Image Analysis
Clustering.
1Ellen L. Walker Category Recognition Associating information extracted from images with categories (classes) of objects Requires prior knowledge about.
Data Mining Practical Machine Learning Tools and Techniques By I. H. Witten, E. Frank and M. A. Hall 6.8: Clustering Rodney Nielsen Many / most of these.
Hierarchical Clustering Produces a set of nested clusters organized as a hierarchical tree Can be visualized as a dendrogram – A tree like diagram that.
Université d’Ottawa / University of Ottawa 2001 Bio 8100s Applied Multivariate Biostatistics L10.1 Lecture 10: Cluster analysis l Uses of cluster analysis.
Compiled By: Raj Gaurang Tiwari Assistant Professor SRMGPC, Lucknow Unsupervised Learning.
© Tan,Steinbach, Kumar Introduction to Data Mining 4/18/ Data Mining: Cluster Analysis This lecture node is modified based on Lecture Notes for Chapter.
1 Microarray Clustering. 2 Outline Microarrays Hierarchical Clustering K-Means Clustering Corrupted Cliques Problem CAST Clustering Algorithm.
CZ5211 Topics in Computational Biology Lecture 4: Clustering Analysis for Microarray Data II Prof. Chen Yu Zong Tel:
Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 1 PATTERN CLASSIFICATION WITH.
1 Cluster Analysis Prepared by : Prof Neha Yadav.
Color Image Segmentation Mentor : Dr. Rajeev Srivastava Students: Achit Kumar Ojha Aseem Kumar Akshay Tyagi.
Cluster Analysis What is Cluster Analysis? Types of Data in Cluster Analysis A Categorization of Major Clustering Methods Partitioning Methods.
CLUSTER ANALYSIS. Cluster Analysis  Cluster analysis is a major technique for classifying a ‘mountain’ of information into manageable meaningful piles.
Data Science Practical Machine Learning Tools and Techniques 6.8: Clustering Rodney Nielsen Many / most of these slides were adapted from: I. H. Witten,
Unsupervised Learning
Data Mining: Basic Cluster Analysis
More on Clustering in COSC 4335
Data Mining K-means Algorithm
Multivariate Statistical Methods
Data Mining – Chapter 4 Cluster Analysis Part 2
Cluster Analysis.
Clustering The process of grouping samples so that the samples are similar within each group.
Hierarchical Clustering
Image Segmentation Using Region Growing and Shrinking
Unsupervised Learning
Presentation transcript:

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 1 CLUSTERS Prof. George Papadourakis, Ph.D.

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 2 Creating Clusters (1/4)  Methods for Creating Data Clusters: Methods for finding the categories and subcategories that form the data of every problem.  Clustering: Tool for data analysis, organizes the patterns into clusters or categories, patterns that belong to a cluster (resemblance between them)  Clustering results: Classification of new data, control for data homogeneity, data compression  Scheme 5.1: Data Sets in two-dimensional space  Two Clusters – There isn’t just one unique clustering technique for all cases  Human perception: The best clustering technique (2-d, 3-d space)  Higher Dimensions not well  Plenty of methods – concerning specific applications

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 3 Creating Clusters (2/4) A) Compact and well separable B) Uneven clusters C) Non compact D) Contiguous ClustersL) AlongateZ) Non linearly separable H) Clusters within clusters I) Inexistence of clusters

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 4  Clustering Algorithm functions even with random data Creating Clusters (3/4) Scheme 5.2: Two or Four clusters?

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 5  What do points represents, what’s the meaning of cluster in the application  Instead of finding a natural data structure, impose arbitrary structure  Skepticism for results – Increase of problem comprehension?  Yes! Clusters correctly chosen  If the result is in contrast with intuition, the problem has not been fully understood Creating Clusters (4/4)

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 6  Medicine: Disease and Symptoms Clustering  Psychiatry: Diagnosis of Symptom Sets - Paranoia, Schizophrenia  Archeology: Classifying stone tools, grave goods  Image Analysis: Pixels Clusters with similar features (color, texture) Applications

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 7  Consists of similar patterns  Gap between patterns of the same cluster smaller to that between patterns from different clusters  Clusters form connected areas with rather high density, separable from other clusters with areas of low density  Initial design defines what a cluster means for the application  Clustering Methodologies are based on ideal clustering structures  Most of the clustering algorithms always place the two nearest patterns at the same cluster Ideal Clusters

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 8  Hierarchical  Partitional Clustering Methodologies

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 9  Hierarchical data structure  Trees  Agglomerate  Initially: N clusters – one for each pattern  Intermediately: clusters merged  Finally: one cluster containing all patterns  Divisive  Initially: one cluster which containing all the patterns  Intermediately: clusters split  Finally: N clusters – one for each pattern  Applications: Classifying plants and animals Hierarchical

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 10  Goal: creating a set of clusters which separate the data in similar modules  Close Patterns are considered to be similar  Pre-defined number of categories  Criterion functions are used, such as minimize squares functions, density valuators and nearest neighbors.  Applications: Problem categories don’t form distinct clusters (they overlap)  Distinction between clustering methods and clustering algorithms  The same clustering method can be implemented differently, having as a result the creation of many different clustering algorithms  Forgy’s, Isodata are based on methods which minimize the square error Partitional

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 11  Pet shop veterinarian, two big clusters: cats and dogs  If two patterns belong to the same cluster in one level, then they will belong to the same cluster in a higher level as well  Patterns 1, 2 Hierarchical Clustering (1/2) {1,2,3,4,5} {1,2,3} {1,2} {4,5 } {1}{2}{5}{4}{3} Level 4 Level 3 Level 2 Level 1

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory Register each one of the N patterns to a single cluster 2. Find clusters with greater resemblance and merge them to one cluster 3. Repeat step 2 until all patterns belong to the same cluster  Using different methods to define the resemblance among the clusters, different algorithms arise.  Popular distance metrics: Euclidean and Hippodamian Hierarchical Clustering (2/2)

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 13  Nearest neighbor method or minimum method  Distance between clusters: minimum distance between two patterns of different clusters Single Linkage

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 14  Distance between clusters C i and C j is defined by the equation: Where d(x,y) a distance function between the patterns x,y  5 clusters and each one corresponds to one pattern Single Linkage algorithm (1/2)

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 15  Initial Distance table Single Linkage Algorithm (2/2)  {1,2}, {3}, {4}, {5}

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 16 Single Linkage Scheme 5.5: Hierarchical clustering using the simple linkage algorithm

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 17  Also known as maximum method or farthest neighbor.  Distance between clusters: maximum between two patterns which belong to different clusters  So the distance between the clusters C i and C j is defined by the equation:  Where d(x,y) is a distance function between the patterns x,y  5 clusters and each one corresponds to one pattern  Nearest Clusters {1} and {2} are merged Complete Linkage Algorithms (1/4)

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 18 Complete Linkage Algorithms (2/4)  Maximum distance between clusters {1,2} {3}: 11.7  The rest of the columns are just sustained and copied  Minimum distance between clusters 8: {4}, {5} Second distance table of Complete Linkage {1,2}, {3}, {4,5}

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 19  Maximum distance between clusters {1,2} {3,4}: 21.5  The rest of the columns are just sustained and copied  Minimum distance between clusters 9.8: {4,5}, {3} {1,2} {3,4,5} Complete Linkage Algorithms (3/4) Scheme 5.10: Third distance table Complete Linkage

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 20 ¤ Cutting tree at 10 2 clusters. ¤ Cutting tree at 5 4 clusters ¤ Where do we need to cut the tree? ¤ Heuristic Method: μεγάλο κάθετο κενό ¤ Big life time: the difference between the distance during which the cluster merges from the distance it was created. ¤ Cutting tree at 10 2 clusters Complete Linkage Algorithms (4/4)

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 21  Different way of defining the pattern resemblance  Different clustering for the same data  Single linkage algorithm comes short of the chain phenomenon:  Where distance patterns are placed at the same cluster because they have a common neighbor cluster. Comparing Algorithms

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 22  The graph of the Single Linkage Algorithm is a minimum spanning tree which is created by adding the nearest value between the two clusters. Duda and Hart Examples

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 23 Comparing Algorithms (1/4) Scheme 5.7: Examples of Hierarchical clustering. a) Three data sets b) Results of Single Linkage Algorithm c) Results of Complete Linkage Algorithm

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 24  α) Clusters are compact and well separable  Single Linkage Algorithm find easy the separable clusters.  β) Patterns create a bridge among clusters  Result: Creation of unexpected clusters, a big elongate and a small compact.  Chain phenomenon is obvious.  Since results of a clustering are particularly sensitive to noise and small cluster deviations in space then the chain phenomenon is a disadvantage.  If the clusters are elongate then chain creation might be an advantage  γ) example Comparing Algorithms (2/4)

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 25  Graphical representation of complete linkage algorithm is the creation of a graph whose edges connect all the patterns or nodes in a cluster.  Each cluster consists a complete sub-graph.  Distance within the clusters is defined by the distance of the most distant patterns of the two clusters.  When neighbor patterns connect the graph changes by added edges between all the patterns of each cluster.  Cluster Diameter: maximum distance between patterns in the cluster  Cluster Distance: diameter of connecting two clusters. Comparing Algorithms (3/4)

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 26  Each repeat of the Complete Linkage Algorithm steps increases the less possible the cluster diameter.  Advantage when the real clusters are compact and similar in size,  Examples a) and b)  On the contrary, when the real clusters don’t have these features, the results are arbitrary  Examble c)  Other functions as Average, and Centroid.  Average Linkage Algorithm  Ccentroid Linkage Algorithm  Ward Method: Hierarchical Algorithm which uses analysis of variance techniques Comparing Algorithms (4/4)

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 27  The single linkage algorithm creates elongate clusters while the complete linkage algorithm creates more compact clusters.  The Average Linkage Algorithm is an effort of compromising the two algorithms, single and complete linkage.  Distance between clusters: mean distance of patterns of each different cluster.  5 Clusters each one corresponds to one pattern  If C i is a cluster with n i members and C j is a cluster with n j members then the distance between the two clusters is defined as”  Nearest clusters {1} and {2} are merged Average Linkage Algorithm (1/3)

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 28  Initial distance matrix: d(1,3) = 11.7 d(2,3)=8.1 d({1,2},3)=9.9  The rest of the columns are just sustained and copied  Minimum distance between clusters 8: {4}, {5} Average Linkage Algorithm (2/3) {1,2}, {3}, {4,5}

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 29  Second distance matrix: d({1,2},4) = 18.0 d({1,2},5)=19.7 d({1,2},{4,5})= 18.9  Minimum cluster distance 9.8: {4,5}, {3} {1,2} {3,4,5}  The result is exactly the same as with the complete linkage algorithm.  Average Linkage Algorithm is effective with compact patterns.  Moreover, it can be used with elongate clusters. Average Linkage Algorithm (3/3)

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 30  Also named as the Mimimum Variance Method.  Initially all the patterns are individual clusters.  At every repeat the pair which generates the minimum square error is merged.  m patterns where  Pattern square error x i  Cluster Square Error  The total variation is defined as: Ward Method (1/4)

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 31  5 Clusters, each consists of one patter  Square Error 0  10 different ways of merging 5 clusters  {1} [4,4] {2} [8,4] μ = [6,4]  E{3}=0 E{4}=0 E{5}=0  E = =8  Clusters {1} and {2} merged Ward Method (2/4)

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 32  Clusters {1,2} {3} {4} {5}  Smaller E = 40  {4,5} merged  {1,2} {3} {4,5} Ward Method (3/4)

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 33 Ward Method (4/4)  Smaller E = 94  Clusters {3} and {4,5} merged  Generally, the Ward Method is considered very effective, while it tends to create small size clusters.  Hierarchical Algorithms are effective for a small number of patterns (<20)

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 34 SEPARATING CLUSTERING

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 35  Separating Clustering Techniques: Ν patterns  k clusters Ν>>k Usually k is defined by the user  Separating techniques: they allow patterns to move from cluster to cluster (not the hierarchical techniques) An initially bad separation can be corrected.  Separation is implemented with maximization or minimization of the criteria function.  Square error very popular  Separation Clustering Techniques ομαδοποίησης:  Forgy Algorithm  K-means  Isodata Introduction

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 36  Simple  Input: Ν patterns, k clusters, k representative patterns (random or predefined) Pseudocode 1.Initial setting of k clusters and k representative patterns 2.For each pattern find the nearest representative pattern and register it to the corresponding cluster 3.Calculate the new representative pattern for each cluster which is the average of the cluster patterns 4.If there are changes in patterns registration to clusters, that is new representative patterns are not the same as before, return to step 2. Forgy Algorithm (1/5)

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 37 Forgy Algorithm (2/5)  Example

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 38  Step 3: Calculation of representative patterns  Cluster A : [4,4]  Cluster B: [17.75,7]  There is a change in the pattern registration, return to step 2. Second repeat of the algorithm  Step 2: Calculation of the nearest cluster for each pattern. Forgy Algorithm (3/5)

Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Intelligent Systems Laboratory 39  Step 3: Calculation of new representative patterns  Cluster A: [6,4]  Cluster B: [21,8]  There is a change in pattern registration, return to Step 2. Third repeat of the algorithm  Step 2: Calculation of the nearest cluster for each pattern.  There is no change to the pattern registration, algorithm terminated. Forgy Algorithm (4/5)