How to fix coding method (e.g.,'onevsall') in performing hyperparameter optimzation in multi-class svm (i.e., fitcecoc.m)
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Don Mathis
el 26 de Oct. de 2018
Editada: Don Mathis
el 26 de Oct. de 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 comentarios
Ver también
Categorías
Más información sobre Classification en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!