Suppose I am working on a multiclass classification problem (with N classes) and I want to use SVM as classification method.
I can adopt two strategies: One-Vs-One (OVO) and One-Vs-All (OVA). In the first case, I need to train N(N-1)/2 classifiers, namely, class1 vs class2, ..., class1 vs classN, ..., class(N-1) vs classN, while in the second case just N, namely class1 vs rest, ..., class N vs rest.
From my knowledge, the typical (and general) code for the two scenarios, included the tuning of the hyper-parameters, would be something as:
OVO
from sklearn import svm
from sklearn.model_selection import GridSearchCV
X = # features-set
y = # labels
params_grid = # whatever
clf = GridSearchCV(svm.SVC(), params_grid)
clf.fit(X, y)
OVA
from sklearn import svm
from sklearn.multiclass import OneVsRestClassifier
from sklearn.model_selection import GridSearchCV
X = # features-set
y = # labels
params_grid = # whatever
clf = GridSearchCV(OneVsRestClassifier(svm.SVC()), params_grid)
clf.fit(X, y)
My doubt is the following: the code above reported searches the best hyper-parameters shared between all the N(N-1)/2 or N classifiers, based on the strategy. In other words, the grid-search finds the "optimal" parameters in average between all the classifiers.
So, my question is: why not searching the best hyper-parameters set, one for each of the N(N-1)/2or N classifiers? I cannot find any reference on this topic, so I do not know if finding the best parameters separately for each classifier is conceptually wrong or if there is another explanation.