As you know Supervised machine learning is one of the most commonly used types in machine learning. Supervised learning is used when we have examples of input and output data. We just build a model based on this input, output pairs to make an accurate prediction on unseen data.
Types of Supervised machine learning problems
Two major types of supervised machine learning problems are classification and regression.
When to use Classification in Machine Learning?
In classification, the machine learning algorithm role is to predict a label which is a choice from a predefined set of outcomes. Basically is used to predict which category the input data belongs to.
Predicting if an Adult makes <=50K or >=50K is one example of Classification. Read Classification with machine learning to know more about it. Another example is, checking a message is spam or not. So in simple words, you might be observed, classification is trying to answer a yes or no questions like “Is this messages spam or not?”. There is no option between YES or NO.
When to use Regression in Machine Learning?
In regression, the machine learning model role is to predict a continuous number. Predicting the chance of winning, or predicting annual income of a person based on the education, age, profession etc. If a person makes $500000 a year and our model predict $499999 or $500001, we don’t need to bother much about this.
Hope this post helps you to understand the difference and when to use them. Please share your feedback and suggestions in the comment section below.