Interface SMTaxonomyClassicUserWeights

All Superinterfaces:
SimilarityMeasure, SMTaxonomy, SMTaxonomyClassic
All Known Implementing Classes:
SMTaxonomyClassicUserWeightsImpl

public interface SMTaxonomyClassicUserWeights extends SMTaxonomyClassic
This measure is very similar to the SMTaxonomyClassic taxonomy except, that the weights must be set manually. A fundamental condition of this taxonomy similarity measure is that the pre-initialised weights have to be ascending from the root to the deepest leaf (on the lowest level). Additional strategies enable customising facilities respectively the similarity measure. For computing the similarity between nodes when the common father is one of the nodes, query or case strategies can be applied. Unlike the Classic measure, the weight of the common parent can't be taken, so it's neccessary to set a strategy.

Additional strategies enable customising facilities respectively the similarity measure. For computing the similarity between nodes when the common father is one of the nodes, query or case strategies can be applied - otherwise the node weight of the common father is taken always.

The strategies differentiate which is the common father - the query object or the case object. The first one concerns to the query strategy, the latter to the case strategy. Here, three different parameters can be choosen for specifying which weight node has to be taken.

Optimistic: the highest weight of the common father node or the lower node is taken.

Pessimistic: the lowest weight of the common father node or the lower node is taken.

Average: the average of the whole node path is calculated and taken as similarity value.

Author:
Rainer Maximini
  • Field Details

  • Method Details

    • getWeight

      Double getWeight(AtomicObject nodeValue)
      Parameters:
      nodeValue - The value of the node.
      Returns:
      The weight of the given node. If no weight is defined, null will be returned.
    • removeWeight

      void removeWeight(AtomicObject nodeValue)
      Removes the value of the node. If no value exists, noting happens.
      Parameters:
      nodeValue - A nodes is specified by its value.
    • removeAllWeights

      void removeAllWeights()
      Removes all weights.
    • setWeight

      void setWeight(AtomicObject nodeValue, Double weight)
      Parameters:
      weight - must be between 0 and 1
    • getDefinedNodes

      List<AtomicObject> getDefinedNodes()
      Returns:
      A list of defined AtomicObjects
      See Also: