ANN using nprtool for classification using "Firefly algorithm"
3 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Deep Learning Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!