Clear Filters
Clear Filters

ANN using nprtool for classification using "Firefly algorithm"

3 views (last 30 days)
I am trying to train my ANN using nprtool in matlab for classification using "Firefly algorithm". This not being an in-built function, I am using the following line of code to train it :
net.trainfcn='firefly_simple'.
But this gives the following errors :
??? Error using ==> rand Output class must be 'single' or 'double'.
Error in ==> firefly_simple>init_ffa at 96 xn=rand(1,n)*xrange+range(1);
Error in ==> firefly_simple at 62 [xn,yn,Lightn]=init_ffa(n,range);
Error in ==> network.subsasgn>setTrainFcn at 2111 net.trainParam = feval(trainFcn,'pdefaults');
Error in ==> network.subsasgn at 481 [net,err]=setTrainFcn(net,trainFcn);
Please suggest a solution to the problem. Thanks !!
P.S. firefly_simple.m is the open source matlab code available on Mathworks.

Answers (0)

Categories

Find more on Deep 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!