Classification vs. Regression in Machine Learning — Which One Should I Use?

Farzad Mahmoodinobar
5 min readOct 24, 2022

Overview

Model selection in Machine Learning exercises is one of the foundational questions that we will need to find an answer for as a Data Scientist. In this post we continue our journey of learning about Data Science Role Requirements by learning more about model selection and specifically the differences between a regression and classification model.

We will first go over an introduction of each of the regression and classification models and then will do a comparison between the two.

Let’s get started!

Example of a Logistic vs. Linear Regression (Source: scikit-learn.org)

1. Regression Models

Regression models are used to predict a continuous output (or dependent) variable from input (or independent) variables. Some examples of such continuous output variables are quantities such as height, weight, salary, probability, etc.

Now that we understand what a regression model is, let’s look at some of the most common regression models:

1.1. Simple Linear Regression

This is when one independent variable (x) is used to predict a dependent variable (y). Equation of a line is one such example:

1.2. Multiple (or Multivariable) Linear…

--

--