Package smile.taxonomy
Class TaxonomicDistance
java.lang.Object
smile.taxonomy.TaxonomicDistance
- All Implemented Interfaces:
Serializable
,ToDoubleBiFunction<Concept,
,Concept> Distance<Concept>
The distance between concepts in a taxonomy.
The distance between two concepts a and b is defined by the length of the
path from a to their lowest common ancestor and then to b.
- See Also:
-
Constructor Details
-
TaxonomicDistance
Constructor.- Parameters:
taxonomy
- the taxonomy that this distance is associated with.
-
-
Method Details
-
toString
-
d
Computes the distance between two concepts in a taxonomy.- Parameters:
x
- a concept.y
- the other concept.- Returns:
- the distance.
-
d
Computes the distance between two concepts in a taxonomy.
-