Interface SMTaxonomyClassicUserWeights
-
- All Superinterfaces:
SimilarityMeasure
,SMTaxonomy
,SMTaxonomyClassic
- All Known Implementing Classes:
SMTaxonomyClassicUserWeightsImpl
public interface SMTaxonomyClassicUserWeights extends SMTaxonomyClassic
This measure is very similar to theSMTaxonomyClassic
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 Summary
Fields Modifier and Type Field Description static String
NAME
Name of similarity measure is "TaxonomyClassicUserWeights".-
Fields inherited from interface de.uni_trier.wi2.procake.similarity.SimilarityMeasure
COMPONENT, COMPONENT_KEY, LOG_ORDER_NAME_NOT_FOUND
-
Fields inherited from interface de.uni_trier.wi2.procake.similarity.base.taxonomy.SMTaxonomyClassic
STRATEGY_DEFAULT
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<AtomicObject>
getDefinedNodes()
Double
getWeight(AtomicObject nodeValue)
void
removeAllWeights()
Removes all weights.void
removeWeight(AtomicObject nodeValue)
Removes the value of the node.void
setWeight(AtomicObject nodeValue, Double weight)
-
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.taxonomy.SMTaxonomy
getInstanceTaxonomyOrderPredicate
-
Methods inherited from interface de.uni_trier.wi2.procake.similarity.base.taxonomy.SMTaxonomyClassic
getInnerNodeInCaseStrategy, getInnerNodeInQueryStrategy, setInnerNodeInCaseStrategy, setInnerNodeInQueryStrategy
-
-
-
-
Field Detail
-
NAME
static final String NAME
Name of similarity measure is "TaxonomyClassicUserWeights".- See Also:
- Constant Field Values
-
-
Method Detail
-
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:
AtomicObject
-
-