this question is related to "Does sklearn LogisticRegressionCV use all data for final model" (Does sklearn LogisticRegressionCV use all data for final model). The answer is cristal regarding how LogisticRecgressionCV works in the case of binary classification particularly how the C is being selected: "For each value of C, do the cross-validation of supplied data, in which the LogisticRegression will be fit() on training data of the current fold, and scored on the test data. The scores from test data of all folds are averaged and that becomes the score of the current C. This is done for all C values you provided, and the C with the highest average score will be chosen.". My question is ...how one can select the best C hyperparameter in the case of multi-class? In this case one gets an array of C that maps to the best scores across every class. How to select or calculate the best C, out of C_ array elements, that can be used for the final multi-class classification model ?
Asked
Active
Viewed 1,210 times
0
-
1Well, the question you linked gives the answer. For multi-class, OneVRest strategy is used in LogisticRegressionCV, which means that there will be those many models of LR trained as there are classes. Each model will use the value of C for that specific class from the found C_ array. – Vivek Kumar Sep 10 '18 at 13:27
-
2Welcome to Stackoverflow. Please edit your question to clarify your problem description and if possible some minimal code. Make some paragraphs and add some context. As it currently stands I doubt that anyone wants to **even read** your question. For guidance please check the [how to ask](https://stackoverflow.com/help/how-to-ask) page and [how to create a minimal example](https://stackoverflow.com/help/mcve) page – 5th Sep 10 '18 at 14:19