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,v 1.11 2004/11/23 09:23:44 euzenat Exp $
- Author:
- Jerome Euzenat
Method Summary |
double |
eval(Parameters params)
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'). |
double |
getFallout()
|
double |
getFmeasure()
|
double |
getOverall()
|
double |
getPrecision()
|
double |
getRecall()
|
void |
write(java.io.PrintWriter writer)
This now output the Lockheed format. |
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
PRecEvaluator
public PRecEvaluator(Alignment align1,
Alignment align2)
- Creation
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
write
public void write(java.io.PrintWriter writer)
throws java.io.IOException
- This now output the Lockheed format. However, the lookheed format
was intended to compare two merged ontologies instead of two alignment.
So it refered to the:
- input ontology A
- input ontology B
- alignement algorithm (used for obtaining what ????).
While we compare two alignments (so the source and the reference to these
algorithms should be within the alignment structure.
- Specified by:
write
in interface Evaluator
- Overrides:
write
in class BasicEvaluator
- Throws:
java.io.IOException
getPrecision
public double getPrecision()
getRecall
public double getRecall()
getOverall
public double getOverall()
getFallout
public double getFallout()
getFmeasure
public double getFmeasure()
..no bottom yet...