After training of ANN and building the model through ANN toolbox of Matlab, in the output generation dialogue box, we can generate ANN codes by clicking on Matlab Code Generation.
Then, the generated Mat file should be saved in a file called ANN Fitness function. In this stage, through Global Optimization Toolbox, GA can be selected. Once GA is selected, it needs to call the objective function in the relevant tab. Now, we can call the ANN model as the fitness function for GA through the following syntax: @ANN Fitness function
After calling the ANN model as the fitness function for GA, how to determine the variables?
For example how can we make GA choose between 3 training algorithm which are trainlm, trainbr, trainscg and also tries 1-10 number of hidden neuron?