Learn / AI Literacy Bridge / Unit 2: Machines that learn from data
Draw your own classifier
Imagine a fruit sorter on a farm. Each fruit passes a camera that measures two things: weight and colour (from green to red). The sorter must decide: apple or lime?
Plot every fruit as a dot — weight on one axis, colour on the other — and something useful appears: apples cluster in one region, limes in another. A simple classifier is just a line that separates the two groups. Dots on one side are called apples; on the other, limes.
Below, drag the two handles to place the line yourself. The accuracy updates as you move it. Try to get every fruit on the correct side.
Then press Let the machine learn. The algorithm (a perceptron, one of the oldest learning methods) starts with a random line and, each time it misclassifies a fruit, nudges the line slightly toward the correct answer. Watch it improve, step by step, without anyone telling it the rule.
This is the heart of machine learning: a model with adjustable parts, examples with correct answers, and a procedure that reduces mistakes. Bigger models have millions or billions of adjustable parts instead of a line's two, but the idea is the same.
This lesson includes a hands-on interactive. Open the interactive version to try it and save your progress.