Alignment API and Server 3.5

fr.inrialpes.exmo.align.impl.eval
Class PRGraphEvaluator

java.lang.Object
  extended by fr.inrialpes.exmo.align.impl.BasicEvaluator
      extended by fr.inrialpes.exmo.align.impl.eval.PRGraphEvaluator
All Implemented Interfaces:
Evaluator

public class PRGraphEvaluator
extends BasicEvaluator

Compute the precision recall graph on 11 points The first alignment is thus the expected one.

Version:
$Id: PRGraphEvaluator.java 726 2008-06-25 14:23:27Z 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
Author:
Jerome Euzenat

Field Summary
private  Vector<Pair> points
           
private  double[] precisions
           
private  int STEP
           
 
Fields inherited from class fr.inrialpes.exmo.align.impl.BasicEvaluator
align1, align2, result
 
Constructor Summary
PRGraphEvaluator(Alignment align1, Alignment align2)
          Creation: A priori, evaluators can deal with any kind of alignments.
 
Method Summary
 double eval(Parameters params)
          Compute precision and recall graphs.
 double eval(Parameters params, Object cache)
          Run the evaluation between the two ontologies.
 double getPrecision(int i)
           
 void write(PrintWriter writer)
          This output the result
 void writeFullPlot(PrintWriter writer)
          This output the result
 void writePlot(PrintWriter writer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STEP

private int STEP

precisions

private double[] precisions

points

private Vector<Pair> points
Constructor Detail

PRGraphEvaluator

public PRGraphEvaluator(Alignment align1,
                        Alignment align2)
Creation: A priori, evaluators can deal with any kind of alignments. However, it will not work if these are not of the same type.

Method Detail

eval

public double eval(Parameters params)
            throws AlignmentException
Compute precision and recall graphs. The algorithm is as follows: 1) Order the pairs of the found alignment. 2) For

Throws:
AlignmentException

eval

public double eval(Parameters params,
                   Object cache)
            throws AlignmentException
Description copied from interface: Evaluator
Run the evaluation between the two ontologies. Returns a double (between 0 and 1) providing an idea of the proximity The additional argument allows to cache the ontologies if necessary //@deprecated The OntologyCache is now internal, use eval( params ) instead

Throws:
AlignmentException

write

public void write(PrintWriter writer)
           throws IOException
This output the result

Specified by:
write in interface Evaluator
Overrides:
write in class BasicEvaluator
Throws:
IOException

writeFullPlot

public void writeFullPlot(PrintWriter writer)
                   throws IOException
This output the result

Throws:
IOException

writePlot

public void writePlot(PrintWriter writer)
               throws IOException
Throws:
IOException

getPrecision

public double getPrecision(int i)

Alignment API and Server 3.5

(C) INRIA & friends, 2003-2008