?? accuracy.m.svn-base
字號(hào):
function acc = accuracy(trueY, predictedY, ranking)
%Compute the accuracy of a set of predictions for binary labels
%In the multi label case, all labels must be correct for 1 example
if (nargin < 2)
fprintf('%s\n', help(sprintf('%s', mfilename)));
error('Incorrect number of inputs - see above usage instructions.');
end
[numExamples, numLabels] = size(trueY);
acc = sum(sum(trueY == predictedY, 2) == numLabels)/(numExamples);
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -