PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/entrega1/evaluate.m

http://github.com/melisabok/RedesNeuronales
Objective C | 14 lines | 9 code | 5 blank | 0 comment | 1 complexity | 682f235122e52f59a9f9ba89eb4877de MD5 | raw file
 1function[CantCorrectos, CantIncorrectos] = evaluate(P, T, W, b)
 2
 3[CantAtrib, CantPatrones] = size(P);
 4y = hardlim(W * P + b);
 5
 6CantCorrectos = sum((T == y));
 7
 8%fprintf('Cantidad de patrones bien clasificados = ');
 9%fprintf('%d \n', CantCorrectos)
10
11CantIncorrectos = CantPatrones - CantCorrectos;
12%fprintf('Quedaron mal clasificados = ')
13%fprintf('%d \n', CantIncorrectos)
14