Why almost the same optimization function gives different results?

12 次查看(过去 30 天)
Hello,
I am trying to optimize ECOC classifier as follows:
%data
clear all
load fisheriris
X = meas;Y = species;
rng default
t_gaussian=templateSVM('KernelFunction','gaussian','standardize',true)
Mdl_gaussian = fitcecoc(X,Y,'Coding','onevsall','Learners',t_gaussian,'OptimizeHyperparameters','auto',...
'HyperparameterOptimizationOptions',struct('CVPartition',CVO,'Optimizer','bayesopt','AcquisitionFunctionName',...
'expected-improvement-plus'))
I am wondering why I did not find the same results if I remplace 'OptimizeHyperparameters','auto' with 'OptimizeHyperparameters',{'BoxConstraint','KernelScale'}
rng default
Mdl_g = fitcecoc(X,Y,'Coding','onevsall','Learners',t_gaussian,'OptimizeHyperparameters',{'BoxConstraint','KernelScale'},...
'HyperparameterOptimizationOptions',struct('CVPartition',CVO,'Optimizer','bayesopt','AcquisitionFunctionName',...
'expected-improvement-plus'))
Best regards

回答(1 个)

Alan Weiss
Alan Weiss 2021-7-16
编辑:Alan Weiss 2021-7-18
I am not 100% sure, but my reading of the fitcecoc documentation shows that 'auto' has this description:
'auto' — Use {'Coding'} along with the default parameters for the specified Learners:
  • Learners = 'svm' (default) — {'BoxConstraint','KernelScale'}
So I think that 'auto' is equivalent to {'Coding','BoxConstraint','KernelScale'}.
Alan Weiss
MATLAB mathematical toolbox documentation
  1 个评论
Nadou
Nadou 2021-7-19
Hello Alan,
Thank you for your response
This is what I thought also while reading fitcecoc documentation. However, I found different results
Best regards

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Classification Ensembles 的更多信息

产品


版本

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by