|
Alignment API and Server 4.2.${version.update} | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.inrialpes.exmo.align.impl.BasicEvaluator
fr.inrialpes.exmo.align.impl.eval.ExtPREvaluator
public class ExtPREvaluator
Implements extended precision and recall between alignments. These are the measures corresponding to [Ehrig&Euzenat2005]. The implementation is based on that of PRecEvaluator. This currently (4.1) implements all three mesures with the following changes: - relations are not taken into account (see when there is an algebra of relation with degree of overlap) - functions are parameterised by symALPHA, editALPHA, editBETA, oriented - the distance in the three is measured by param/(d+param) or param^d In the first case (for param=.5): 1, .5, .25, .16, .125 In the second case: 1, .5, .25, .125 - it is possible to avoid using confidences (see below) Dealing with confidence the way this was suggested in [Ehrig&Euzenat2005] may not be a good idea as it seems. Indeed, typically incorrect correspondences are those with low confidence. Hence, when they are close to the target, the fact that the correspondence has a low confidence will penalise heavily the bonus provided by relaxed measures... hence we have introduced a switch for avoiding the confidence computation. This evaluator is far less tolerant than the classical PRecEvaluator because it has to load the ontologies This class is expensive because it computes all similarities together It may be wiser to have different evaluators.
Field Summary | |
---|---|
private double |
editALPHA
|
private double |
editBETA
|
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 |
oriented
|
private double |
orientPrecsimilarity
|
private double |
orientRecsimilarity
|
private double |
precorientprec
|
private double |
precorientrec
|
private double |
recorientprec
|
private double |
recorientrec
|
private double |
symALPHA
|
private double |
symprec
|
private double |
symrec
|
private double |
symsimilarity
|
private boolean |
withConfidence
|
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,
Alignment s2)
Effort-based relaxed precision and recal similarity Note: it will be better if the parameters were replaced by the actual sibling (choice) Table 3 of [Ehrig2005] |
protected double |
computePrecisionOrientedSimilarity(Cell c1,
Alignment s2)
Oriented relaxed precision and recal similarity Table 4 (& 5) of [Ehrig2005] |
protected double |
computeRecallOrientedSimilarity(Cell c1,
Alignment s2)
Oriented relaxed precision and recal similarity Table 6 (& 7) of [Ehrig2005] |
protected double |
computeSymSimilarity(Cell c1,
Alignment s2)
Symmetric relaxed precision and recal similarity This computes similarity depending on structural measures: the similarity is symALPHA^(val1+val2), 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. |
boolean |
getConfidence()
|
double |
getEffPrecision()
|
double |
getEffRecall()
|
double |
getEffSimilarity()
|
int |
getExpected()
|
int |
getFound()
|
double |
getPrecisionOrientedPrecision()
|
double |
getPrecisionOrientedRecall()
|
double |
getPrecisionOrientedSimilarity()
|
double |
getRecallOrientedPrecision()
|
double |
getRecallOrientedRecall()
|
double |
getRecallOrientedSimilarity()
|
Properties |
getResults()
Returns the results as a property list not further described but suitable for display. |
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. |
int |
isSuperProperty(Object prop1,
Object prop2,
HeavyLoadedOntology<Object> ontology)
|
protected int |
relativePosition(Object o1,
Object o2,
HeavyLoadedOntology<Object> onto)
Returns the relative position of two entities: 0: unrelated n: o1 is a n-step sub-entity of o2 -n: o2 is a n-step sub-entity of o1 |
void |
setConfidence(boolean b)
|
int |
superClassPosition(Object class1,
Object class2,
HeavyLoadedOntology<Object> onto)
|
int |
superPropertyPosition(Object prop1,
Object prop2,
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 |
---|
private HeavyLoadedOntology<Object> onto1
private HeavyLoadedOntology<Object> onto2
private double symALPHA
private double editALPHA
private double editBETA
private double oriented
private double symprec
private double symrec
private double effprec
private double effrec
private double precorientprec
private double precorientrec
private double recorientprec
private double recorientrec
private int nbexpected
private int nbfound
private double symsimilarity
private double effsimilarity
private double orientPrecsimilarity
private double orientRecsimilarity
private boolean withConfidence
Constructor Detail |
---|
public ExtPREvaluator(Alignment align1, Alignment align2) throws AlignmentException
AlignmentException
Method Detail |
---|
public void setConfidence(boolean b)
public boolean getConfidence()
public double getSymPrecision()
public double getSymRecall()
public double getSymSimilarity()
public double getEffPrecision()
public double getEffRecall()
public double getEffSimilarity()
public double getPrecisionOrientedPrecision()
public double getPrecisionOrientedRecall()
public double getRecallOrientedPrecision()
public double getRecallOrientedRecall()
public double getPrecisionOrientedSimilarity()
public double getRecallOrientedSimilarity()
public int getExpected()
public int getFound()
public double eval(Properties params) throws AlignmentException
eval
in interface Evaluator
AlignmentException
public double eval(Properties params, Object cache) throws AlignmentException
Evaluator
eval
in interface Evaluator
AlignmentException
protected double computeSymSimilarity(Cell c1, Alignment s2)
protected double computeEffSimilarity(Cell c1, Alignment s2)
protected double computePrecisionOrientedSimilarity(Cell c1, Alignment s2)
protected double computeRecallOrientedSimilarity(Cell c1, Alignment s2)
protected int relativePosition(Object o1, Object o2, HeavyLoadedOntology<Object> onto) throws AlignmentException
AlignmentException
public int superClassPosition(Object class1, Object class2, HeavyLoadedOntology<Object> onto) throws AlignmentException
AlignmentException
public int isSuperClass(Object class1, Object class2, HeavyLoadedOntology<Object> ontology) throws AlignmentException
AlignmentException
public int superPropertyPosition(Object prop1, Object prop2, HeavyLoadedOntology<Object> onto) throws AlignmentException
AlignmentException
public int isSuperProperty(Object prop1, Object prop2, HeavyLoadedOntology<Object> ontology) throws AlignmentException
AlignmentException
public void write(PrintWriter writer) throws IOException
write
in interface Evaluator
write
in class BasicEvaluator
IOException
public Properties getResults()
Evaluator
getResults
in interface Evaluator
|
Alignment API and Server 4.2.${version.update} | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |