Maths.DistanceMetric
ReferencesEnumerates the available distance metrics used in the Maths.Distance(Maths.DistanceMetric, double[], double[]) like functions.
Enum values
| Name | Value | Description |
|---|---|---|
| Euclidean | 0 | Linear distance using pythagoras' formula. |
| Quadrance | 1 | The square of the euclidean distance (faster to compute). |
| Manhattan | 2 | The sum of the absolute differences per dimension, also called the L1-norm. |
| Canberra | 3 | A weighted version of the Manhattan distance. It computes the sum of the absolute differences, divided by the sum of the absolute values per dimension. |
| Angular | 4 | Assuming the coordinates represent vectors, computes the angular separation between them, ignoring the scale. I.e. this metric compared the directions of vectors with no regard to their magnitudes. |
| Radial | 5 | Assuming the coordinates represent vectors, computes the radial separation between them, ignoring their direction. I.e. this metric compares the lengths of vectors with no regard to their directions. |
| Pearson | 6 | One minus the Pearson correlation coefficient. |
| Jaccard | 7 | One minus the Jaccard index. The Jaccard index is the ratio of equal, non-zero elements in either set to the total number of non-zero elements. |
| Chebyshev | 8 | The infinity norm of the difference. |
| Hamming | 9 | The number of different coordinate values. |
| MeanAbsoluteError | 10 | Normalised Manhattan distance, i.e. the Manhattan distance divided by the number of dimensions. |
| MeanSquaredError | 11 | Normalised Quadrance, i.e. the quadrance distance divided by the number of dimensions. |
| RootMeanSquaredError | 12 | Root of the Mean Squared Error. |