Notes Binary Mulitclass Classification
Notes Binary Mulitclass Classification
A binary classification model is a model that can only distinguish between two
classes, such as yes or no, positive or negative, spam or not spam, etc. For
example, if you want to build a model that can detect whether an email is spam or
not, you would use a binary classification model. A binary classification model
usually outputs a probability score between 0 and 1 for each input, and then applies
a threshold to decide which class to assign. For example, if the score is greater than
0.5, the input is classified as positive, otherwise as negative.
Multi-class classification
Now to train these three classifiers, we need to create three training datasets.
After the training model, when we pass input test data to the model, then that data
is considered as input for all generated classifiers. If there is any possibility that
our input test data belongs to a particular class, then the classifier created for that
class gives a positive response in the form of +1, and all other classifier models
provide an adverse reaction in the way of -1. Similarly, binary classifier models
predict the probability of correspondence with concerning classes.
By analyzing the probability scores, we predict the result as the class index having
a maximum probability score.
we have a classification problem having three types: Green, Blue, and Red (N=3).
Each binary classifier predicts one class label. When we input the test data to the
classifier, then the model with the majority counts is concluded as a result.
Binary Classification
Multi-class Classification
One vs. One:- N-class instances then N* (N-1)/2 binary classifier models
An agriculture expert decides to study the crops that were ruined in a certain
region. He collects the data about recent climatic changes, water supply, irrigation
methods, pesticide usage, etc. To understand why the crops are turning black, do
not yield any fruits and dry out soon.
In the above example, the expert decides to collect the mentioned data, which act
as the independent variables. These variables will affect the dependent variables
which are nothing but the conditions of the crops. In such a case, using single
regression would be a bad choice and multivariate regression might just do the
trick.