SVM Grid Search

Performing grid search for SVM, using the default Matlab toolbox.
1.3K Downloads
Updated 8 Jun 2015

View License

The main function svm_grid_search, preforms a grid search using the following parameters: name of the kernel to be used, values for the kernel, values for the boxconstraint, and values for the kktviolatonlevel level. It gives as output array with the trained SVMs, array showing if a SVM was not able to be trained (converge), and the accuracy for the train, validation and test sets. The function is easy to upgrade and mode.
You can use structures for I/O (in svm_grid_search_structure), or the standard way with listing all the variables (in svm_grid_search). For me the use of structures is more elegant, when having to pass a lot of the same variables between function, and it is easier to mode.

Cite As

Dian Bahnev (2024). SVM Grid Search (https://www.mathworks.com/matlabcentral/fileexchange/50869-svm-grid-search), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2013a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Statistics and Machine Learning Toolbox in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.1.0.0

In this update, using structures to wrap all the variables when passing them is made possible (in svm_grid_search_structure). It makes the code more elegant and readable.

1.0.0.0