Skip to Content
Python Machine Learning
book

Python Machine Learning

by Wei-Meng Lee
April 2019
Intermediate to advanced
320 pages
6h 42m
English
Wiley
Content preview from Python Machine Learning

CHAPTER 10Unsupervised Learning—Clustering Using K‐Means

What Is Unsupervised Learning?

So far, all of the machine learning algorithms that you have seen are supervised learning. That is, the datasets have all been labeled, classified, or categorized. Datasets that have been labeled are known as labeled data, while datasets that have not been labeled are known as unlabeled data. Figure 10.1 shows an example of labeled data.

“Tabular illustration depicting labeled data - based on the size of the house and the year in which it was built, we have the price at which the house was sold.”

Figure 10.1: Labeled data

Based on the size of the house and the year in which it was built, you have the price at which the house was sold. The selling price of the house is the label, and your machine learning model can be trained to give the estimated worth of the house based on its size and the year in which it was built.

Unlabeled data, on the other hand, is data without label(s). For example, Figure 10.2 shows a dataset containing a group of people's waist circumference and corresponding leg length. Given this set of data, you can try to cluster them into groups based on the waist circumference and leg length, and from there you can figure out the average dimension in each group. This would be useful for clothing manufacturers to tailor different sizes of clothing to fit its customers.

Tabular illustration depicting unlabeled data - a dataset containing the features of a group of people's waist circumference and corresponding leg length.

Figure 10.2: Unlabeled data

Unsupervised Learning Using K‐Means ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Python Machine Learning

Python Machine Learning

Sebastian Raschka
Python Machine Learning - Third Edition

Python Machine Learning - Third Edition

Sebastian Raschka, Vahid Mirjalili

Publisher Resources

ISBN: 9781119545637Purchase book