% Copyright (c) 2015 The Johns Hopkins University/
% Applied Physics Laboratory. (JHU/APL)
% 
% This material was developed by JHU/APL under U.S. Government contract.
% The U.S. Government has Unlimited Rights in this material per
% DFARS 252.227-7013/7014, as appropriate.
% 
% For any other permission, please contact the Legal Office at JHU/APL.
%
function s = calcMops( TP, FN, FP )
    s.recall            = TP ./ (TP + FN);
    s.precesion         = TP ./ (TP + FP);   
    s.completeness      = s.recall;
    s.correctness       = s.precesion;
    s.fscore            = (2 .* s.recall  .* s.precesion) ./ (s.recall + s.precesion);
    s.jaccardIndex      = TP ./ (TP + FN + FP);
    s.branchingFactor   = FP ./ TP;
    s.missFactor        = FN ./ TP;
end

