Interface SMOntologyPath

All Superinterfaces:
SimilarityMeasure, SMOntology
All Known Implementing Classes:
SMOntologyPathImpl

public interface SMOntologyPath extends SMOntology
The similarity between query and case based on the shortest path between query and case node in an ontology.

To compute the similarity between two nodes first the common parent of the nodes is searched. Second, the path is traversed up from query to the common parent and traversed down to the case node. Thereby, each step upward is weighted and each step downward is weighted.

sim = weightUp^#stepsUpward * weightDown^#stepsDownward

Author:
Tobias Dahlem
  • Field Details

  • Method Details

    • getWeightDown

      double getWeightDown()
      Returns:
      The weight for a step down.
    • setWeightDown

      void setWeightDown(double weight)
      Sets the weight for a step down.
      Parameters:
      weight - must be between 0 an 1. Other values will be rounded automatically.
    • getWeightUp

      double getWeightUp()
      Returns:
      The weight for a step up.
    • setWeightUp

      void setWeightUp(double weight)
      Sets the weight for a step up.
      Parameters:
      weight - must be between 0 an 1. Other values will be rounded automatically.