Clustering.

Slides:



Advertisements
Similar presentations
Clustering.
Advertisements

Clustering k-mean clustering Genome 559: Introduction to Statistical and Computational Genomics Elhanan Borenstein.
Conceptual Clustering
CS 478 – Tools for Machine Learning and Data Mining Clustering: Distance-based Approaches.
1 Machine Learning: Lecture 10 Unsupervised Learning (Based on Chapter 9 of Nilsson, N., Introduction to Machine Learning, 1996)
Clustering. 2 Outline  Introduction  K-means clustering  Hierarchical clustering: COBWEB.
Clustering. 2 Outline  Introduction  K-means clustering  Hierarchical clustering: COBWEB.
CLUSTERING (Segmentation)
Module 04: Algorithms Topic 07: Instance-Based Learning
Lecture 7. Outline 1. Overview of Classification and Decision Tree 2. Algorithm to build Decision Tree 3. Formula to measure information 4. Weka, data.
CogNova Technologies 1 COMP3503 Automated Discovery and Clustering Methods COMP3503 Automated Discovery and Clustering Methods Daniel L. Silver.
Clustering II. 2 Finite Mixtures Model data using a mixture of distributions –Each distribution represents one cluster –Each distribution gives probabilities.
START OF DAY 8 Reading: Chap. 14. Midterm Go over questions General issues only Specific issues: visit with me Regrading may make your grade go up OR.
Text Clustering.
Dimension reduction : PCA and Clustering Slides by Agnieszka Juncker and Chris Workman modified by Hanne Jarmer.
Data Mining Practical Machine Learning Tools and Techniques Chapter 4: Algorithms: The Basic Methods Section 4.7: Instance-Based Learning Rodney Nielsen.
CS690L Data Mining: Classification
Clustering I. 2 The Task Input: Collection of instances –No special class label attribute! Output: Clusters (Groups) of instances where members of a cluster.
Chapter 11 Statistical Techniques. Data Warehouse and Data Mining Chapter 11 2 Chapter Objectives  Understand when linear regression is an appropriate.
 Classification 1. 2  Task: Given a set of pre-classified examples, build a model or classifier to classify new cases.  Supervised learning: classes.
Data Mining Practical Machine Learning Tools and Techniques Chapter 4: Algorithms: The Basic Methods Sections 4.1 Inferring Rudimentary Rules Rodney Nielsen.
Data Mining Practical Machine Learning Tools and Techniques Chapter 4: Algorithms: The Basic Methods Section 4.8: Clustering Rodney Nielsen Many of these.
Clustering. 2 Outline  Introduction  K-means clustering  Hierarchical clustering: COBWEB.
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.
Clustering Instructor: Max Welling ICS 178 Machine Learning & Data Mining.
Machine Learning Queens College Lecture 7: Clustering.
Compiled By: Raj Gaurang Tiwari Assistant Professor SRMGPC, Lucknow Unsupervised Learning.
1 Machine Learning Lecture 9: Clustering Moshe Koppel Slides adapted from Raymond J. Mooney.
Machine Learning in Practice Lecture 21 Carolyn Penstein Rosé Language Technologies Institute/ Human-Computer Interaction Institute.
Clustering Machine Learning Unsupervised Learning K-means Optimization objective Random initialization Determining Number of Clusters Hierarchical Clustering.
Data Mining Practical Machine Learning Tools and Techniques Chapter 6.3: Association Rules Rodney Nielsen Many / most of these slides were adapted from:
Data Mining and Text Mining. The Standard Data Mining process.
Rodney Nielsen Many of these slides were adapted from: I. H. Witten, E. Frank and M. A. Hall Data Science Algorithms: The Basic Methods Clustering WFH:
© Copyright 2012, Natasha Balac 1 Clustering SDSC Summer Institute 2012 Natasha Balac, Ph.D.
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: Clustering
Unsupervised Learning: Clustering
Semi-Supervised Clustering
Clustering CSC 600: Data Mining Class 21.
Decision Trees an introduction.
Machine Learning and Data Mining Clustering
Data Science Algorithms: The Basic Methods
Data Science Algorithms: The Basic Methods
Classification Algorithms
Prepared by: Mahmoud Rafeek Al-Farra
Data Science Algorithms: The Basic Methods
Artificial Intelligence
Machine Learning Lecture 9: Clustering
Data Mining K-means Algorithm
Data Science Algorithms: The Basic Methods
Decision Tree Saed Sayad 9/21/2018.
Machine Learning Techniques for Data Mining
CSE572, CBS598: Data Mining by H. Liu
Revision (Part II) Ke Chen
Data Mining 資料探勘 分群分析 (Cluster Analysis) Min-Yuh Day 戴敏育
Pattern Classification All materials in these slides were taken from Pattern Classification (2nd ed) by R. O. Duda, P. E. Hart and D. G. Stork, John.
Revision (Part II) Ke Chen
CSE572, CBS572: Data Mining by H. Liu
Dimension reduction : PCA and Clustering
CSC 558 – Data Analytics II, Prep for assignment 1 – Instance-based (lazy) machine learning January 2018.
Text Categorization Berlin Chen 2003 Reference:
Clustering Techniques
Machine Learning and Data Mining Clustering
Unsupervised Learning: Clustering
Data Mining CSCI 307, Spring 2019 Lecture 15
Data Mining CSCI 307, Spring 2019 Lecture 24
Data Mining CSCI 307, Spring 2019 Lecture 21
Data Mining CSCI 307, Spring 2019 Lecture 23
Data Mining CSCI 307, Spring 2019 Lecture 6
Presentation transcript:

Clustering

Outline Introduction K-means clustering Hierarchical clustering: COBWEB

Classification vs. Clustering Classification: Supervised learning: Learns a method for predicting the instance class from pre-labeled (classified) instances

Clustering Unsupervised learning: Finds “natural” grouping of instances given un-labeled data

Clustering Methods Many different method and algorithms: For numeric and/or symbolic data Deterministic vs. probabilistic Exclusive vs. overlapping Hierarchical vs. flat Top-down vs. bottom-up

Clusters: exclusive vs. overlapping Simple 2-D representation Non-overlapping Venn diagram Overlapping a k j i h g f e d c b

Clustering Evaluation Manual inspection Benchmarking on existing labels Cluster quality measures distance measures high similarity within a cluster, low across clusters

The distance function Simplest case: one numeric attribute A Distance(X,Y) = A(X) – A(Y) Several numeric attributes: Distance(X,Y) = Euclidean distance between X,Y Nominal attributes: distance is set to 1 if values are different, 0 if they are equal Are all attributes equally important? Weighting the attributes might be necessary

Simple Clustering: K-means Works with numeric data only Pick a number (K) of cluster centers (at random) Assign every item to its nearest cluster center (e.g. using Euclidean distance) Move each cluster center to the mean of its assigned items Repeat steps 2,3 until convergence (change in cluster assignments less than a threshold)

K-means example, step 1 k1 Y Pick 3 initial k2 cluster centers (randomly)

K-means example, step 2 k1 Y k2 Assign each point to the closest cluster center k3

K-means example, step 3 X Y k1 k1 k2 Move each cluster center to the mean of each cluster k3 k2 k3

K-means example, step 4 Reassign k1 points Y Reassign points closest to a different new cluster center Q: Which points are reassigned? k1 k3 k2

K-means example, step 4 … X Y k1 A: three points with animation k3 k2

K-means example, step 4b X Y k1 re-compute cluster means k3 k2

K-means example, step 5 k1 Y k2 move cluster centers to cluster means

Discussion, 1 What can be the problems with K-means clustering?

initial cluster centers Discussion, 2 Result can vary significantly depending on initial choice of seeds (number and position) Can get trapped in local minimum Example: Q: What can be done? instances initial cluster centers

Discussion, 3 A: To increase chance of finding global optimum: restart with different random seeds.

K-means clustering summary Advantages Simple, understandable items automatically assigned to clusters Disadvantages Must pick number of clusters before hand All items forced into a cluster Too sensitive to outliers

K-means clustering - outliers ? What can be done about outliers?

K-means variations K-medoids – instead of mean, use medians of each cluster Mean of 1, 3, 5, 7, 9 is Mean of 1, 3, 5, 7, 1009 is Median of 1, 3, 5, 7, 1009 is Median advantage: not affected by extreme values For large databases, use sampling 5 205 5

*Hierarchical clustering Bottom up Start with single-instance clusters At each step, join the two closest clusters Design decision: distance between clusters E.g. two closest instances in clusters vs. distance between means Top down Start with one universal cluster Find two clusters Proceed recursively on each subset Can be very fast Both methods produce a dendrogram

*Incremental clustering Heuristic approach (COBWEB/CLASSIT) Form a hierarchy of clusters incrementally Start: tree consists of empty root node Then: add instances one by one update tree appropriately at each stage to update, find the right leaf for an instance May involve restructuring the tree Base update decisions on category utility

*Clustering weather data 1 ID Outlook Temp. Humidity Windy A Sunny Hot High False B True C Overcast D Rainy Mild E Cool Normal F G H I J K L M N 2 3

*Clustering weather data 4 ID Outlook Temp. Humidity Windy A Sunny Hot High False B True C Overcast D Rainy Mild E Cool Normal F G H I J K L M N 5 Merge best host and runner-up 3 Consider splitting the best host if merging doesn’t help

Oops! a and b are actually very similar *Final hierarchy ID Outlook Temp. Humidity Windy A Sunny Hot High False B True C Overcast D Rainy Mild Oops! a and b are actually very similar

*Example: the iris data (subset)

*Clustering with cutoff

*Category utility Category utility: quadratic loss function defined on conditional probabilities: Every instance in different category  numerator becomes maximum number of attributes

*Overfitting-avoidance heuristic If every instance gets put into a different category the numerator becomes (maximal): Where n is number of all possible attribute values. So without k in the denominator of the CU-formula, every cluster would consist of one instance! Maximum value of CU

Other Clustering Approaches EM – probability based clustering Bayesian clustering SOM – self-organizing maps …

Discussion Can interpret clusters by using supervised learning learn a classifier based on clusters Decrease dependence between attributes? pre-processing step E.g. use principal component analysis Can be used to fill in missing values Key advantage of probabilistic clustering: Can estimate likelihood of data Use it to compare different models objectively

Examples of Clustering Applications Marketing: discover customer groups and use them for targeted marketing and re-organization Astronomy: find groups of similar stars and galaxies Earth-quake studies: Observed earth quake epicenters should be clustered along continent faults Genomics: finding groups of gene with similar expressions …

Clustering Summary unsupervised many approaches K-means – simple, sometimes useful K-medoids is less sensitive to outliers Hierarchical clustering – works for symbolic attributes Evaluation is a problem