Alignment API and Server 4.1.${version.update}

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/Fallout. The first alignment is thus the expected one.

Version:
$Id: SemPRecEvaluator.java 1425 2010-04-06 20:25:39Z euzenat $
Author:
Jerome Euzenat

Field Summary
private  int nbexpectedentailed
           
private  int nbfoundentailed
           
private  fr.inrialpes.exmo.iddl.conf.Semantics semantics
           
 
Fields inherited from class fr.inrialpes.exmo.align.impl.eval.PRecEvaluator
fallout, fmeasure, nbcorrect, nbexpected, nbfound, overall, precision, recall, time
 
Fields inherited from class fr.inrialpes.exmo.align.impl.BasicEvaluator
align1, align2, result
 
Constructor Summary
SemPRecEvaluator(Alignment align1, Alignment align2)
          Creation Initiate Evaluator for precision and recall
 
Method Summary
 double eval(Properties params, Object cache)
          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(Object sem)
           
 
Methods inherited from class fr.inrialpes.exmo.align.impl.eval.PRecEvaluator
computeDerived, eval, getCorrect, getExpected, getFallout, getFmeasure, getFound, getOverall, getPrecision, getRecall, getTime, HTMLString, init, write
 
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

nbfoundentailed

private int nbfoundentailed

nbexpectedentailed

private int nbexpectedentailed

semantics

private fr.inrialpes.exmo.iddl.conf.Semantics semantics
Constructor Detail

SemPRecEvaluator

public SemPRecEvaluator(Alignment align1,
                        Alignment align2)
                 throws AlignmentException
Creation Initiate Evaluator for precision and recall

Parameters:
align1 - : the reference alignment
align2 - : the alignment to evaluate
Throws:
AlignmentException
Method Detail

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

Alignment API and Server 4.1.${version.update}

(C) INRIA & friends, 2003-${curryear}