AP® Computer Science Principles · Big Idea 2 · Topic 2.4

Clustering, Classifying, and the Scale of Big Data

Clustering groups similar records together with no labels given in advance, while classifying sorts new records into categories learned from past examples. Both become jobs for many computers once data grows too large for one machine.

A data set grows past what one computer can handle for simple reasons: limited memory, limited processing speed, and limited time. A million records might fit on a laptop. A billion transactions, images, or sensor readings will not, at least not in any reasonable time. Once that happens, the only way forward is to split the work across many machines running at once, which is called parallel or distributed computing.

Clustering is how a computer finds structure in data with no help from a human. Feed it ten thousand unlabeled customer records, and a clustering algorithm looks at patterns, like spending habits or age, and groups similar records together into segments. Nobody told it what the segments should be in advance; it discovers them from similarity alone. Classifying is different: it starts from labeled examples. Show an algorithm thousands of past emails already marked spam or not spam, and it learns which patterns, like certain words or sender addresses, tend to go with each label. Then it applies that pattern to sort new incoming email into the same two piles.

Both tasks scale badly as data grows, which connects straight back to distributed computing. Splitting n records evenly across k machines gives each machine n divided by k records to process, so the work per machine shrinks as more machines join in. But splitting the data also means combining partial results afterward, coordinating machines, and tolerating the fact that any one machine might fail. This tradeoff between speed gained and coordination cost is the real story behind why big data needs big, distributed systems rather than one very powerful computer.

Key terms

Clustering
Grouping records by similarity in the data itself, with no predefined categories or labels supplied in advance.
Classifying
Sorting new data into known categories by matching patterns learned from already-labeled examples.
Parallel computing
Running multiple computations at the same time, often on different machines, to finish faster.
Distributed computing
Splitting a data set and its processing across many separate machines that coordinate to produce one result.

Watch it explained

  1. How it worksHow does clustering group similar records together without anyone labeling them first?
  2. How it worksWalk me through classifying incoming email into two piles from patterns in past messages.
  3. Going furtherWhat changes about processing a data set once it is split across a thousand machines?
  4. Ties togetherHow does the size of a data set connect to the need for parallel and distributed computing?

Check yourself

Your turn1 of 2
A data set of 69945 records is split evenly across 34 machines for parallel processing. How many records does each machine handle?

End of topic.