CSC 411: Lecture 12: Clustering
Class based on Raquel Urtasun & Rich Zemel’s lectures Sanja Fidler
University of Toronto
March 4, 2016
Urtasun, Zemel, Fidler (UofT) CSC 411: 12-Clustering March 4, 2016 1 / 20
CSC 411: Lecture 12: Clustering Class based on Raquel Urtasun & - - PowerPoint PPT Presentation
CSC 411: Lecture 12: Clustering Class based on Raquel Urtasun & Rich Zemels lectures Sanja Fidler University of Toronto March 4, 2016 Urtasun, Zemel, Fidler (UofT) CSC 411: 12-Clustering March 4, 2016 1 / 20 Today Unsupervised
Urtasun, Zemel, Fidler (UofT) CSC 411: 12-Clustering March 4, 2016 1 / 20
◮ k-means ◮ Soft k-means Urtasun, Zemel, Fidler (UofT) CSC 411: 12-Clustering March 4, 2016 2 / 20
Urtasun, Zemel, Fidler (UofT) CSC 411: 12-Clustering March 4, 2016 3 / 20
◮ Reduce dimensionality ◮ Find clusters ◮ Model data density ◮ Find hidden causes
◮ Compress data ◮ Detect outliers ◮ Facilitate other learning Urtasun, Zemel, Fidler (UofT) CSC 411: 12-Clustering March 4, 2016 4 / 20
Urtasun, Zemel, Fidler (UofT) CSC 411: 12-Clustering March 4, 2016 5 / 20
◮ How many classes? ◮ Why not put each datapoint into a separate class?
Urtasun, Zemel, Fidler (UofT) CSC 411: 12-Clustering March 4, 2016 6 / 20
Urtasun, Zemel, Fidler (UofT) CSC 411: 12-Clustering March 4, 2016 7 / 20
◮ Assignment step: Assign each data point to the closest cluster ◮ Refitting step: Move each cluster center to the center of gravity of the
Urtasun, Zemel, Fidler (UofT) CSC 411: 12-Clustering March 4, 2016 8 / 20
Figure from Bishop Simple demo: http://syskall.com/kmeans.js/ Urtasun, Zemel, Fidler (UofT) CSC 411: 12-Clustering March 4, 2016 9 / 20
{m},{r} J({m}, {r}) =
{m},{r} N
K
k ||mk − x(n)||2
k
k
k
◮ Fix centers, optimize assignments (choose cluster whose mean is
◮ Fix assignments, optimize means (average of assigned datapoints) Urtasun, Zemel, Fidler (UofT) CSC 411: 12-Clustering March 4, 2016 10 / 20
◮ Assignment: Each data point x(n) assigned to nearest mean
k d(mk, x(n))
k
◮ Update: Model parameters, means are adjusted to match sample
k x(n)
k
Urtasun, Zemel, Fidler (UofT) CSC 411: 12-Clustering March 4, 2016 11 / 20
Figure from Bishop Urtasun, Zemel, Fidler (UofT) CSC 411: 12-Clustering March 4, 2016 12 / 20
Urtasun, Zemel, Fidler (UofT) CSC 411: 12-Clustering March 4, 2016 13 / 20
Urtasun, Zemel, Fidler (UofT) CSC 411: 12-Clustering March 4, 2016 14 / 20
Urtasun, Zemel, Fidler (UofT) CSC 411: 12-Clustering March 4, 2016 15 / 20
◮ Simultaneously merge two nearby
◮ and split a big cluster into two
Urtasun, Zemel, Fidler (UofT) CSC 411: 12-Clustering March 4, 2016 16 / 20
◮ Allows a cluster to use more information about the data in the refitting
◮ What happens to our convergence guarantee? ◮ How do we decide on the soft assignments? Urtasun, Zemel, Fidler (UofT) CSC 411: 12-Clustering March 4, 2016 17 / 20
◮ Assignment: Each data point n given soft ”degree of assignment” to
k
◮ Update: Model parameters, means, are adjusted to match sample
k x(n)
k
Urtasun, Zemel, Fidler (UofT) CSC 411: 12-Clustering March 4, 2016 18 / 20
Urtasun, Zemel, Fidler (UofT) CSC 411: 12-Clustering March 4, 2016 19 / 20
◮ This makes it possible to judge different models. ◮ It may make it possible to decide on the number of clusters.
◮ Then we can adjust the parameters of the model to maximize the
Urtasun, Zemel, Fidler (UofT) CSC 411: 12-Clustering March 4, 2016 20 / 20