net.sourceforge.nite.datainspection.calc
Interface DistanceMetric
- All Known Implementing Classes:
- BooleanMetric, DiceMetric, DiceMetricsForStringSetValues, DiceMetricsForStringTwoSetValues, DiceMetricsForTwoSetValues
public interface DistanceMetric
an interface for distance metrics for alpha.
SEE PACKAGE DOCUMENTATION
The metric for distance defines the distances between two Values.
It should satisfy:
- distance(v,v) = 0;
- distance(a,b) = distance(b,a)
- triangularity: distance(a,b) + distance(b,c) >= distance (a,c) (ie: "the direct way is not longer than via some intermediate point")
Usually: distance == 1 - similarity
- Author:
- Rieks op den Akker
distance
double distance(Value f,
Value s)
- Returns:
- the distance between f and s on a scale [0,1] where 0 means they are equal and 1 means they are completely different