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.

ref:https://medium.com/swlh/what-are-classification-and-regression-3677987b9422#:~:text=Supervised%20learning%20can%20be%20further,two%20categories-%20classification%20and%20regression.&text=Here%20the%20major%20difference%20is,is%20a%20continuous%20numerical%20value.

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.

Example:

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.