Package smile.math.distance
Interface Metric<T>
- Type Parameters:
T
- the input type of metric function.
- All Superinterfaces:
Distance<T>
,Serializable
,ToDoubleBiFunction<T,
T>
- All Known Implementing Classes:
ChebyshevDistance
,EditDistance
,EuclideanDistance
,JensenShannonDistance
,LeeDistance
,MahalanobisDistance
,ManhattanDistance
,MinkowskiDistance
,SparseChebyshevDistance
,SparseEuclideanDistance
,SparseManhattanDistance
,SparseMinkowskiDistance
A metric function defines a distance between elements of a set. Besides
non-negativity, isolation, and symmetry, it also has to satisfy triangular
inequality.
- non-negativity:
d(x, y) >= 0
- isolation:
d(x, y) = 0
if and only ifx = y
- symmetry:
d(x, y) = d(x, y)
- triangular inequality:
|x - y| + |y - z| >= |x - z|
.
-
Method Summary