How to optimize hyperparameters for fitcensemble using a customized maximize function?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi, I have been using fitcensemble method to minimize objective function by default, as I can get the minimum objective result from mdl, which is a ClassificationEnsemble
mdl = fitcensemble(XTrain,yTrain,...
'OptimizeHyperparameters',auto,...
'Learners',template, ...
'HyperparameterOptimizationOptions',hyperoptsOptions,...
'ScoreTransform','logit',...
'CategoricalPredictors', isCategoricalPredictor,...
'PredictorNames', predictorNames);
minObj = mdl.HyperparameterOptimizationResults.MinObjective;
Is it possible to get a customized maximize function from fitcensemble function?. If yes, could you provide me an example please?
Thank you
2 comentarios
Alan Weiss
el 15 de Nov. de 2020
I do not understand what you are trying to do. fitcensemble tries to fit a classification ensemble by minimizing an error. What sense would it make to maximize an error?
Alan Weiss
MATLAB mathematical toolbox documentation
Respuestas (1)
Alan Weiss
el 17 de Nov. de 2020
I am not sure, but maybe you can use the fitcensemble 'Cost' name-value argument. Give the negative of your customized accuracy measure in order that fitcensemble will look for a maximum. Or maybe give a constant minus the customized accuracy where you choose the constant so that the cost will always be positive, but not too large so that the differences still matter.
Alan Weiss
MATLAB mathematical toolbox documentation
0 comentarios
Ver también
Categorías
Más información sobre Classification Ensembles 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!