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

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

java.lang.Object
  extended by fr.inrialpes.exmo.align.impl.BasicEvaluator
      extended by fr.inrialpes.exmo.align.impl.eval.WeightedPREvaluator
All Implemented Interfaces:
Evaluator

public class WeightedPREvaluator
extends BasicEvaluator
implements Evaluator

Evaluate proximity between two alignments. This function implements Precision/Recall. The first alignment is thus the expected one. NOTE: This measure does not take relations nor confidences into account For relation, this will wait for algebra based relations

Version:
$Id: PRecEvaluator.java 1494 2010-07-23 14:43:36Z euzenat $
Author:
Jerome Euzenat

Field Summary
protected  double fmeasure
           
protected  double nbcorrect
           
protected  double nbexpected
           
protected  double nbfound
           
protected  double overall
           
protected  double precision
           
protected  double recall
           
protected  long time
           
 
Fields inherited from class fr.inrialpes.exmo.align.impl.BasicEvaluator
align1, align2, result
 
Constructor Summary
WeightedPREvaluator(Alignment align1, Alignment align2)
          Creation Initiate Evaluator for precision and recall
 
Method Summary
protected  double computeDerived()
           
 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').
 double eval(Properties params, Object cache)
          Run the evaluation between the two ontologies.
 double getCorrect()
           
 double getExpected()
           
 double getFallout()
           
 double getFmeasure()
           
 double getFound()
           
 double getNoise()
           
 double getOverall()
           
 double getPrecision()
           
 double getRecall()
           
 Properties getResults()
          Returns the results as a property list not further described but suitable for display.
 double getSilence()
           
 long getTime()
           
 String HTMLString()
           
 void init()
           
 void write(PrintWriter writer)
          This now output the results in Lockheed format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

precision

protected double precision

recall

protected double recall

overall

protected double overall

fmeasure

protected double fmeasure

time

protected long time

nbexpected

protected double nbexpected

nbfound

protected double nbfound

nbcorrect

protected double nbcorrect
Constructor Detail

WeightedPREvaluator

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

Parameters:
align1 - : the reference alignment
align2 - : the alignment to evaluate The two parameters are transformed into URIAlignment before being processed Hence, if one of them is modified after initialisation, this will not be taken into account.
Throws:
AlignmentException
Method Detail

init

public void init()

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.

Specified by:
eval in interface Evaluator
Throws:
AlignmentException

eval

public double eval(Properties params,
                   Object cache)
            throws AlignmentException
Description copied from interface: Evaluator
Run the evaluation between the two ontologies. Returns a double (between 0 and 1) providing an idea of the proximity The additional argument allows to cache the ontologies if necessary //@deprecated The OntologyCache is now internal, use eval( params ) instead

Specified by:
eval in interface Evaluator
Throws:
AlignmentException

computeDerived

protected double computeDerived()

HTMLString

public String HTMLString()

write

public void write(PrintWriter writer)
           throws IOException
This now output the results in Lockheed format.

Specified by:
write in interface Evaluator
Overrides:
write in class BasicEvaluator
Throws:
IOException

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

getPrecision

public double getPrecision()

getRecall

public double getRecall()

getOverall

public double getOverall()

getFallout

public double getFallout()
                  throws AlignmentException
Throws:
AlignmentException

getNoise

public double getNoise()

getSilence

public double getSilence()

getFmeasure

public double getFmeasure()

getExpected

public double getExpected()

getFound

public double getFound()

getCorrect

public double getCorrect()

getTime

public long getTime()

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

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