de.unima.alcomox.mapping
Class Characteristic

java.lang.Object
  extended by de.unima.alcomox.mapping.Characteristic

public class Characteristic
extends java.lang.Object

Characterises the relation between two mappings in terms of recall, precision and f-value.


Constructor Summary
  Characteristic()
          Constructs an empty characteristic which is a characteristic for an mapping of cardinality zero.
protected Characteristic(int numOfRulesGold, int numOfRulesMatcher, int numOfRulesCorrect)
          Constructs a characteristic.
  Characteristic(Mapping mapping, Mapping reference)
          Constructs a characteristic based by comparing two mappings.
 
Method Summary
static double computeFFromPR(double precision, double recall)
           
 java.lang.String getF()
           
 double getFMeasure()
          Returns the f-measure.
 int getNumOfRulesCorrect()
           
 int getNumOfRulesGold()
           
 int getNumOfRulesMatcher()
           
 java.lang.String getP()
           
 double getPrecision()
          Returns the precision.
 java.lang.String getR()
           
 double getRecall()
          Returns the recall.
 void join(Characteristic c)
          Joins this mapping with another mapping by summing up relevant characteristics in absolute numbers.
static boolean strictEvaluationActive()
           
 java.lang.String toShortDesc()
           
 java.lang.String toString()
          Returns a string representation.
static void useDiffuseEvaluation()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Characteristic

public Characteristic()
Constructs an empty characteristic which is a characteristic for an mapping of cardinality zero.


Characteristic

protected Characteristic(int numOfRulesGold,
                         int numOfRulesMatcher,
                         int numOfRulesCorrect)
Constructs a characteristic.

Parameters:
numOfRulesGold - Number of correspondences of the reference mapping.
numOfRulesMatcher - Number of correspondences in the mapping under discussion (in most cases the mapping generated by a matching system).
numOfRulesCorrect - Number of correspondences that are both the reference mapping and the generated mapping.

Characteristic

public Characteristic(Mapping mapping,
                      Mapping reference)
Constructs a characteristic based by comparing two mappings.

Parameters:
mapping - The mapping under discussion.
reference - The reference mapping.
Throws:
ALCOMOException - Thrown if the namespaces of the mappings differ.
Method Detail

join

public void join(Characteristic c)
Joins this mapping with another mapping by summing up relevant characteristics in absolute numbers. Larger matching problems are thus to a greater extent weighted.

Parameters:
c - The other charcteristic.

toString

public java.lang.String toString()
Returns a string representation.

Overrides:
toString in class java.lang.Object
Returns:
A string representation.

getFMeasure

public double getFMeasure()
Returns the f-measure.

Returns:
The f-measure.

computeFFromPR

public static double computeFFromPR(double precision,
                                    double recall)

getF

public java.lang.String getF()

getPrecision

public double getPrecision()
Returns the precision.

Returns:
The precision.

getP

public java.lang.String getP()

getRecall

public double getRecall()
Returns the recall.

Returns:
The recall.

getR

public java.lang.String getR()

getNumOfRulesCorrect

public int getNumOfRulesCorrect()

getNumOfRulesGold

public int getNumOfRulesGold()

getNumOfRulesMatcher

public int getNumOfRulesMatcher()

toShortDesc

public java.lang.String toShortDesc()

useDiffuseEvaluation

public static void useDiffuseEvaluation()

strictEvaluationActive

public static boolean strictEvaluationActive()