How to fix coding method (e.g.,'onevsall') in performing hyperparameter optimzation in multi-class svm (i.e., fitcecoc.m)
3 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Don Mathis
2018 年 10 月 26 日
編集済み: Don Mathis
2018 年 10 月 26 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Classification についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!