MATLAB Answers

0

KNN hyperparameters optimisation - How not to show plots ?

Asked by Pierre Lonfat on 25 Apr 2018
Latest activity Commented on by Pierre Lonfat on 26 Apr 2018
This doesn't work... Can you please help me how to write the option correctly ?
classificationKNN = fitcknn(...
predictors, ...
response, ...
'OptimizeHyperparameters','auto',...
'HyperparameterOptimizationOptions','Showplots',false);
Grazie mille !

  0 Comments

Sign in to comment.

1 Answer

Answer by Alan Weiss
on 25 Apr 2018
Edited by Alan Weiss
on 25 Apr 2018
 Accepted Answer

The 'HyperparameterOptimizationOptions' value must be a structure. Like this:
myopts.ShowPlots = false;
myresult = fitcknn(...
predictors, ...
response, ...
'OptimizeHyperparameters','auto',...
'HyperparameterOptimizationOptions',myopts);
Alan Weiss
MATLAB mathematical toolbox documentation

  1 Comment

Thank you very much ! Amazing profile pic though !

Sign in to comment.