topskill.dev
CoursesTracks
All courses/Machine Learning FundamentalsRegression or classification
Foundations and the ML process
4 / 8
← Machine Learning Fundamentals
○What machine learning learns○Features and labels○Training and inference●Regression or classification○The machine learning process○Data quality and coverage○Representing data✦Module Quiz
○Linear regression○Try a tiny linear model○Logistic regression○Nearest neighbors○Decision trees○Random forests○Boosting○Naive Bayes○Support vector machines✦Module Quiz
○Clustering○K-means○Choosing and interpreting clusters○Principal component analysis○Neural networks and deep learning○Self-supervised learning○Transfer learning○Reinforcement learning✦Module Quiz
○Generalization and overfitting○Holding out evaluation data○Data leakage○Baselines○Bias and variance intuition○Reading learning curves✦Module Quiz
○Prediction errors and residuals○Measuring regression error○Squared error and large misses○The confusion matrix○Precision and recall○Try a held-out classifier✦Module Quiz
○Bias and limits○Monitoring and drift○Comparing models for a decision✦Module Quiz
Foundations and the ML process

Regression or classification

The required output determines the prediction task.

  • Regression predicts a numerical amount, such as delivery duration in minutes.
  • Classification predicts a category, such as late or on time.

Classification with two possible categories is binary classification. With more than two mutually exclusive categories it is multiclass classification, such as identifying one of three package types.

A number used as a category name does not turn classification into regression. If 0 means on time and 1 means late, a prediction halfway between those labels is not a third delivery category. A model may estimate a probability between zero and one, but a separate decision rule converts it into a class.

For regression, the size of a miss matters: an estimate off by two minutes differs from one off by an hour. For classification, different wrong categories can have different consequences. Missing a late delivery and issuing an unnecessary warning are distinct errors.

A whole-number output can still be regression. Predicting tomorrow's order count concerns a numerical quantity, even though the observed count is an integer. Start with the decision and the meaning of an error, not the storage type of the target column.

Check your understanding

Is predicting a daily order count regression even though the answer is a whole number?

Answer: Yes. The target is a numerical amount, and the size of the error matters.

Fact 1
1 / 1
FACT 1

Yes. The target is a numerical amount, and the size of the error matters.