Real-world case: Three irises, four measurements and one very useful line
1935 to 1936 · Edgar Anderson's iris measurements and Fisher's discriminant
In 1935 the botanist Edgar Anderson measured iris flowers on the Gaspé Peninsula in Canada. For each flower he recorded the length and width of two parts, the sepals and the petals. The collection came to 150 flowers, 50 from each of three species: Iris setosa, Iris versicolor and Iris virginica.
In 1936 the statistician Ronald Fisher used those measurements to ask a question about classification. What combination of the four measurements, he asked, best tells the species apart? His answer, published in the Annals of Eugenics (today the Annals of Human Genetics), introduced the linear discriminant: a weighted score from the features, with a straight boundary between the classes.
The result was not equally clean for every pair. One species, setosa, separates clearly from the other two. The other two, versicolor and virginica, overlap a little, so even the best straight boundary mislabels a few flowers. The data set became the standard small test case for classification methods, and it is still used to teach them.
How the case shows what you learned in this module
| Module idea | In the case |
|---|---|
| Features and classes | Four measurements per flower, three species as the classes to predict. |
| A score and a boundary | Fisher combined the features into one weighted score and cut it with a line. |
| Separable and not | One species is cleanly separate; the other two overlap, so some errors remain. |
| A baseline exists | With 50 flowers per species, always guessing one species scores about 33 percent. |
Workplace takeaway. A good classifier turns several features into one score, draws a boundary through it and reports honestly the cases it still gets wrong.
Sources: Fisher (1936), The Use of Multiple Measurements in Taxonomic Problems, Annals of Eugenics 7; Anderson (1935), The irises of the Gaspé Peninsula, Bulletin of the American Iris Society 59; Iris flower data set, Wikipedia; Fisher's Pioneering Work on Discriminant Analysis, arXiv:2309.04774
Discussion prompt
20 minutes. Choose a decision in your work or study that sorts cases into two classes. In 150 to 200 words, name the features, say whether a threshold, a line or similar cases would suit it, which mistake costs more, and how you would check it on cases it has not seen.
Private: nothing you type here is sent or stored.
This course has no discussion board yet, so the prompt is a private reflection.
Recap
- Classification predicts a class from features; a threshold rule uses one feature.
- With two features a linear rule gives a straight decision boundary.
- Nearest neighbours classify by a vote of the closest labelled cases, and distances depend on scale.
- Some patterns, such as exclusive-or, are not linearly separable; flexibility must be checked on unseen cases.
Flashcards: 12 workplace review cards
Tap a card to reveal the answer. Read the question, answer it aloud or in writing first, then check yourself against the explanation.
Card 1 of 12 · What is classification?
Predicting a category, called a class, from features. A mail system choosing inbox or spam from link count, sender and wording is classifying.
Card 2 of 12 · What is a threshold rule?
A rule that compares one feature with a cut-off, such as spam if the email has at least three links.
Card 3 of 12 · How do you pick a threshold?
Try several on known cases, compare accuracy against the majority baseline and break ties by the cost of each kind of mistake.
Card 4 of 12 · Why must a classifier beat the majority baseline?
If half the cases are spam, always guessing one class scores 50 percent, so a rule at 50 percent has learned nothing.
Card 5 of 12 · What is a score?
One number built from several features, such as income minus debt. Cases are classed by comparing the score with a cut-off.
Card 6 of 12 · What is a decision boundary?
The set of cases where the class changes. With two features and a linear score it is a straight line, such as income minus debt equal to 10.
Card 7 of 12 · How do you score a linear rule?
Classify every known case and count the wrong ones. Seven right out of eight is 87.5 percent, against a baseline of 62.5 percent.
Card 8 of 12 · What is k-nearest neighbours?
Classify a new case by the classes of the k closest labelled cases, using a majority vote. It needs no fitted line.
Card 9 of 12 · What is city-block distance?
The sum of the gaps in each feature. From (5, 5) to (4, 5) it is 1; from (5, 5) to (8, 6) it is 4.
Card 10 of 12 · What does the choice of k do?
A small k follows noise because one odd case decides. A large k blurs real differences. Choose k using cases not used to fit.
Card 11 of 12 · What is linear separability?
Two classes are linearly separable if one straight line puts all of one class on one side and all of the other on the other.
Card 12 of 12 · What is the exclusive-or problem?
The class is Yes only when exactly one of two inputs is 1. The Yes cases are on opposite corners, so no single line works. A curved boundary or a new feature solves it.
Module notes
Key terms. Class: the category predicted. Feature: an input used to predict. Threshold: the cut-off in a rule. Score: a number combined from features. Decision boundary: where the class changes. k-nearest neighbours: classify by a vote of the k closest labelled cases. City-block distance: sum of the gaps in each feature. Linearly separable: one straight line splits the classes.
Rules and formulas. accuracy = correct ÷ all; score = x − y (example); boundary: score = cut-off; city-block distance = |x1 − x2| + |y1 − y2|.
Limits of this module. The examples use tiny invented tables so every figure can be checked by hand. Real classifiers use many more cases and features, rescaled inputs and a separate test set (Module 5), and judge mistakes by their cost (Module 6).
Next
Continue to Module 5: Generalisation: Training, Validation and Test Data. You can also return to the course overview or the University Track.
References and further reading
- Specialty Digest encyclopedia: Machine learning, Inference (machine learning), Deep learning, Regression Analysis and Occam’s Razor.
- All data in Module 1 are invented for teaching and are labelled as such.