fr.inrialpes.exmo.align.impl.eval
Class AveragePRGraphEvaluator
java.lang.Object
fr.inrialpes.exmo.align.impl.eval.GraphEvaluator
fr.inrialpes.exmo.align.impl.eval.AveragePRGraphEvaluator
public class AveragePRGraphEvaluator
- extends GraphEvaluator
Compute the precision recall graph on 11 points
The first alignment is thus the expected one.
This is for legacy reason the first implementation of this function.
It does not follow the new standard GraphEvaluator protocol.
- Version:
- $Id: AveragePRGraphEvaluator.java 1196 2010-01-10 19:58:52Z euzenat $
The computation is remotely inspired from the sample programme of
Raymond J. Mooney
available under GPL from http://www.cs.utexas.edu/users/mooney/ir-course/
Mooney also provides the averaging of these graphs over several queries:
unfortunatelly, the resulting graph is not anymore a Precision/Recall graph
This works perfectly correctly. I mention below the point which are
mentionned as design points in a forecoming Exmotto entry:
[R=0%] What should be P when R is 0% (obviously 100%)
[R=100%] What should be P when R=100% is unreachable
[Interp.] How is a chaotic curve interpolated
Note: a very interesting measure is the MAP (mean average precision)
which is figuratively the area under the curve and more precisely
the average precision obtained for each correspondence in the reference
alignment.
The problem is that it can only be valid if the compared alignment has
provided all the correspondences in the reference.
Otherwise, it would basically be:
SUM_c\in correct( P( c ) ) / nbexpected
NOTE (JE:2010): This should be adapated for other notions of Precision and Recall
- Author:
- Jerome Euzenat
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
size
private int size
precisions
private double[] precisions
map
private double map
rawmap
private double rawmap
AveragePRGraphEvaluator
public AveragePRGraphEvaluator()
eval
public Vector<Pair> eval()
- Returns the points to display in a graph
- Specified by:
eval
in class GraphEvaluator
eval
public Vector<Pair> eval(Properties params)
- Compute precision and recall graphs.
- Specified by:
eval
in class GraphEvaluator
ingest
public void ingest(Alignment al,
Alignment reference)
- Overrides:
ingest
in class GraphEvaluator
evalAlignment
public void evalAlignment(Alignment align1,
Alignment align2)
throws AlignmentException
- Throws:
AlignmentException
write
public void write(PrintWriter writer)
throws IOException
- This output the result
- Throws:
IOException
writePlot
public void writePlot(PrintWriter writer)
- Overrides:
writePlot
in class GraphEvaluator
getPrecision
public double getPrecision(int i)
getMAP
public double getMAP()
getGlobalResult
public double getGlobalResult()
- Retuns a simple global evaluation measure if any
- Specified by:
getGlobalResult
in class GraphEvaluator
xlabel
public String xlabel()
- Specified by:
xlabel
in class GraphEvaluator
ylabel
public String ylabel()
- Specified by:
ylabel
in class GraphEvaluator
(C) INRIA & friends, 2003-${curryear}