Class AveragePrecisionCorrelation
public class AveragePrecisionCorrelation extends CorrelationIndex
This class is a singleton: methods must be invoked on INSTANCE
.
Additional methods inherited from CorrelationIndex
make it possible to
compute directly AP correlation bewteen two files, to bound the number of significant digits, or
to reverse the standard association between scores and ranks (by default,
a larger score corresponds to a higher rank, i.e., to a smaller rank index; the largest score gets
rank 0).
A main method is provided for commandline usage.

Field Summary
Fields Modifier and Type Field Description static AveragePrecisionCorrelation
INSTANCE
The singleton instance of this class. 
Method Summary
Methods inherited from class it.unimi.dsi.law.stat.CorrelationIndex
compute, compute, compute, compute, computeDoubles, computeDoubles, computeDoubles, computeDoubles, computeFloats, computeFloats, computeFloats, computeFloats, computeInts, computeInts, computeLongs, computeLongs, loadAsDoubles, parseInputTypes

Field Details

INSTANCE
The singleton instance of this class.


Method Details

compute
public double compute(double[] v0, double[] v1)Computes AP correlation between two score vectors.Note that this method must be called with some care. More precisely, the two arguments should be built onthefly in the method call, and not stored in variables, as the first argument array will be
null
'd during the execution of this method to free some memory: if the array is referenced elsewhere the garbage collector will not be able to collect it. Specified by:
compute
in classCorrelationIndex
 Parameters:
v0
 the first score vector.v1
 the second score vector (inducing the reference ranking). Returns:
 AP correlation.

main
