RePrec - compute recall precision curves
require RePrec::<Subclass>;
RePrec is an abstract class for computing recall precision curves. Subclasses implement different recall-precision curve interpretation measures. Theoretical background is given in detail by the Information Retrieval Lecture Notes by Norbert Fuhr (chapter 3, Evaluation). Web address: http://ls6-www.cs.uni-dortmund.de/ir/teaching/.
$rp = RePrec::<Subclass>->new($distribution)
constructor. Takes as argument a distribution. $distribution is a reference to an array containing a two element array reference for each rank (top most rank first). The first element within the references contains the number of relevant documents while the second one contains the number of non-relevant documents.
$visual = $rp->visual
returns a textual representation of the searchresult.
($graph, $average) = $rp->calculate([$points])
calculates precision values for $points. $points may be an integer (specifying for how many recall points precision is to be computed), an reference to a list of recall points, the string smart (implying the recall points 0.25, 0.50, and 0.75), the string trec (implying recall points 0, 0.1, 0.2, ..., 1), or the string rank (implying one recall point computed after each rank). If argument $points is omitted precision will be computed for ten recall points (i. e., 0.1, 0.2, ..., 1).
As a result you get a list of (recall, precision) pairs (array of array references with two elements each) and the averaged precision (over all recall points computed).
@precision = $rp->precision(@recall)
calculate precision for recall points in @recall. Returned is an array of (recall, precision) pairs (array of array references with two elements each). This method is abstract within this class, you need to choose the proper implementation from the subclasses (or overwrite it in your own RePrec subclass).
@precision = $rp->precision_rank
calculate precision after each rank. Returned is an array of (recall, precision) pairs (array of array references with two elements each).
$rp->gnuplot([$gnuplot])
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!
RePrec::Ceiling(3), RePrec::EP(3), RePrec::EP_ND(3), RePrec::PRR(3), RePrec::Raw(3), RePrec::Salton(3)
RePrec::Collection(3), RePrec::Collection::FERMI(3), RePrec::Collection::Paris(3), RePrec::Searchresult(3), RePrec::Searchresult::HySpirit(3)
RePrec::Average(3), RePrec::Tools(3), reprec(1)
gnuplot(1), perl(1)
Norbert Gövert <goevert@ls6.cs.uni-dortmund.de>
3 POD Errors
The following errors were encountered while parsing the POD:
You can't have =items (as at line 61) unless the first thing after the =over is an =item
=cut found outside a pod block. Skipping to next block.
To install RePrec, copy and paste the appropriate command in to your terminal.
cpanm
cpanm RePrec
CPAN shell
perl -MCPAN -e shell install RePrec
For more information on module installation, please visit the detailed CPAN module installation guide.