How to do grid Search to optimize sigma using Matlab?
Show older comments
Hi;
I new to SVM, hence, please consider this when you answer the question.
I'm trying to classify IRIS data using matlab. I choose fitcecoc becouse it can classify multiple features and classes.
Next, I need to search for the best value for sigma. My understanding I need to do something called "grid Search". However, I have no clue how to do grid Search using Matlab.
Please, notice since I'm new to Matlab, I might be asking the wrong questions in the first place.
Accepted Answer
More Answers (1)
Don Mathis
on 24 Apr 2021
Nowadays you can just do this:
load fisheriris
bestModel = fitcecoc(meas, species, 'OptimizeHyperparameters','auto')
2 Comments
krishna Chauhan
on 19 Sep 2022
@Don Mathis So what does it signify here? Only cross validation as "one vs one", as this is the only parameter we can set before training. Please guide.
Don Mathis
on 19 Sep 2022
The 'OptimizeHyperparameters' argument tells fitcecoc to use Bayesian Optimization to optimize some of the hyperparameters. The Doc page below explains which hyperparameters are optimized. Gridsearch is simpler than Bayesian Optimization but usually is slower to find the best parameters when multiple parameters are being optimized.
Categories
Find more on Get Started with Statistics and Machine Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!