de.unima.alcomox.metric
Class IncoherenceMetric

java.lang.Object
  extended by de.unima.alcomox.metric.IncoherenceMetric

public class IncoherenceMetric
extends java.lang.Object

Replaces the old IMerasureProblem class and is under development at the moment to be used inside SEALS maybe via the Alignment API. Only computes the max-card measure, can be used with a timeout, and returns the score so far computed (= a lower bound for the correct value). It will be applied only to a subset of the alignment which is the set of those correspondences that have a confidence > 0 and are equivalence correspondences.


Constructor Summary
IncoherenceMetric()
          Constructs an incoherence metric with default timeout.
IncoherenceMetric(long timeout)
          Constructs an incoherence metric with timeout specified in millis.
 
Method Summary
 void eval(LocalOntology sourceOnt, LocalOntology targetOnt, Mapping mapping)
          Runs an evaluation by applying the incoherence metric a.k.a maximum cardinality incoherence measure (as defined in Meilicke,Stuckenschmidt OM 2008).
 boolean evaluationSuccessful()
          Checks whether the evaluation was successful and generated a meaningful value.
 boolean evaluationTerminated()
           
 double getDegreeOfIncoherence()
          Returns the degree of incoherence.
 java.lang.String getErrorMessage()
          If the evaluation has not been successful, a string representations of caught exceptions can be retrieved.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IncoherenceMetric

public IncoherenceMetric()
Constructs an incoherence metric with default timeout.


IncoherenceMetric

public IncoherenceMetric(long timeout)
Constructs an incoherence metric with timeout specified in millis.

Method Detail

eval

public void eval(LocalOntology sourceOnt,
                 LocalOntology targetOnt,
                 Mapping mapping)
Runs an evaluation by applying the incoherence metric a.k.a maximum cardinality incoherence measure (as defined in Meilicke,Stuckenschmidt OM 2008).

Parameters:
sourceOntPathOrUri - Filepath or URL of the source ontology.
targetOntPathOrUri - Filepath or URL of the target ontology.
mappingPathOrUri - Filepath or URL of the target ontology.

evaluationTerminated

public boolean evaluationTerminated()
Returns:
True if the evaluation terminated successful before the timeout expired; false otherwise (due to timeout or some interal problems).

evaluationSuccessful

public boolean evaluationSuccessful()
Checks whether the evaluation was successful and generated a meaningful value.

Returns:
True if the evaluation was successful, i.e. generated a meaningful value. Such a value (due to the kind of anytime behaviour) will also be generated of the timout expired, as long as the algorithm could successfully work with the input data.

getErrorMessage

public java.lang.String getErrorMessage()
If the evaluation has not been successful, a string representations of caught exceptions can be retrieved.

Returns:
An error message if an error has occured.

getDegreeOfIncoherence

public double getDegreeOfIncoherence()
Returns the degree of incoherence.

Returns:
The degree of incoherence or an lower bound (if interupted prior to finishing) or -1 (in case of an internal error).