Clustering Slides adapted from Chris Manning, Prabhakar Raghavan, and Hinrich Schütze (http://www-csli.stanford.edu/~hinrich/information-retrieval-book.html),

Slides:



Advertisements
Similar presentations
Lecture 15(Ch16): Clustering
Advertisements

Cluster Analysis: Basic Concepts and Algorithms
Hierarchical Clustering
Information Retrieval Lecture 7 Introduction to Information Retrieval (Manning et al. 2007) Chapter 17 For the MSc Computer Science Programme Dell Zhang.
©2012 Paula Matuszek CSC 9010: Text Mining Applications: Document Clustering l Dr. Paula Matuszek l
Clustering Paolo Ferragina Dipartimento di Informatica Università di Pisa This is a mix of slides taken from several presentations, plus my touch !
Introduction to Information Retrieval Introduction to Information Retrieval Hinrich Schütze and Christina Lioma Lecture 17: Hierarchical Clustering 1.
Introduction to Bioinformatics
Internet Search Technologies
Clustering II.
CS347 Lecture 8 May 7, 2001 ©Prabhakar Raghavan. Today’s topic Clustering documents.
Clustering… in General In vector space, clusters are vectors found within  of a cluster vector, with different techniques for determining the cluster.
CS728 Web Clustering II Lecture 14. K-Means Assumes documents are real-valued vectors. Clusters based on centroids (aka the center of gravity or mean)
1 Text Clustering. 2 Clustering Partition unlabeled examples into disjoint subsets of clusters, such that: –Examples within a cluster are very similar.
Lecture 13: Clustering (continued) May 12, 2010
CS276A Text Retrieval and Mining
Cluster Analysis: Basic Concepts and Algorithms
CS276A Text Retrieval and Mining Lecture 13 [Borrows slides from Ray Mooney and Soumen Chakrabarti]
Introduction to Information Retrieval Introduction to Information Retrieval Lecture 17: Hierarchical Clustering 1.
Advanced Multimedia Text Clustering Tamara Berg. Reminder - Classification Given some labeled training documents Determine the best label for a test (query)
Flat Clustering Adapted from Slides by
Unsupervised Learning: Clustering 1 Lecture 16: Clustering Web Search and Mining.
Clustering Unsupervised learning Generating “classes”
PrasadL16FlatCluster1 Flat Clustering Adapted from Slides by Prabhakar Raghavan, Christopher Manning, Ray Mooney and Soumen Chakrabarti.
Hierarchical Clustering
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.
Clustering Supervised vs. Unsupervised Learning Examples of clustering in Web IR Characteristics of clustering Clustering algorithms Cluster Labeling 1.
tch?v=Y6ljFaKRTrI Fireflies.
Introduction to Information Retrieval Introduction to Information Retrieval CS276: Information Retrieval and Web Search Pandu Nayak and Prabhakar Raghavan.
ITCS 6265 Information Retrieval & Web Mining Lecture 15 Clustering.
Basic Machine Learning: Clustering CS 315 – Web Search and Data Mining 1.
Clustering Algorithms k-means Hierarchic Agglomerative Clustering (HAC) …. BIRCH Association Rule Hypergraph Partitioning (ARHP) Categorical clustering.
1 Motivation Web query is usually two or three words long. –Prone to ambiguity –Example “keyboard” –Input device of computer –Musical instruments How can.
Introduction to Information Retrieval Introduction to Information Retrieval Modified from Stanford CS276 slides Chap. 16: Clustering.
Clustering Paolo Ferragina Dipartimento di Informatica Università di Pisa This is a mix of slides taken from several presentations, plus my touch !
Information Retrieval Lecture 6 Introduction to Information Retrieval (Manning et al. 2007) Chapter 16 For the MSc Computer Science Programme Dell Zhang.
Clustering Algorithms for Numerical Data Sets. Contents 1.Data Clustering Introduction 2.Hierarchical Clustering Algorithms 3.Partitional Data Clustering.
Information Retrieval and Organisation Chapter 16 Flat Clustering Dell Zhang Birkbeck, University of London.
Mehdi Ghayoumi MSB rm 132 Ofc hr: Thur, a Machine Learning.
CS 8751 ML & KDDData Clustering1 Clustering Unsupervised learning Generating “classes” Distance/similarity measures Agglomerative methods Divisive methods.
Clustering. What is Clustering? Clustering: the process of grouping a set of objects into classes of similar objects –Documents within a cluster should.
Hierarchical Clustering Produces a set of nested clusters organized as a hierarchical tree Can be visualized as a dendrogram – A tree like diagram that.
CSCI 5417 Information Retrieval Systems Jim Martin Lecture 15 10/13/2011.
Clustering (Modified from Stanford CS276 Slides - Lecture 17 Clustering)
Today’s Topic: Clustering  Document clustering Motivations Document representations Success criteria  Clustering algorithms Partitional Hierarchical.
Compiled By: Raj Gaurang Tiwari Assistant Professor SRMGPC, Lucknow Unsupervised Learning.
Lecture 12: Clustering May 5, Clustering (Ch 16 and 17)  Document clustering  Motivations  Document representations  Success criteria  Clustering.
Information Retrieval and Organisation Chapter 17 Hierarchical Clustering Dell Zhang Birkbeck, University of London.
Basic Machine Learning: Clustering CS 315 – Web Search and Data Mining 1.
1 CS 391L: Machine Learning Clustering Raymond J. Mooney University of Texas at Austin.
1 Machine Learning Lecture 9: Clustering Moshe Koppel Slides adapted from Raymond J. Mooney.
Hierarchical clustering approaches for high-throughput data Colin Dewey BMI/CS 576 Fall 2015.
Introduction to Information Retrieval Introduction to Information Retrieval Clustering Chris Manning, Pandu Nayak, and Prabhakar Raghavan.
Introduction to Information Retrieval Introduction to Information Retrieval CS276: Information Retrieval and Web Search Christopher Manning and Prabhakar.
Introduction to Information Retrieval Introduction to Information Retrieval CS276: Information Retrieval and Web Search Christopher Manning and Prabhakar.
Data Mining and Text Mining. The Standard Data Mining process.
Hierarchical Clustering & Topic Models
Unsupervised Learning: Clustering
Prof. Paolo Ferragina, Algoritmi per "Information Retrieval"
Unsupervised Learning: Clustering
IAT 355 Clustering ______________________________________________________________________________________.
Clustering CSC 600: Data Mining Class 21.
Machine Learning Lecture 9: Clustering
本投影片修改自Introduction to Information Retrieval一書之投影片 Ch 16 & 17
CS276B Text Information Retrieval, Mining, and Exploitation
CS 391L: Machine Learning Clustering
Text Categorization Berlin Chen 2003 Reference:
INFORMATION RETRIEVAL TECHNIQUES BY DR. ADNAN ABID
Presentation transcript:

Clustering Slides adapted from Chris Manning, Prabhakar Raghavan, and Hinrich Schütze ( William Cohen ( & Ray Mooney (

What is clustering? Clustering: the process of grouping a set of objects into classes of similar objects Most common form of unsupervised learning Unsupervised learning = learning from raw data, as opposed to supervised data where a classification of examples is given

Clustering

Clustering: Navigation of search results For grouping search results thematically clusty.com / Vivisimo

Clustering: Corpus browsing dairy crops agronomy forestry AI HCI craft missions botany evolution cell magnetism relativity courses agriculturebiologyphysicsCSspace... … (30)

Clustering considerations What does it mean for objects to be similar? What algorithm and approach do we take? Top-down: k-means Bottom-up: hierarchical agglomerative clustering How many clusters? Can we label or name the clusters? How do we make it efficient and scalable?

What makes docs “related”? Ideal: semantic similarity. Practical: statistical similarity Treat documents as vectors For many algorithms, easier to think in terms of a distance (rather than similarity) between docs. We focus on Euclidean distance

What are we optimizing? Given: Final number of clusters Optimize: “Tightness” of clusters {average/min/max/} distance of points to each other in the same cluster? {average/min/max} distance of points to each clusters center? Usually clustering finds heuristic approximations

K-Means Assumes real-valued vectors. Clusters based on centroids (aka the center of gravity or mean) of points in a cluster, c: Reassignment of instances to clusters is based on distance to the current cluster centroids.

K-Means Algorithm Select K random seeds. Until clustering converges or other stopping criterion: For each x i : Assign x i to the cluster c j such that dist(x i, s j ) is minimal. (Update the seeds to the centroid of each cluster) For each cluster c j s j =  (c j ) How?

K Means Example (K=2) Pick seeds Reassign clusters Compute centroids x x Reassign clusters x x x x Compute centroids Reassign clusters Converged!

Seed Choice Results can vary based on random seed selection. Some seeds can result in poor convergence rate, or convergence to sub-optimal clusterings. Select good seeds using a heuristic (e.g., doc least similar to any existing mean) Try out multiple starting points Initialize with the results of another method. In the above, if you start with B and E as centroids you converge to {A,B,C} and {D,E,F} If you start with D and F you converge to {A,B,D,E} {C,F} Example showing sensitivity to seeds

How Many Clusters? Number of clusters K is given Partition n docs into predetermined number of clusters Finding the “right” number of clusters is part of the problem Given data, partition into an “appropriate” number of subsets. E.g., for query results - ideal value of K not known up front - though UI may impose limits. Can usually take an algorithm for one flavor and convert to the other.

Hierarchical Clustering Build a tree-based hierarchical taxonomy (dendrogram) from a set of documents. animal vertebrate fish reptile amphib. mammal worm insect crustacean invertebrate How could you do this with k-means?

Agglomerative (bottom-up): Start with each document being a single cluster. Eventually all documents belong to the same cluster. Divisive (top-down): Start with all documents belong to the same cluster. Eventually each node forms a cluster on its own. Could be a recursive application of k-means like algorithms Does not require the number of clusters k in advance Needs a termination/readout condition Hierarchical Clustering algorithms

Hierarchical Agglomerative Clustering (HAC) Assumes a similarity function for determining the similarity of two instances. Starts with all instances in a separate cluster and then repeatedly joins the two clusters that are most similar until there is only one cluster. The history of merging forms a binary tree or hierarchy.

connectedClustering obtained by cutting the dendrogram at a desired level: each connected component forms a cluster. Dendogram: Hierarchical Clustering

Closest pair of clusters Many variants to defining closest pair of clusters Single-link Distance of the “closest” points (single-link) Complete-link Distance of the “furthest” points Centroid Distance of the centroids (centers of gravity) (Average-link) Average distance between pairs of elements

Single Link Agglomerative Clustering Use maximum similarity of pairs: Can result in “straggly” (long and thin) clusters due to chaining effect. After merging c i and c j, the similarity of the resulting cluster to another cluster, c k, is:

Single Link Example

Complete Link Agglomerative Clustering Use minimum similarity of pairs: Makes “tighter,” spherical clusters that are typically preferable. After merging c i and c j, the similarity of the resulting cluster to another cluster, c k, is: CiCi CjCj CkCk

Complete Link Example

Key notion: cluster representative We want a notion of a representative point in a cluster Representative should be some sort of “typical” or central point in the cluster, e.g., point inducing smallest radii to docs in cluster smallest squared distances, etc. point that is the “average” of all docs in the cluster Centroid or center of gravity

Centroid-based Similarity Always maintain average of vectors in each cluster: Compute similarity of clusters by: For non-vector data, can’t always make a centroid

Major issue - labeling After clustering algorithm finds clusters - how can they be useful to the end user? Need pithy label for each cluster In search results, say “Animal” or “Car” in the jaguar example. In topic trees, need navigational cues. Often done by hand, a posteriori. How would you do this?

How to Label Clusters Show titles of typical documents Titles are easy to scan Authors create them for quick scanning! But you can only show a few titles which may not fully represent cluster Show words/phrases prominent in cluster More likely to fully represent cluster Use distinguishing words/phrases Differential labeling But harder to scan

מועד א' 2015 א ) תראה את התוצאות של ביצוע של Hierarchical Clustering בשימוש single- linkage עם סט הנתונים החד - ממדי : {3, 7, 8, 11, 13}. אילו clusters היית מייצר לו רצית שלושה clusters?

121075Distance 9742 c1 = c2 = 13 ב ) תראה את התוצאות של ביצוע של K-Means Clustering עם סט הנתונים החד - ממדי : {5, 7, 10, 12} בהנחה ש k = 2, ומציינים את מרכזי ה cluster ההתחלתיים עם c 1 = 3.0 & c 2 = תראה את השמת ה cluster ההתחלתיות. ( דהיינו, אילו דוגמאות נמצאות ב cluster c 1 ואילו נמצאות ב cluster c 2 ) (0.5*8) תציין את מרכזי ה cluster החדשים לאחר איטרציה נוספת של האלגוריתם.