Namespace Distances¶
-
namespace khiva
distances
¶ Functions
-
double khiva::distances
dtw
(std::vector<double> a, std::vector<double> b)¶ Calculates the Dynamic Time Warping Distance.
- Return
- array The resulting distance between a and b.
- Parameters
a
: The input time series of reference.b
: The input query.
-
af::array khiva::distances
dtw
(af::array tss)¶ Calculates the Dynamic Time Warping Distance.
- Return
- af::array An upper triangular matrix where each position corresponds to the distance between two time series. Diagonal elements will be zero. For example: Position row 0 column 1 records the distance between time series 0 and time series 1.
- Parameters
tss
: Expects an input array whose dimension zero is the length of the time series (all the same) and dimension one indicates the number of time series.
-
af::array khiva::distances
euclidean
(af::array tss)¶ Calculates euclidean distances between time series.
- Return
- af::array An upper triangular matrix where each position corresponds to the distance between two time series. Diagonal elements will be zero. For example: Position row 0 column 1 records the distance between time series 0 and time series 1.
- Parameters
tss
: Expects an input array whose dimension zero is the length of the time series (all the same) and dimension one indicates the number of time series.
-
af::array khiva::distances
hamming
(af::array tss)¶ Calculates hamming distances between time series.
- Return
- af::array An upper triangular matrix where each position corresponds to the distance between two time series. Diagonal elements will be zero. For example: Position row 0 column 1 records the distance between time series 0 and time series 1.
- Parameters
tss
: Expects an input array whose dimension zero is the length of the time series (all the same) and dimension one indicates the number of time series.
-
af::array khiva::distances
manhattan
(af::array tss)¶ Calculates manhattan distances between time series.
- Return
- af::array An upper triangular matrix where each position corresponds to the distance between two time series. Diagonal elements will be zero. For example: Position row 0 column 1 records the distance between time series 0 and time series 1.
- Parameters
tss
: Expects an input array whose dimension zero is the length of the time series (all the same) and dimension one indicates the number of time series.
-
af::array khiva::distances
squaredEuclidean
(af::array tss)¶ Calculates non squared version of the euclidean distance.
- Return
- array An upper triangular matrix where each position corresponds to the distance between two time series. Diagonal elements will be zero. For example: Position row 0 column 1 records the distance between time series 0 and time series 1.
- Parameters
tss
: Expects an input array whose dimension zero is the length of the time series (all the same) and dimension one indicates the number of time series.
-
double khiva::distances