% Returns harmonic mean of accuracy rate on positive examples (recall)
% and accuracy rate on negative examples.  Intended to be used with
% breakeven.m
%
% Written by Jason Rennie, February 2004
% Last modified: Tue Dec 13 10:16:04 2005

function [obj] = r1(np,nn,fp,fn)
  nrate = (nn-fp)/nn;
  prate = (np-fn)/np;
  obj = 2*nrate*prate/(nrate+prate);
