ai/machine-learning-by-example-how-a-computer-learns-apples-from-oranges.md

Machine learning by example: how a computer learns apples from oranges

AI · 11 min read ·

Normal programs follow rules a person wrote. Machine learning turns that around: you give the computer examples with the right answers, and it works out the rule itself.

Using a toy problem, telling apples from oranges by weight and colour, this page explains features, labels, models and predictions, then lets you train a real nearest-neighbour model on a chart. Slide one setting and watch it go from memorising its examples to ignoring them, and see why every model must be judged on test data it has never seen.