Code covered by the BSD License  

Highlights from
Computing the posterior balanced accuracy

image thumbnail

Computing the posterior balanced accuracy

by

 

A set of MATLAB functions for evaluating generalization performance in binary classification.

acc_mean(C)
% Expected value of the accuracy (i.e., the mean of a Beta distribution).
%
% Usage:
%     a = acc_ev(C)
%
% Arguments:
%     C - 2x2 confusion matrix of classification outcomes

% Kay H. Brodersen, ETH Zurich, Switzerland
% http://people.inf.ethz.ch/bkay/
% $Id: acc_mean.m 8245 2010-10-22 12:57:51Z bkay $
% -------------------------------------------------------------------------
function a = acc_mean(C)
    
    % Get alpha and beta
    A = C(1,1) + C(2,2) + 1;
    B = C(1,2) + C(2,1) + 1;
    
    % Compute mean
    a = A / (A + B);
    
end

Contact us