Machine learning algorithms in C++
|
Distance metrics. More...
#include <Metrics.hpp>
Static Public Member Functions | |
static MatrixD | minkowski (MatrixD m, double p, bool root=true) |
Calculates the Minkowski distances between elements in a matrix. More... | |
static MatrixD | chebyshev (MatrixD a) |
Calculates the Chebyshev distances between elements in a matrix. More... | |
static MatrixD | euclidean (MatrixD m, bool root=true) |
Calculates the Euclidean distances between elements in a matrix. More... | |
static MatrixD | manhattan (MatrixD m, bool root=true) |
Calculates the Manhattan distances between elements in a matrix. More... | |
static MatrixD | minkowski (MatrixD a, MatrixD b, double p, bool root=true) |
Calculates the Minkowski distances between elements in two matrices. More... | |
static MatrixD | chebyshev (MatrixD a, MatrixD b) |
Calculates the Chebyshev distances between elements in two matrices. More... | |
static MatrixD | euclidean (MatrixD a, MatrixD b, bool root=true) |
Calculates the Euclidean distances between elements in two matrices. More... | |
static MatrixD | manhattan (MatrixD a, MatrixD b, bool root=true) |
Calculates the Manhattan distances between elements in two matrices. More... | |
Distance metrics.
Definition at line 13 of file Metrics.hpp.
|
inlinestatic |
Calculates the Chebyshev distances between elements in a matrix.
Elements must be located in the matrix rows
a | matrix of elements |
Definition at line 41 of file Metrics.hpp.
|
inlinestatic |
Calculates the Chebyshev distances between elements in two matrices.
Elements must be located in the matrices rows and both matrices must have the same number of features (columns)
a | first matrix |
b | second matrix |
Definition at line 105 of file Metrics.hpp.
|
inlinestatic |
Calculates the Euclidean distances between elements in a matrix.
Elements must be located in the matrix rows
m | matrix of elements |
root | whether to take the root of the distance. Default is False for the expected behavior |
Definition at line 61 of file Metrics.hpp.
|
inlinestatic |
Calculates the Euclidean distances between elements in two matrices.
Elements must be located in the matrices rows and both matrices must have the same number of features (columns)
a | first matrix |
b | second matrix |
root | whether to take the root of the distance. Default is False for the expected behavior |
Definition at line 129 of file Metrics.hpp.
|
inlinestatic |
Calculates the Manhattan distances between elements in a matrix.
Elements must be located in the matrix rows
m | matrix of elements |
root | whether to take the root of the distance. Default is False for the expected behavior |
Definition at line 69 of file Metrics.hpp.
|
inlinestatic |
Calculates the Manhattan distances between elements in two matrices.
Elements must be located in the matrices rows and both matrices must have the same number of features (columns)
a | first matrix |
b | second matrix |
root | whether to take the root of the distance. Default is False for the expected behavior |
Definition at line 138 of file Metrics.hpp.
|
inlinestatic |
Calculates the Minkowski distances between elements in a matrix.
Elements must be located in the matrix rows
m | matrix of elements |
p | the power to be used by the metric |
root | whether to take the root of the distance. Default is False for the expected behavior |
Definition at line 22 of file Metrics.hpp.
|
inlinestatic |
Calculates the Minkowski distances between elements in two matrices.
Elements must be located in the matrices rows and both matrices must have the same number of features (columns)
a | first matrix |
b | second matrix |
p | the power to be used by the metric |
root | whether to take the root of the distance. Default is False for the expected behavior |
Definition at line 79 of file Metrics.hpp.