accuracyhist.m.svn-base

来自「a function inside machine learning」· SVN-BASE 代码 · 共 13 行

SVN-BASE
13
字号
function acc = accuracyHist(trueY, predictedY, ranking) 
%Compute the histogram of accuracies for a set of multi label binary
%predictions. First column is the frequency in each bin and the second is
%the bin centre. 

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 = histc(full(sum(trueY == predictedY, 2)/numLabels), (1:numLabels)'/numLabels);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?