Download Unsupervised Learning: An Overview of Clustering and the k-Means Algorithm and more Study notes Software Engineering in PDF only on Docsity!
Lecture 23: Unsupervised learning
CSI 5v93: Introduction to machine learning
Baylor University
Computer Science Department
Dr. Greg Hamerly
http://cs.baylor.edu/˜hamerly/
CSI 5v93: Introduction to machine learning, Lecture 23 – p. 1/
Questions?
Introduction
learning. supervised Until now, we have discussed the problem of
Supervised learning = having a “training signal” or correct answer for the training
examples. This comes in two forms:
class labels •
regression value •
What if we didn’t have the training signal for the examples? Can we learn anything?
Answer: yes – we now turn to unsupervised learning.
CSI 5v93: Introduction to machine learning, Lecture 23 – p. 3/
Unsupervised learning
Unsupervised learning is learning without a training signal.
It can be very different than supervised learning
no “correct answer” •
goal is different – the concept to learn is not given with the training data •
overfitting and underfitting are still possible, but it’s not as clear when they occur •
Data clustering (4.3)
Several views/motivations:
identify and group items which are similar into several groups •
identify and divide items which are different into several groups •
summarize the data with several prototypes •
-means algorithm.k We can do all these with the
CSI 5v93: Introduction to machine learning, Lecture 23 – p. 7/
Data clustering (4.3)
Several views/motivations:
identify and group items which are similar into several groups •
identify and divide items which are different into several groups •
summarize the data with several prototypes •
We can do all these with clustering algorithms.
There are several types of clustering algorithms:
hierarchical bottom-up •
hierarchical top-down •
-means and Gaussian EM)k iterative “flat” clustering (e.g. •
spectral clustering •
density-seeking (e.g. mean-shift) •
Most clustering algorithms are iterative in some fashion.
-means algorithmk The
A “flat”, iterative improvement clustering algorithm.
Very popular: easy to implement, fairly fast algorithm, provides good results.
dimensions. d data points in n Input: a set of
prototypes, or centers, that represent the data “well”. k Goal: find
constrained to be part of the input. not The centers are
Each center represents the data that is nearest to it.
CSI 5v93: Introduction to machine learning, Lecture 23 – p. 9/
-means algorithmk The
troids
- •
- • •
- • -^ •
- •
- •
- •
- • •
- •
- •
(^) • • •
(^) • •
(^) • •
-^ • ••
-^ •
Initial Partition
mber 2
• •
-
- •
- • -^ •
- •
- •
- •
- •
- •
- •
(^) • •
(^) • •
- • • •
- •
- •
- •
- • ••
- • •• •
- •
-^ •
Iteration Number 20
clusters on 2-dimensional data. = 3 k -means withk This is an example of using
-meansk Demonstration of
CSI 5v93: Introduction to machine learning, Lecture 23 – p. 13/
-means is actually doingk What
-means is actually minimizing the within-cluster sum-of-squared-distances. k
-meansk. Then^ jc belongs to cluster center^ ix indicate that datapoint ) i, j(δ Let
minimizes
= ) X, C( F
n∑
=1 i
k∑
=1 j
||^ jc −^ ix ||
) i, j(δ
n∑
=1 i
k∑
=1 j
) i, j( δ
d∑
=1 m
) jmc −^ imx (
Some points:
) X, C( F minimum of local only finds a •
may get stuck in poor solutions •
starting with some solution, always finds a solution that is better (or equal) •
because of the last point, it will always terminate •
2-minute journal
Please write a response to the following on a piece of paper and hand it in
immediately. Please make it anonymous (no names). Write about:
major points you learned today •
areas not understood or requiring clarification •