How to fix coding method (e.g.,'onevsall') in performing hyperparameter optimzation in multi-class svm (i.e., fitcecoc.m)
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
The function fitcecoc.m allow to optimize hyperparamters for multi-class svm by seting up the parameter-vlaue pairs for 'OptimizeHyperparameters' and or 'HyperparameterOptimizationOptions', e.g.:
mdl = fitcecoc(x,y,'OptimizeHyperparameters','auto')
The code above will actually optimize three hyperparameters: coding (using either of ['onevsone' 'onevsall'], box constraint and kernel scale. I wonder if there is any way to fix the coding method (ie., not optimize the coding hyperparameter but use 'onevsall' not 'onevsone' that is set by default) and only optimize the two other hyperparameters.
It is found that even if a specific parameter-value pair of 'coding' and 'onevsall' is provided as arguments of fitcecoc.m, the hyperaparmeter optimation will override the coding method provided and use 'onevsone' for coding.
0 Kommentare
Antworten (1)
Don Mathis
am 26 Okt. 2018
Bearbeitet: Don Mathis
am 26 Okt. 2018
You are right that the optimization overrides statically specified variables values. That's mentioned in this "Note" on the Doc page for fitcecoc . So you will need to pass the variables to be optimized individually, like this:
mdl = fitcecoc(x,y,'Coding','onevsall','OptimizeHyperparameters',{'KernelScale','BoxConstraint'})
0 Kommentare
Siehe auch
Kategorien
Mehr zu Classification finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!