Interface SMOntologyPath
- All Superinterfaces:
SimilarityMeasure
,SMOntology
- All Known Implementing Classes:
SMOntologyPathImpl
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 Summary
Fields inherited from interface de.uni_trier.wi2.procake.similarity.SimilarityMeasure
LOG_ORDER_NAME_NOT_FOUND
-
Method Summary
Modifier and TypeMethodDescriptiondouble
double
void
setWeightDown
(double weight) Sets the weight for a step down.void
setWeightUp
(double weight) Sets the weight for a step up.Methods inherited from interface de.uni_trier.wi2.procake.similarity.SimilarityMeasure
compute, getDataClass, getName, getSystemName, isForceOverride, isReusable, setForceOverride
Methods inherited from interface de.uni_trier.wi2.procake.similarity.base.ontology.SMOntology
checkArgumentApplicability, checkInstanceOntologyOrderPredicate
-
Field Details
-
NAME
- See Also:
-
-
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.
-