Neural Network Training/Optimization using Genetic Algorithm

11 visualizzazioni (ultimi 30 giorni)
I want to learn how can I train NN in Matlab NN tool box (or to optimize Weights and Neurons in hidden layer if it is possible). To do so I used the folowing code :
But I get an error message:
Undefined function 'gaoptimset' for input arguments of type 'char'.
Error in GANN (line 25) ga_opts = gaoptimset('TolFun', 1e-8,'display','iter');
Could someone help me to resolve this probleme. Thanks in advance
Note: I'm using MATLAB R2012b

Risposta accettata

Alan Weiss
Alan Weiss il 19 Apr 2013
Do you have a Global Optimization Toolbox license? Check with the ver command:
ver
If you have a license, check that gaoptimset is on your path:
which gaoptimset
If you have a function or variable named gaoptimset, delete it. If you hae a Global Optimization Toolbox license but gaotimset cannot be found, either reinstall MATLAB or get help from Technical Support.
Alan Weiss
MATLAB mathematical toolbox documentation

Più risposte (1)

nou2
nou2 il 22 Apr 2013
Thank you Alan for your response. Using the ver command It appears that I have the Optimization Toolbox Version 6.2.1 (R2012b). Using which gaoptimset I got the folowing message: C:\Program Files\MATLAB\R2012b\toolbox\globaloptim\globaloptim\gaoptimset.m % Has no license available (same thing for ga and globalSearch but not for fminsearch). Neveretheless when I go to Files\MATLAB\R2012b\toolbox\globaloptim\globaloptim\gaoptimset.m I find the code for all functions which seems to me paradoxal. I'll try to contact the Technical Support.

Community Treasure Hunt

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

Start Hunting!

Translated by