Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

self organizing map accuracy

i have a self organizing map c++ code which give me an accuracy for recognition system but when using this code i have a wrong accuracy by classification function anyone here can tell me where is the error with this code or give me better code for accuracy

 void  Network::classify()
{float acc;

int f=0;
for(int i=0; i<TstImgNum;i++)
{
    if((ilayer->ID[i])==label[i])
        f++;
}
 acc=((float) f / (float)TstImgNum) *100;
cout <<"\nSOM ACC="<<(((float) f / (float)TstImgNum) *100)<<"%";
cout <<"\nSOM ACC="<<acc<<"%/n";
}