fr.inrialpes.exmo.align.impl.eval
Class PRecEvaluator
java.lang.Object
fr.inrialpes.exmo.align.impl.BasicEvaluator
fr.inrialpes.exmo.align.impl.eval.PRecEvaluator
- All Implemented Interfaces:
- Evaluator
public class PRecEvaluator
- extends BasicEvaluator
Evaluate proximity between two alignments.
This function implements Precision/Recall/Fallout. The first alignment
is thus the expected one.
- Version:
- $Id: PRecEvaluator.java 643 2008-02-23 11:16:09Z euzenat $
- Author:
- Jerome Euzenat
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
precision
private double precision
recall
private double recall
fallout
private double fallout
overall
private double overall
fmeasure
private double fmeasure
time
private long time
nbexpected
private int nbexpected
nbfound
private int nbfound
nbcorrect
private int nbcorrect
PRecEvaluator
public PRecEvaluator(Alignment align1,
Alignment align2)
throws AlignmentException
- Creation
- Throws:
AlignmentException
init
public void init()
eval
public double eval(Parameters params)
throws AlignmentException
- The formulas are standard:
given a reference alignment A
given an obtained alignment B
which are sets of cells (linking one entity of ontology O to another of ontolohy O').
P = |A inter B| / |B|
R = |A inter B| / |A|
F = 2PR/(P+R)
with inter = set intersection and |.| cardinal.
In the implementation |B|=nbfound, |A|=nbexpected and |A inter B|=nbcorrect.
- 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
- Throws:
AlignmentException
write
public void write(PrintWriter writer)
throws IOException
- This now output the results in Lockheed format.
- Specified by:
write
in interface Evaluator
- Overrides:
write
in class BasicEvaluator
- Throws:
IOException
getPrecision
public double getPrecision()
getRecall
public double getRecall()
getOverall
public double getOverall()
getFallout
public double getFallout()
getFmeasure
public double getFmeasure()
getExpected
public int getExpected()
getFound
public int getFound()
getCorrect
public int getCorrect()
getTime
public long getTime()
(C) INRIA & friends, 2003-2008