7 lines
184 B
Mathematica
7 lines
184 B
Mathematica
|
function [er, bad] = nntest(nn, x, y)
|
||
|
labels = nnpredict(nn, x);
|
||
|
[dummy, expected] = max(y,[],2);
|
||
|
bad = find(labels ~= expected);
|
||
|
er = numel(bad) / size(x, 1);
|
||
|
end
|