The Perl Advent Calendar needs more articles for 2022. Submit your idea today!


RePrec - compute average of recall-precision curves


  require RePrec::Average;
  $av = RePrec::Average->new(@reprecs);


Given some recall-precision RePrec(3) oobjects the average precision over same recall points is calculated (macro measure).


    $av = RePrec::Average->new(@reprecs)

    constructor. @reprecs is an array of RePrec(3) objects.

    ($graph, $average) = $rp->calculate([$points])

    calculates precision values for $points (see respective method in RePrec(3)). As a result you get a list of (recall, average precision) pairs (array of array references with two elements each) and the averaged average precision (over all recall points computed).


    plot curve with gnuplot(1). $gnuplot is a hash reference where parameters for gnuplot can be set.

    $rp->write_rpdata($file, [$average]);

    Write the recall-precision data to file(s). Writes data for average precision if $average is true.


Yes. Please let me know!


gnuplot(1), perl(1).


Norbert Gövert <>

3 POD Errors

The following errors were encountered while parsing the POD:

Around line 39:

You can't have =items (as at line 61) unless the first thing after the =over is an =item

Around line 79:

=cut found outside a pod block. Skipping to next block.

Around line 118:

=cut found outside a pod block. Skipping to next block.