Skip to content
Handbook navigation

Full-access lesson

Unsupervised Learning

Take the 1,797 handwritten digits that ship with scikit-learn, remove the labels, and ask the k-means algorithm for ten groups. It returns ten groups, and 78% of the images land in a group dominated by their own digit: nearly every 0, 4 and 6 is gathered in one place, without the algorithm ever being told what a digit is. Now replace the images with 1,797 points of uniform random noise in the same 64 dimensions and ask again. It returns ten groups just as readily. And train a model with no labels at all on about 100 billion words of Google News, as Google researchers did in 2013, and it learns word vectors in which words with related meanings sit close together, and which, faithful to their data, associate "homemaker" with women.

The complete curriculum

All 12 volumes, companion resources, interviews, and architecture reviews.

Executable engineering practice

Subscriber-only Python, Java, TypeScript, and SQL labs in the isolated runner.

Unsupervised Learning | KnowledgeOS