How to change the default range of hyperparameters in fitcecoc function?
4 ビュー (過去 30 日間)
古いコメントを表示
Machine Learning Enthusiast
2021 年 7 月 24 日
コメント済み: Walter Roberson
2021 年 8 月 1 日
Is it possible to change the default paramater search range of fitcecoc function? I am trying to find the optimal paramters for SVM in custom range to reduce computational time. For example, I am trying to set below range for following parameters.
PolynomialOrder=[2,5]
Any suggestions in this regard would be highly appreciated.
Demo Example:
clc
clear all
load fisheriris
t = templateSVM();
results = fitcecoc(meas, species,'Learners',t,'OptimizeHyperparameters','auto',...
'HyperparameterOptimizationOptions',struct('Optimizer',...
'randomsearch'))
T=results.HyperparameterOptimizationResults
3 件のコメント
Don Mathis
2021 年 7 月 26 日
Walter Roberson's answer is correct. And then you pass 'params' as the value of the 'OptimizeHyperparameters' parameter.
採用された回答
Walter Roberson
2021 年 7 月 26 日
Set nondefault parameters by passing a vector of optimizableVariable objects that have nondefault values. For example,
load fisheriris
params = hyperparameters('fitcecoc',meas,species,'svm');
params(2).Range = [1e-4,1e6];
After you created params look at
{params.Name}
to see which variable is which, to know which one to set the Range for.
2 件のコメント
Walter Roberson
2021 年 8 月 1 日
I think you should be able to do
params(4).Range = {'gaussian', 'polynomial'};
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Classification Ensembles についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!