Classification Vs Regression
In my previous article we discussed about supervised machine learning and these are types of supervised learning. Where Regression is prediction of continuous data such as price, certain value etc., On the other hand classification is prediction if discrete value such as True/False, yes/no etc.,
But both are trained on labelled datasets to predict when new data point comes. So let’s go into some details about both the algorithms.
Classification :
It is a process of finding a function that best fits the given data and differentiates them into preferred number of classes. As it trained with labels, It learns patterns in those and creates a function to separate them. When a new data point comes it maps input to a function f(x) which gives discrete value y as output. There are many types of algorithms out there to solve this kinda problems. Some of them are
- K-Nearest Neighbours
- Logistic Regression
- Naïve Bayes
- Decision Tree Classification
- Random Forest Classification
- Support Vector Machines

Here in above figure you can clearly see the line which is getting adjusted to separate 2 classes red and blue up to best possible extent minimizing the loss function and get a good decision boundary. To do this we have many optimizers which reduce loss function to make it happen. We will discuss about that in coming articles..
Regression:
It is an algorithm which finds the correlation ( It explains how one or more variables are related to each other) between dependent variables (output variables) and independent variables (input variables). It helps in predicting the continuous values such as predicting prices of houses, stock market prediction, amount of loan to be given etc.., Task of this algorithm is to map the input variable x with the continuous variable y based on the input parameters. It finds a best fit line to make continuous predictions, the line may be linear or non linear. Some of the Regression Algorithms are
- Multiple Linear Regression
- Simple Linear Regression
- Support Vector Regression
- Decision Tree Regression
- Random Forest Regression

Here, In the above figure the model is trying to find the linear line to fit all the data points in the best possible way. There are some optimizers which help in finding a best fit. So this is an introduction about classification and regression algorithms in supervised machine learning.
Thank You!!!! for reading my article, Stay Tuned for more such topics…..