What is the difference between classification and regression?

Supervised learning methods include regression and classification techniques. Both algorithms employ labelled datasets and are used for prediction in machine learning. However, how they are applied to various machine learning issues is where they diverge from one another.

The main distinction between classification and regression algorithms is that classification algorithms are used to predict/classify discrete values such as Male or Female, True or False, Spam or Not Spam, etc. while regression algorithms are used to predict/classify continuous values such as price, salary, age, etc.

We can visually see the difference between the both using the following graphs:

Finding a function to divide the dataset into classes based on several parameters is the process of classification. In classification, data is divided into various classes by a computer program that has been trained on the training dataset. Finding the mapping function to convert the input (x) to the discrete output (y) is the goal of the classification algorithm.

Classification Algorithms can be further divided into the following types:

  • Logistic Regression

  • K-Nearest Neighbours

  • Support Vector Machines

  • Kernel SVM

  • Na├»ve Bayes

  • Decision Tree Classification

  • Random Forest Classification

Finding correlations between dependent and independent variables is the process of regression. It aids in the forecast of continuous variables like market trends, house values, and other things.

The task of the Regression algorithm is to find the mapping function to map the input variable(x) to the continuous output variable(y).

Different types of regression models:

  • Simple Linear Regression

  • Multiple Linear Regression

  • Polynomial Regression

  • Support Vector Regression

  • Decision Tree Regression

  • Random Forest Regression