Alignment API and Server 4.6 (1875M)

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

java.lang.Object
  extended by fr.inrialpes.exmo.align.impl.BasicEvaluator
      extended by fr.inrialpes.exmo.align.impl.eval.PRecEvaluator
          extended by 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
           
 
Fields inherited from class fr.inrialpes.exmo.align.impl.eval.PRecEvaluator
fmeasure, nbcorrect, nbexpected, nbfound, overall, precision, recall, relsensitive, time
 
Fields inherited from class fr.inrialpes.exmo.align.impl.BasicEvaluator
align1, align2, result
 
Constructor Summary
SemPRecEvaluator(Alignment al1, Alignment al2)
          Creation Initiate Evaluator for precision and recall
 
Method Summary
 org.semanticweb.owlapi.model.OWLAxiom correspToAxiom(ObjectAlignment al, ObjectCell corresp)
           
 double eval(Properties 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').
 int getExpectedEntailed()
           
 int getFoundEntailed()
           
 Properties getResults()
          Returns the results as a property list not further described but suitable for display.
 void init(Properties params)
           
 void loadFileAlignedOntologies(ObjectAlignment align)
           
 void loadPipedAlignedOntologies(ObjectAlignment align)
           
 int nbEntailedCorrespondences(ObjectAlignment al1, ObjectAlignment al2)
           
 
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 fr.inrialpes.exmo.align.impl.BasicEvaluator
convertToObjectAlignment, convertToObjectAlignments
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.semanticweb.owl.align.Evaluator
eval, write
 

Field Detail

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
Constructor Detail

SemPRecEvaluator

public SemPRecEvaluator(Alignment al1,
                        Alignment al2)
                 throws AlignmentException
Creation Initiate Evaluator for precision and recall

Parameters:
al1 - : the reference alignment
al2 - : the alignment to evaluate
Throws:
AlignmentException
Method Detail

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

Alignment API and Server 4.6 (1875M)

(C) INRIA & friends, 2003-2014