CertBrain
CoursesBlog
Sign in
← Back to decks
Sign in to save your progress, vote, and build your own decks.Sign in

Regression, Classification and Clustering

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…

9 cards
Study this deck

Regression, Classification and Clustering

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...AnswerTechnique
Is the output a number on a scale?YesRegression
Is the output one of a known set of labels?YesClassification
Are there no labels, and the goal is discovering groups?YesClustering

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.

Quiz me on this
A real estate website wants to estimate the sale price of each listed home, using past sales data that includes square footage, location, age and the final sale price. Which ML technique fits this use case?
  1. ✓ Regression
  2. Binary classification
  3. Clustering
  4. Multiclass classification
A bank has ten years of loan records, each labeled with whether the borrower defaulted. It wants to predict, for each new applicant, whether that person will default. Which technique should the bank use?
  1. Regression, because the bank wants to predict a future outcome
  2. Clustering, because the applicants need to be sorted into risk groups
  3. Dimension reduction, because the records contain many features
  4. ✓ Binary classification, because each applicant gets one of two labels
An online retailer wants to discover natural segments in its customer base, based on purchase frequency, basket size and product preferences. It has no existing segment labels and wants the data to suggest the groups. Which technique should it use?
  1. Multiclass classification
  2. ✓ Clustering
  3. Regression
  4. Binary classification
A software company receives thousands of support tickets a day and wants each one sent automatically to one of its five support teams. It has 200,000 past tickets, each tagged with the team that resolved it. Which technique is MOST appropriate?
  1. Clustering, because the tickets need to be grouped into teams
  2. Regression, because the system predicts a team number from 1 to 5
  3. ✓ Multiclass classification, because each ticket gets one of five known labels
  4. Reinforcement learning, because the system should learn from routing mistakes
Regression
Supervised ML that predicts a number on a continuous scale, such as a price, a quantity or a duration.
Binary classification
Supervised ML that assigns one of two labels, such as fraud or not fraud.
Multiclass classification
Supervised ML that assigns one of three or more predefined labels, such as which department should handle a ticket.
Clustering
Unsupervised ML that groups similar items when no labels exist. People interpret the groups afterwards.
"Predict whether" vs "predict how much"
"Whether" (one of a set of outcomes) signals classification. "How much" or "how many" signals regression.