Machine Learning - MT 2016
- 15. Clustering
Machine Learning - MT 2016 15. Clustering Varun Kanade University - - PowerPoint PPT Presentation
Machine Learning - MT 2016 15. Clustering Varun Kanade University of Oxford November 28, 2016 Announcements No new practical this week All practicals must be signed off in sessions this week Firm Deadline: Reports handed in at CS
◮ No new practical this week ◮ All practicals must be signed off in sessions this week ◮ Firm Deadline: Reports handed in at CS reception by Friday noon ◮ Revision Class for M.Sc. + D.Phil. Thu Week 9 (2pm & 3pm) ◮ Work through ML HT2016 Exam (Problem 3 is optional)
1
◮ Defining an objective function for clustering ◮ k-Means formulation for clustering ◮ Multidimensional Scaling ◮ Hierarchical clustering ◮ Spectral clustering
2
3
3
3
4
◮ Weighted dissimilarity between (real-valued) attributes
D
i)
◮ In the simplest setting wi = 1 and di(xi, x′ i) = (xi − x′ i)2 and f(z) = z,
◮ Weights allow us to emphasise features differently ◮ If features are ordinal or categorical then define distance suitably ◮ Standardisation (mean 0, variance 1) may or may not help
5
6
7
k
k
1 |Cj|
8
k
j=1 that minimises W is easy
j′ xi − µj′}
j=1 is
9
10
10
10
10
10
11
j′
12
k
13
14
2 4 6 8 10 12 14 16 0.05 0.1 0.15 0.2 0.25 MSE on test vs K for K−means ◮ As in the case of PCA, larger k will give better value of the objective ◮ Choose suitable k by identifying a ‘‘kink’’ or ‘‘elbow’’ in the curve
(Source: Kevin Murphy, Chap 11)
15
16
ij = xi − xj2
i xi − 2xT i xj + xT j xj
i xi = 0, M can be recovered from D
17
18
19
◮ In certain applications, it may be easier to define pairwise similarities or
◮ Many machine learning algorithms require (or are more naturally
◮ Multidimensional Scaling gives a way to find an embedding of the data in
20
◮ Measurements of different species and individuals within species ◮ Top-level and low-level categories in news articles ◮ Country, county, town level data
◮ Agglomerative: Bottom-up, clusters formed by merging smaller
◮ Divisive: Top-down, clusters formed by splitting larger clusters
21
◮ Single Linkage
x∈C,x′∈C′ d(x, x′) ◮ Complete Linkage
x∈C,x′∈C′ d(x, x′) ◮ Average Linkage
22
◮ Single Linkage
x∈C,x′∈C′ d(x, x′) ◮ Complete Linkage
x∈C,x′∈C′ d(x, x′) ◮ Average Linkage
23
j,k∈S
24
25
26
27
28
29
30
j Wij
31
32
33
34
35
36
37
38
39