Supervised learning is one of the most common ways to start with machine learning. You give the model examples where the correct answer is already known, and the model learns patterns that connect inputs to labels.

The first practical decision is whether your problem is regression or classification.

That decision starts with the label. If you understand what the model should predict, you can usually choose the right model type, metric, and evaluation approach.

Quick Answer

Use regression when the label is a continuous number, such as price, fare, duration, or weight. Use classification when the label is a category, such as fraud/not fraud, spam/not spam, churn/no churn, or approved/rejected.

Regression answers “how much?” Classification answers “which class?” Many beginner mistakes happen when the label is not defined clearly before training starts.

Key Takeaways

  • Supervised learning requires labeled data.
  • Regression predicts numeric values.
  • Classification predicts categories.
  • Logistic regression is commonly used for binary classification.
  • The label type determines the model type and evaluation metric.
  • The same business problem can sometimes be framed as regression or classification.
  • Classification thresholds should be chosen based on the cost of mistakes.

What Is Supervised Learning?

Supervised learning uses examples like this:

FeaturesLabel
customer age, account age, plan typechurn or not churn
pickup location, dropoff location, distancetaxi fare
transaction amount, merchant, locationfraud or not fraud
email text, sender, linksspam or not spam

The model learns from the relationship between features and labels.

Start With The Label

Before choosing an algorithm, write the label in plain language.

QuestionExample labelLikely problem type
How much will this cost?fare_amountRegression
How long will this take?delivery_minutesRegression
Will the customer churn?churn_yes_noClassification
Is this transaction suspicious?fraud_yes_noClassification
Which support category fits this ticket?ticket_categoryMulticlass classification
What demand is expected next week?units_soldRegression or forecasting

If the label is unclear, the model will be unclear. A useful supervised learning project starts with a label that is measurable, available, and connected to a real decision.

Regression

Regression predicts a continuous numeric value.

Examples:

  • house price,
  • taxi fare,
  • delivery time,
  • customer lifetime value,
  • product demand,
  • baby weight,
  • temperature.

Regression asks: “How much?” or “How many?”

Common regression metrics include:

  • MAE,
  • MSE,
  • RMSE,
  • R-squared.
MetricWhat it helps with
MAEEasy-to-understand average error
RMSEPenalizes large errors more strongly
R-squaredExplains how much variation the model captures

Use regression when the exact amount matters. For example, predicting delivery time as 43 minutes is a regression task. Turning it into “late” or “not late” makes it a classification task.

Classification

Classification predicts a category.

Examples:

  • fraud or not fraud,
  • churn or not churn,
  • spam or not spam,
  • approved or rejected,
  • high risk, medium risk, or low risk.

Classification asks: “Which class?”

Common classification metrics include:

  • accuracy,
  • precision,
  • recall,
  • F1 score,
  • ROC AUC,
  • confusion matrix.
MetricWhat it helps with
AccuracyOverall correctness when classes are balanced
PrecisionHow often positive predictions are correct
RecallHow many actual positives are found
F1 scoreBalance between precision and recall
Confusion matrixShows where predictions are wrong

Use classification when the decision is about a class or action. For example, “approve or reject,” “high risk or low risk,” and “spam or not spam” are classification tasks.

How To Decide Between Regression And Classification

QuestionIf yesUse
Is the label a number with continuous meaning?Predict amount, time, price, distanceRegression
Is the label a category?Predict class, segment, outcomeClassification
Is the label yes/no?Predict probability and thresholdBinary classification
Are there multiple categories?Predict one of many labelsMulticlass classification

Same Problem, Different Framing

Some business problems can be framed more than one way.

Business questionRegression framingClassification framing
Customer churnPredict churn probability or expected revenue lossPredict churn / no churn
Delivery operationsPredict delivery minutesPredict late / not late
Loan riskPredict expected loss amountPredict default / no default
Support prioritizationPredict expected resolution timePredict high / medium / low priority
Sales forecastingPredict revenue amountPredict will hit target / will miss target

The best framing depends on the action. If the business needs an exact number, regression may fit. If the business needs a decision category, classification may fit better.

Logistic Regression In Plain English

Despite the name, logistic regression is commonly used for classification.

It takes a linear model and passes the output through a sigmoid function so the result becomes a probability between 0 and 1.

That is useful because many business questions are probability questions:

  • What is the probability this user will buy?
  • What is the probability this transaction is fraud?
  • What is the probability this email is spam?

After getting a probability, you still need a decision threshold.

For example:

  • if probability of fraud is above 0.80, flag it,
  • if probability of churn is above 0.65, send retention offer,
  • if probability of spam is above 0.90, move to spam folder.

Thresholds Matter

A classification model may output a probability, but the business often needs an action.

Changing the threshold changes the tradeoff:

  • a lower threshold catches more positives but may create more false alarms,
  • a higher threshold reduces false alarms but may miss more real positives.

Use precision, recall, and ROC curves to choose thresholds based on the real cost of mistakes.

Lower thresholdHigher threshold
Catches more likely positivesCreates fewer false alarms
Can increase recallCan increase precision
May create more manual review workMay miss important cases
Useful when missing a case is costlyUseful when false alarms are costly

For fraud, a lower threshold may be acceptable if the review team can handle more alerts. For customer retention, a lower threshold may create too many unnecessary offers. Thresholds are business decisions, not only technical settings.

Real-World Example

Imagine a company wants to identify customers who may cancel their subscription.

The team could frame the problem as classification: churn or no churn. That helps customer success teams decide which accounts need outreach.

The team could also frame the problem as regression: expected revenue at risk. That helps leadership prioritize accounts by potential business impact.

Both framings may be useful, but they answer different questions. The classification model helps decide who needs attention. The regression model helps estimate how much revenue may be affected.

This is why supervised learning starts with the decision, not the algorithm.

Beginner Practice Exercise

Take five problems and classify them:

ProblemRegression or classification?
Predict monthly revenueRegression
Predict whether a loan defaultsClassification
Predict delivery timeRegression
Predict whether an image contains a product defectClassification
Predict house priceRegression

This habit prevents many early modeling mistakes.

Common Beginner Mistakes

  • choosing a model before defining the label
  • using regression when the business needs a decision category
  • using classification when the business needs a numeric estimate
  • judging classification only by accuracy when classes are imbalanced
  • ignoring the cost of false positives and false negatives
  • treating logistic regression as a regression model because of the name
  • training before checking whether labels are reliable
  • using features that would not exist at prediction time

Official Resources

FAQ

Can a numeric value become a classification problem?

Yes. You can turn a continuous value into categories. For example, a tip percentage can become low, average, or high.

Is linear regression only for straight lines?

Basic linear regression learns linear relationships, but features and transformations can make the model more expressive.

Is classification always yes or no?

No. Binary classification has two classes, while multiclass classification has three or more classes.

Bottom Line

Before training a model, identify the label. If it is a continuous number, think regression. If it is a category, think classification.

Good supervised learning starts with a clear question, a trusted label, useful features, and the right metric. Once those are clear, the model choice becomes much easier.