What is the difference between Regression and classification ML techniques.
Classification and regression are two basic concepts in supervised learning. However, understanding the difference between the two can be confusing and can lead to the implementation of the wrong algorithm for prediction. If we can understand the difference between the two and identify the algorithm that has to be used, then structuring the model becomes easy.
Classification and regression follow the same basic concept of supervised learning i.e. to train the model on a known dataset to make predict the outcome.
Here the major difference is that in the classification problem the output variable will be assigned to a category or class (i.e. it is discrete), while in regression the variable output is a continuous numerical value.
In regression, we try to predict results within a continuous output dataset, i.e. we try to map our input variables to some continuous function. We then use the continuous function to predict the output of new inputs.
While in classification, we instead try to predict results by categorizing the input datasets during machine learning.
Given data about the size of houses on the real estate market, try to predict their price. Price as a function of size is a continuous output, so this is a regression problem.
We could turn this example into a classification problem by instead making our output about whether the house “sells for more or less than the asking price.” Here we are classifying the houses based on price into two discrete categories.