Skip to content
AI Ready · aiready.sg
Menu

Part 2 · How AI Actually Works

Sorting Into Categories: Classification

4 minawareLesson 19 of 33Self-check inside
Sorting Into Categories: Classification · narrated video

AI can predict a number, like tomorrow's sales or a fair house price. But look at your inbox. Something already sorted each message into 'important' or 'spam.' No number in sight. Ask a hawker what a customer orders most, and the answer is a label too: is this bowl laksa or fishball noodle? Some questions do not want a number. They want a label.

Why This Matters

Classification is one of the two workhorses of everyday AI, and telling it apart from regression separates knowing what a tool can do for you from guessing. This is the heart of Understanding AI, the first step from being AI Aware to knowing which problems AI fits. By the end, you will be able to:

  • Explain how a classifier learns to sort inputs into categories.
  • Distinguish classification from regression by the kind of answer each gives.
  • Identify tasks in your own work where classification applies.

How a Classifier Learns to Sort

A classifier sorts an input into one of a fixed set of categories. To learn the difference, you show it many labelled examples (bowls of noodle soup already tagged laksa or fishball noodle) and it picks up the patterns that separate the labels: the colour of the broth, the noodles, the toppings. Show it a new bowl and it predicts a label. Because you supplied the answers during training, this is supervised learning, the same family as regression. The only difference is the answer: regression lands on a number along a scale; classification picks a category from a fixed list.

Two shapes of prediction: same family, different answer
RegressionClassification
Answers "how much?" A number on a scaleAnswers "which one?" A category from a fixed list
Example Tomorrow's sales, a fair house priceExample Laksa or fishball noodle, spam or not

So when does classification fit? Whenever the honest question is which one. Is this transaction fraud or legitimate? Which team should this ticket go to? Two categories or twenty, as long as the set is defined in advance, it is a classification task. One caution: a classifier always returns one of its known labels, even for an input it has never seen. Feed it a bowl of ramen and it will still answer laksa or fishball noodle, confidently. It cannot say 'none of these' unless you taught it that option.

Key Takeaway

Before you can classify, someone must define the categories and agree on them. Where the labels are fuzzy, that is the real work, and it is yours.

Check your understanding

Self-check only. Nothing is scored and nothing is recorded; open an answer to compare it with your own.

  1. A hospital wants an AI system to analyse chest X-rays and flag those that may show signs of pneumonia for priority review by a radiologist. The system should output either 'normal' or 'review needed' for each X-ray. Is this regression or classification, and what would the training data look like?

    • Regression, the system should output a severity score from 0 to 100.
    • Classification, the output is a category ('normal' or 'review needed'), and the training data would be thousands of X-rays each labelled by a radiologist as normal or abnormal.
    • Classification, but the training data only needs 50-100 examples to work.
    • Neither, medical decisions are too important for AI.
    Show the answer

    Classification, the output is a category ('normal' or 'review needed'), and the training data would be thousands of X-rays each labelled by a radiologist as normal or abnormal.

  2. Your team receives 500 customer feedback emails per week. Currently, a staff member reads each one and tags it as 'complaint,' 'compliment,' 'question,' or 'suggestion.' They want to explore using AI for this. Which approach is correct?

    • Use regression to predict a satisfaction score for each email.
    • Use classification, train on the thousands of emails already tagged by staff, and the model learns to sort new emails into the four categories automatically.
    • Use classification, but they would need to hire a data labelling company to create training data from scratch.
    • This task is too subjective for AI, it requires human judgement to tell a complaint from a suggestion.
    Show the answer

    Use classification, train on the thousands of emails already tagged by staff, and the model learns to sort new emails into the four categories automatically.

Saved in this browser only. Carry progress between devices with the resume link on the course page.