Grid Search Function for Neural Networks
I created this function for my projects to find best hyper-parameters of Neural Networks.
It takes 5 different hyper-parameters such as;
- hidden node size of layer 1
- hidden node size of layer 2
- optimizer type
- maximum epoch
- transfer function
There is an example code block top of the function. You just add which hyper-parameters you want to try. Function will try 10-fold cross validation of each combination that is created using your hyper-parameters. Finally, find best hyper-parameter combination and return these as cell. You can use the cell directly as parameters of your Neural Network.
You need to give train with label, function automatically create %90 train %10 validation dataset.
New version is coming with more features.
Cite As
caghangir (2026). Grid Search Function for Neural Networks (https://www.mathworks.com/matlabcentral/fileexchange/63132-grid-search-function-for-neural-networks), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 | minor fixed |
