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 1866 2014-01-14 14:34:59Z euzenat $
- Author:
- Jerome Euzenat
Field Summary |
(package private) static org.slf4j.Logger |
logger
|
protected org.semanticweb.owlapi.model.OWLOntologyManager |
manager
It would be useful to directly use the Ontologies since they are already loaded
Two implementation of Alignment loading: one with intermediate file and one without. |
private int |
nbexpectedentailed
|
private int |
nbfoundentailed
|
protected org.semanticweb.owlapi.reasoner.OWLReasoner |
reasoner
|
private fr.paris8.iut.info.iddl.conf.Semantics |
semantics
|
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 |
logger
static final org.slf4j.Logger logger
nbfoundentailed
private int nbfoundentailed
nbexpectedentailed
private int nbexpectedentailed
semantics
private fr.paris8.iut.info.iddl.conf.Semantics semantics
manager
protected org.semanticweb.owlapi.model.OWLOntologyManager manager
- It would be useful to directly use the Ontologies since they are already loaded
Two implementation of Alignment loading: one with intermediate file and one without.
reasoner
protected org.semanticweb.owlapi.reasoner.OWLReasoner reasoner
SemPRecEvaluator
public SemPRecEvaluator(Alignment al1,
Alignment al2)
throws AlignmentException
- Creation
Initiate Evaluator for precision and recall
- Parameters:
al1
- : the reference alignmental2
- : the alignment to evaluate
- Throws:
AlignmentException
init
public void init(Properties params)
eval
public double eval(Properties 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.
This takes semantics as a parameter which should be a litteral of fr.paris8.iut.info.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
nbEntailedCorrespondences
public int nbEntailedCorrespondences(ObjectAlignment al1,
ObjectAlignment al2)
throws AlignmentException
- Throws:
AlignmentException
loadPipedAlignedOntologies
public void loadPipedAlignedOntologies(ObjectAlignment align)
throws AlignmentException
- Throws:
AlignmentException
loadFileAlignedOntologies
public void loadFileAlignedOntologies(ObjectAlignment align)
throws AlignmentException
- Throws:
AlignmentException
correspToAxiom
public org.semanticweb.owlapi.model.OWLAxiom correspToAxiom(ObjectAlignment al,
ObjectCell corresp)
throws AlignmentException
- Throws:
AlignmentException
(C) INRIA & friends, 2003-2014