|
Cityblock distance of two vectors
-
v1
:
Vector<^a>
-
-
v2
:
Vector<^a>
-
-
Returns:
float
-
|
|
Cityblock distance of two vectors
-
v1
:
Vector<float>
-
-
v2
:
Vector<float>
-
-
Returns:
float
-
|
|
-
v1
:
Vector<^a>
-
v2
:
Vector<^a>
-
Returns:
float
|
|
Euclidean distance between 2 vectors (ignores nan)
-
v1
:
Vector<float>
-
-
v2
:
Vector<float>
-
-
Returns:
float
-
|
|
Squared Euclidean distance between 2 vectors
-
v1
:
Vector<^a>
-
-
v2
:
Vector<^a>
-
-
Returns:
float
-
|
|
Calculates Hamming distance between 2 vectors
-
v1
:
Vector<'a>
-
first vector
-
v2
:
Vector<'a>
-
second vector
-
Returns:
int
-
Hamming distance between elements of given vectors
// e.g. v1 and v2 initialization
let v1 = vector [1; 2; 3]
let s2 = vector [9; 2; 3]
// Apply the hamming to v1 and v2
Vector.hamming v1 v2
|
|
The [Minkowski distance](https://en.wikipedia.org/wiki/Minkowski_distance) between two vectors of order `p`.
-
v1
:
Vector<^a>
-
v2
:
Vector<^a>
-
p
:
float
-
float constrained to `p > 0`
-
Returns:
float option
-
Minkowski distance between elements of given vectors. Returns NaN if vectors contain NaN.
// e.g. v1 and v2 initialization
let v1 = vector [3.14; 2.0; 3.1]
let v2 = vector [9.1; 2.5; 3.7]
// Apply the minkowski distance to v1 and v2
Vector.minkowski v1 v2 3
|
|
The [Minkowski distance](https://en.wikipedia.org/wiki/Minkowski_distance) between two vectors (ignores NaN) of order `p`.
-
v1
:
Vector<float>
-
v2
:
Vector<float>
-
p
:
float
-
float constrained to `p > 0`
-
Returns:
float option
-
Minkowski distance between elements of given vectors.
// e.g. v1 and v2 initialization
let v1 = vector [3.14; 2.0; 3.1]
let v2 = vector [9.1; 2.5; 3.7]
// Apply the minkowski distance to v1 and v2
Vector.minkowskiNaN v1 v2 3
|