In a real-world environment, you can imagine that a robot or an artificial intelligence won't always have access to the optimal answer, or maybe there isn't an optimal correct answer. You'd want that robot to be able to explore the world on its own, and learn things just by looking for patterns.

Think about the large amounts of data being collected today, by the likes of the NSA, Google, and other organizations. No human could possibly sift through all that data manually. It was reported recently in the Washington Post and Wall Street Journal that the National Security Agency collects so much surveillance data, it is no longer effective.

Could automated pattern discovery solve this problem?

Do you ever wonder how we get the data that we use in our supervised machine learning algorithms?

Kaggle always seems to provide us with a nice CSV, complete with Xs and corresponding Ys.

If you haven't been involved in acquiring data yourself, you might not have thought about this, but someone has to make this data!

A lot of the time this involves manual labor. Sometimes, you don't have access to the correct information or it is infeasible or costly to acquire.

You still want to have some idea of the structure of the data.

This is where unsupervised machine learning comes into play.

In this book we are first going to talk about clustering. This is where instead of training on labels, we try to create our own labels. We'll do this by grouping together data that looks alike.