fr.inrialpes.exmo.align.impl.eval
Class SemPRecEvaluator
java.lang.Object
fr.inrialpes.exmo.align.impl.BasicEvaluator
fr.inrialpes.exmo.align.impl.eval.PRecEvaluator
fr.inrialpes.exmo.align.impl.eval.SemPRecEvaluator
- All Implemented Interfaces:
- Evaluator
public class SemPRecEvaluator
- extends PRecEvaluator
- implements Evaluator
Evaluate proximity between two alignments.
This function implements Precision/Recall. The first alignment
is thus the expected one.
- Version:
- $Id: SemPRecEvaluator.java 1550 2011-03-19 16:38:45Z euzenat $
- Author:
- Jerome Euzenat
Methods inherited from class fr.inrialpes.exmo.align.impl.eval.PRecEvaluator |
computeDerived, eval, getCorrect, getExpected, getFallout, getFmeasure, getFound, getNoise, getOverall, getPrecision, getRecall, getSilence, getTime, HTMLString, init, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
nbfoundentailed
private int nbfoundentailed
nbexpectedentailed
private int nbexpectedentailed
semantics
private fr.inrialpes.exmo.iddl.conf.Semantics semantics
SemPRecEvaluator
public SemPRecEvaluator(Alignment align1,
Alignment align2)
throws AlignmentException
- Creation
Initiate Evaluator for precision and recall
- Parameters:
align1
- : the reference alignmentalign2
- : the alignment to evaluate
- Throws:
AlignmentException
init
public void init(Object sem)
eval
public double eval(Properties params,
Object cache)
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.
This takes semantivs as a parameter which should be a litteral of fr.inrialpes.exmo.iddl.conf.Semantics
- Specified by:
eval
in interface Evaluator
- Overrides:
eval
in class PRecEvaluator
- Throws:
AlignmentException
getFoundEntailed
public int getFoundEntailed()
getExpectedEntailed
public int getExpectedEntailed()
getResults
public Properties getResults()
- Description copied from interface:
Evaluator
- Returns the results as a property list not further described but
suitable for display.
- Specified by:
getResults
in interface Evaluator
- Overrides:
getResults
in class PRecEvaluator
(C) INRIA & friends, 2003-${curryear}