public class ExtPREvaluator extends BasicEvaluator implements Evaluator
Modifier and Type | Field and Description |
---|---|
private double |
editALPHA |
private double |
editBETA |
private double |
effprec |
private double |
effrec |
private double |
effsimilarity |
(package private) static org.slf4j.Logger |
logger |
private int |
nbexpected |
private int |
nbfound |
private HeavyLoadedOntology<java.lang.Object> |
onto1 |
private HeavyLoadedOntology<java.lang.Object> |
onto2 |
private double |
oriented |
private double |
orientPrecsimilarity |
private double |
orientRecsimilarity |
private double |
precorientprec |
private double |
precorientrec |
private double |
recorientprec |
private double |
recorientrec |
private boolean |
relsensitive |
private double |
symALPHA |
private double |
symprec |
private double |
symrec |
private double |
symsimilarity |
private boolean |
withConfidence |
align1, align2, result
Constructor and Description |
---|
ExtPREvaluator(Alignment align1,
Alignment align2)
Creation
|
Modifier and Type | Method and Description |
---|---|
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 (and 5) of [Ehrig and Euzenat 2005]
|
protected double |
computeRecallOrientedSimilarity(Cell c1,
Alignment s2)
Oriented relaxed precision and recal similarity
Table 6 (and 7) of [Ehrig and Euzenat 2005]
|
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(java.util.Properties params)
This is a partial implementation of [Ehrig and Euzenat 2005]
because the relations are not taken into account
(they are supposed to be always =)
|
double |
eval(java.util.Properties params,
java.lang.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() |
java.util.Properties |
getResults()
Returns the results as a property list not further described but
suitable for display.
|
double |
getSymPrecision() |
double |
getSymRecall() |
double |
getSymSimilarity() |
int |
isSuperClass(java.lang.Object class1,
java.lang.Object class2,
HeavyLoadedOntology<java.lang.Object> ontology)
This is a strange method which returns an integer representing how
directly a class is superclass of another or not.
|
int |
isSuperProperty(java.lang.Object prop1,
java.lang.Object prop2,
HeavyLoadedOntology<java.lang.Object> ontology) |
protected int |
relativePosition(java.lang.Object o1,
java.lang.Object o2,
HeavyLoadedOntology<java.lang.Object> onto)
Returns the relative position of two entities in an ontology
|
void |
setConfidence(boolean b) |
int |
superClassPosition(java.lang.Object class1,
java.lang.Object class2,
HeavyLoadedOntology<java.lang.Object> onto) |
int |
superPropertyPosition(java.lang.Object prop1,
java.lang.Object prop2,
HeavyLoadedOntology<java.lang.Object> onto) |
void |
write(java.io.PrintWriter writer)
This now output the results in Lockheed format.
|
convertToObjectAlignment, convertToObjectAlignments
static final org.slf4j.Logger logger
private HeavyLoadedOntology<java.lang.Object> onto1
private HeavyLoadedOntology<java.lang.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
private boolean relsensitive
public ExtPREvaluator(Alignment align1, Alignment align2) throws AlignmentException
align1
- andalign2:
- two alignments on which extended precision and recall will be computedAlignmentException
- when something goes wrongpublic 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(java.util.Properties params) throws AlignmentException
eval
in interface Evaluator
AlignmentException
- when something goes wrongpublic double eval(java.util.Properties params, java.lang.Object cache) throws AlignmentException
Evaluator
eval
in interface Evaluator
AlignmentException
- when something goes wrong
//@deprecated The OntologyCache is now internal, use eval( params ) insteadprotected double computeSymSimilarity(Cell c1, Alignment s2)
c1:
- the cell whose similarity is measureds2:
- alignment against which similarity is computedprotected double computeEffSimilarity(Cell c1, Alignment s2)
c1:
- the cell whose similarity is measureds2:
- alignment against which similarity is computedprotected double computePrecisionOrientedSimilarity(Cell c1, Alignment s2)
c1:
- the cell whose similarity is measureds2:
- alignment against which similarity is computedprotected double computeRecallOrientedSimilarity(Cell c1, Alignment s2)
c1:
- the cell whose similarity is measureds2:
- alignment against which similarity is computedprotected int relativePosition(java.lang.Object o1, java.lang.Object o2, HeavyLoadedOntology<java.lang.Object> onto) throws AlignmentException
o1
- ando2:
- two objects the position of which is computedonto:
- the ontology to which the objects belongAlignmentException
- when something goes wrong (typically objects do not belong to the ontology)public int superClassPosition(java.lang.Object class1, java.lang.Object class2, HeavyLoadedOntology<java.lang.Object> onto) throws AlignmentException
AlignmentException
public int isSuperClass(java.lang.Object class1, java.lang.Object class2, HeavyLoadedOntology<java.lang.Object> ontology) throws AlignmentException
class1
- andclass2:
- two classes superclass relationship is testedontology:
- the ontology to which the classes belongAlignmentException
- when something goes wrongpublic int superPropertyPosition(java.lang.Object prop1, java.lang.Object prop2, HeavyLoadedOntology<java.lang.Object> onto) throws AlignmentException
AlignmentException
public int isSuperProperty(java.lang.Object prop1, java.lang.Object prop2, HeavyLoadedOntology<java.lang.Object> ontology) throws AlignmentException
AlignmentException
public void write(java.io.PrintWriter writer) throws java.io.IOException
write
in interface Evaluator
write
in class BasicEvaluator
writer:
- the writer where to print the resultjava.io.IOException
- when something goes wrongpublic java.util.Properties getResults()
Evaluator
getResults
in interface Evaluator
(C) INRIA & friends, 2003-2020