Alignment API and Server 4.0

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

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

public class ExtPREvaluator
extends BasicEvaluator

Implement extended precision and recall between alignments. These are the measures corresponding to [Ehrig&Euzenat2005]. The implementation is based on that of PRecEvaluator.

Version:
$Id: ExtPREvaluator.java 1327 2010-03-10 16:51:52Z euzenat $
Author:
Jerome Euzenat

Field Summary
private  double effprec
           
private  double effrec
           
private  double effsimilarity
           
private  int nbexpected
           
private  int nbfound
           
private  HeavyLoadedOntology<Object> onto1
           
private  HeavyLoadedOntology<Object> onto2
           
private  double orientprec
           
private  double orientrec
           
private  double orientsimilarity
           
private  double symALPHA
           
private  double symprec
           
private  double symrec
           
private  double symsimilarity
           
 
Fields inherited from class fr.inrialpes.exmo.align.impl.BasicEvaluator
align1, align2, result
 
Constructor Summary
ExtPREvaluator(Alignment align1, Alignment align2)
          Creation
 
Method Summary
protected  double computeEffSimilarity(Cell c1, Enumeration s2)
          This computes similarity depending on structural measures: the similarity is symALPHA^minval, symALPHA being lower than 1.
protected  double computeOrientSimilarity(Cell c1, Enumeration s2)
          This computes similarity depending on structural measures: the similarity is symALPHA^minval, symALPHA being lower than 1.
protected  double computeSymSimilarity(Cell c1, Enumeration s2)
          This computes similarity depending on structural measures: the similarity is symALPHA^minval, symALPHA being lower than 1.
 double eval(Properties params)
          This is a partial implementation of [Ehrig & Euzenat 2005] because the relations are not taken into account (they are supposed to be always =)
 double eval(Properties params, Object cache)
          Run the evaluation between the two ontologies.
 double getEffPrecision()
           
 double getEffRecall()
           
 double getEffSimilarity()
           
 int getExpected()
           
 int getFound()
           
 double getOrientPrecision()
           
 double getOrientRecall()
           
 double getOrientSimilarity()
           
 double getSymPrecision()
           
 double getSymRecall()
           
 double getSymSimilarity()
           
 int isSuperClass(Object class1, Object class2, HeavyLoadedOntology<Object> ontology)
          This is a strange method which returns an integer representing how directly a class is superclass of another or not.
 boolean isSuperProperty(Object prop1, Object prop2, HeavyLoadedOntology<Object> ontology)
           
protected  int relativePosition(Object o1, Object o2, HeavyLoadedOntology<Object> onto)
           
 int superClassPosition(Object class1, Object class2, HeavyLoadedOntology<Object> onto)
           
 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

onto1

private HeavyLoadedOntology<Object> onto1

onto2

private HeavyLoadedOntology<Object> onto2

symALPHA

private double symALPHA

symprec

private double symprec

symrec

private double symrec

effprec

private double effprec

effrec

private double effrec

orientprec

private double orientprec

orientrec

private double orientrec

nbexpected

private int nbexpected

nbfound

private int nbfound

symsimilarity

private double symsimilarity

effsimilarity

private double effsimilarity

orientsimilarity

private double orientsimilarity
Constructor Detail

ExtPREvaluator

public ExtPREvaluator(Alignment align1,
                      Alignment align2)
Creation

Method Detail

getSymPrecision

public double getSymPrecision()

getSymRecall

public double getSymRecall()

getSymSimilarity

public double getSymSimilarity()

getEffPrecision

public double getEffPrecision()

getEffRecall

public double getEffRecall()

getEffSimilarity

public double getEffSimilarity()

getOrientPrecision

public double getOrientPrecision()

getOrientRecall

public double getOrientRecall()

getOrientSimilarity

public double getOrientSimilarity()

getExpected

public int getExpected()

getFound

public int getFound()

eval

public double eval(Properties params)
            throws AlignmentException
This is a partial implementation of [Ehrig & Euzenat 2005] because the relations are not taken into account (they are supposed to be always =)

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

Throws:
AlignmentException

computeSymSimilarity

protected double computeSymSimilarity(Cell c1,
                                      Enumeration s2)
This computes similarity depending on structural measures: the similarity is symALPHA^minval, symALPHA being lower than 1. minval is the length of the subclass chain.


computeEffSimilarity

protected double computeEffSimilarity(Cell c1,
                                      Enumeration s2)
This computes similarity depending on structural measures: the similarity is symALPHA^minval, symALPHA being lower than 1. minval is the length of the subclass chain.


computeOrientSimilarity

protected double computeOrientSimilarity(Cell c1,
                                         Enumeration s2)
This computes similarity depending on structural measures: the similarity is symALPHA^minval, symALPHA being lower than 1. minval is the length of the subclass chain.


relativePosition

protected int relativePosition(Object o1,
                               Object o2,
                               HeavyLoadedOntology<Object> onto)
                        throws AlignmentException
Throws:
AlignmentException

isSuperProperty

public boolean isSuperProperty(Object prop1,
                               Object prop2,
                               HeavyLoadedOntology<Object> ontology)
                        throws AlignmentException
Throws:
AlignmentException

superClassPosition

public int superClassPosition(Object class1,
                              Object class2,
                              HeavyLoadedOntology<Object> onto)
                       throws AlignmentException
Throws:
AlignmentException

isSuperClass

public int isSuperClass(Object class1,
                        Object class2,
                        HeavyLoadedOntology<Object> ontology)
                 throws AlignmentException
This is a strange method which returns an integer representing how directly a class is superclass of another or not. This would require coputing the transitive reduction of the superClass relation which is currently returned bu HeavyLoadedOntology. It would require to have a isDirectSubClassOf().

Throws:
AlignmentException

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

Alignment API and Server 4.0

(C) INRIA & friends, 2003-2010