Classification vs Regression

Guhan prijesh
hackgenius
Published in
3 min readOct 10, 2022

In this blog we are going to see about classification and regression types of algorithms in Machine Learning.

In machine learning the classification and regression falls under supervised learning.

Supervised Learning

It is a subcategory of machine learning and artificial intelligence.

Supervised learning is the machine learning task of learning a function that maps an input to an output based on example input-output pairs. It infers a function from labeled training data consisting of a set of training examples.

supervised learning

Regression

Regression is a technique for investigating the relationship between independent variables or features and a dependent variable or outcome. It’s used as a method for predictive modelling in machine learning, in which an algorithm is used to predict continuous outcomes

A regression is a statistical technique that relates a dependent variable to one or more independent (explanatory) variables. A regression model is able to show whether changes observed in the dependent variable are associated with changes in one or more of the explanatory variables.

Regression algorithms

  • Simple Linear Regression
  • Multiple Linear Regression
  • Polynomial Regression
  • Support Vector Regression
  • Decision Tree Regression
  • Random Forest Regression

Classification

Classification refers to a predictive modeling problem where a class label is predicted for a given example of the input data.

In machine learning utilize input training data for the purpose of predicting the likelihood or the probability of that the data that follows will fall into one of predetermined categories.

Classification

Classification algorithm types

  • Logistic Regression
  • K-Nearest Neighbours
  • Support Vector Machines
  • Kernel SVM
  • Naïve Bayes
  • Decision Tree Classification
  • Random Forest Classification

Difference

  • A regression algorithm can predict a discrete value which is in form of an integer quantity
  • A classification algorithm can predict a continuous value is in the form of a class label probability
Regression vs Classification

A regression algorithm can be used in this case to predict the height of any student based on their weight, gender, diet, or subject major. Then we use regression in this case because height is a continuous quantity. It is an infinite number of possible values for a person’s height.

Classification can be used to analyze whether the email is a spam or not The algorithm checks the keywords in an email and the sender’s address is to find out the probability of the email is spam. Similarly, while a regression model can be used to predict temperature for the next day, we can use a classification algorithm to determine whether it will be cold or hot according to the given temperature values.

--

--

Guhan prijesh
hackgenius

SDV Engineer | IT Grad | Engineer | Tech enthusiast | Interested in learning | Eager to explore | Problem Solving