# Package smile.math.distance

package smile.math.distance

Distance and metric measures. A distance function maps pairs of
points into the non-negative reals and has to satisfy

- non-negativity:
`d(x, y) >= 0`

- isolation:
`d(x, y) = 0`

if and only if`x = y`

- symmetry:
`d(x, y) = d(x, y)`

`|x - y| + |y - z| >= |x - z|`

, which is necessary for a metric.-
All Classes and Interfaces Interfaces Classes ClassDescriptionChebyshev distance (or Tchebychev distance), or L_{∞}metric is a metric defined on a vector space where the distance between two vectors is the greatest of their differences along any coordinate dimension.Correlation distance is defined as 1 - correlation coefficient.Distance<T>An interface to calculate a distance measure between two objects.Dynamic time warping is an algorithm for measuring similarity between two sequences which may vary in time or speed.The Edit distance between two strings is a metric for measuring the amount of difference between two sequences.Euclidean distance.In information theory, the Hamming distance between two strings of equal length is the number of positions for which the corresponding symbols are different.The Jaccard index, also known as the Jaccard similarity coefficient is a statistic used for comparing the similarity and diversity of sample sets.The Jensen-Shannon divergence is a popular method of measuring the similarity between two probability distributions.In coding theory, the Lee distance is a distance between two strings`x`

and_{1}x_{2}...x_{n}`y`

of equal length n over the q-ary alphabet_{1}y_{2}...y_{n}`{0, 1, ..., q-1}`

of size`q >= 2`

, defined asIn statistics, Mahalanobis distance is based on correlations between variables by which different patterns can be identified and analyzed.Manhattan distance, also known as L_{1}distance or L_{1}norm, is the sum of the (absolute) differences of their coordinates.Metric<T>A metric function defines a distance between elements of a set.Minkowski distance of order p or L_{p}-norm, is a generalization of Euclidean distance that is actually L_{2}-norm.Chebyshev distance (or Tchebychev distance), or L_{∞}metric is a metric defined on a vector space where the distance between two vectors is the greatest of their differences along any coordinate dimension.Euclidean distance on sparse arrays.Manhattan distance, also known as L_{1}distance or L_{1}norm, is the sum of the (absolute) differences of their coordinates.Minkowski distance of order p or L_{p}-norm, is a generalization of Euclidean distance that is actually L_{2}-norm.