ANN using nprtool for classification using "Firefly algorithm"

조회 수: 5 (최근 30일)
Mayank Gupta
Mayank Gupta 2016년 5월 3일
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개)

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by