Regression, classification and clustering are the three machine learning techniques the exam expects you to tell apart from a one-line business problem. The trick is to look at the shape of the answer the business wants: a number, a category or a set of groups nobody has named yet. Get that right and the technique follows.
Regression: Predicting a Number
Regression predicts a value on a continuous scale: a price, a temperature, a number of units, a delivery time. If the answer could be 212.5 or 213.7 and both make sense, you're looking at regression.
Examples:
- Estimating a house's sale price from its size, location and age.
- Predicting next week's sales volume for a store.
- Estimating how many minutes a delivery will take.
Regression is supervised learning: the model trains on past examples where the right number is known, which is called labeled data. Forecasting future values over time, such as monthly demand, is a special case of regression on time-ordered data.
Classification: Predicting a Category
Classification predicts which category something belongs to, from a fixed list decided in advance.
- Binary classification has two possible answers: fraud or not fraud, will cancel or will stay, spam or not spam.
- Multiclass classification has more than two: which of five departments should handle a support ticket, or which product category an item belongs to.
Classification is also supervised. The model learns from past examples that are already labeled with the correct category.
Clustering: Finding Groups Nobody Has Named
Clustering puts similar items together when there are no labels at all. You don't tell the model what the groups are. It finds them from the data, and people interpret them afterwards.
A retailer might cluster its customers by purchase behavior and discover segments such as "weekend bargain hunters" and "premium regulars", then design a campaign for each. Clustering is unsupervised learning because no correct answers are provided. The number of groups is often a choice the team makes and then adjusts until the segments are useful.
Telling Them Apart
| Ask... | Answer | Technique |
|---|---|---|
| Is the output a number on a scale? | Yes | Regression |
| Is the output one of a known set of labels? | Yes | Classification |
| Are there no labels, and the goal is discovering groups? | Yes | Clustering |
On AWS, Amazon SageMaker AI offers built-in algorithms for all three. For example, Linear Learner handles regression and classification, XGBoost is a common choice for classification and regression on tabular data, and K-Means handles clustering. The exam cares more about choosing the technique than naming the algorithm.
On the Exam
The word "group" can mislead you. If a scenario sorts items into categories that already exist and has labeled history, such as routing tickets to known departments, that's classification, not clustering. Clustering is only right when the groups are unknown in advance. Similarly, "predict whether" means classification, while "predict how much" or "how many" means regression.