A binary classifier can solve binary classification problems by default. For example, logistic regression or a Support Vector Machine classifier can solve a classification problem if the target categorical variable can take any of two different values.
But, sometimes a dataset may contain a target categorical variable that can take more than two values. Such classification problems are called multiclass classification problems. Can we use binary classifiers to solve a multiclass classification problem?
The answer is we can. We can break the multiclass classification problem into several binary classification problems and solve the binary classification problems to predict the outcome of the target variable. There are two multiclass classifiers that can do the job. They are called One-vs-Rest (OVR) classifier and One-vs-One (OVO) classifier.(One-vs-Rest vs. One-vs-One Multiclass Classification)
What is the One-vs-Rest (OVR) classifier?
The One-vs-Rest classifier breaks a multiclass classification problem into n binary classification problems where n is the number of different values the target variable can take. After that, the OVR classifier solves each binary classification problems to predict the output of the target variable.
Let’s look at an example. Let’s say the target variable of a multiclass classification problem can take any of the three values A, B, and C. The OVR classifier, in that case, will break the multiclass classification problem into the following three multiclass classification problems:
Problem 1: A vs. (B, C) Problem 2: B vs. (A, C) Problem 3: C vs. (A, B)
Now, the OVR classifier can solve each of these sub-problems to predict the target variable.
What is the One-vs-One (OVO) classifer?
Let’s look back at the previous example. The target categorical variable can take any of the three values A, B, and C. The OVO classifier, in that case, will break the multiclass classification problem into the following 3 binary classification problems:
Problem 1: A vs. B Problem 2: A vs. C Problem 3: B vs. C
So, if the target variable can take n different values, then the OVO classifier breaks the multiclass classification problem into n(n-1)/2 binary classification problems. After that, the OVO classifier solves each of these subproblems to predict the outcome of the target variable.






0 Comments