1.4. Namespace Distances¶
-
class
Distances
¶ Khiva Distances class containing distances methods.
Public Static Functions
-
static KhivaArray Khiva.Distances.Dtw(KhivaArray arr)
Calculates the Dynamic Time Warping Distance.
- Return
- 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
arr
: 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.
-
static KhivaArray Khiva.Distances.Euclidean(KhivaArray arr)
Calculates euclidean distances between time series.
- Return
- 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
arr
: 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.
-
static KhivaArray Khiva.Distances.Hamming(KhivaArray arr)
Calculates Hamming distances between time series.
- Return
- 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
arr
: 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.
-
static KhivaArray Khiva.Distances.Manhattan(KhivaArray arr)
Calculates Manhattan distances between time series.
- Return
- 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
arr
: 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.
-
static KhivaArray Khiva.Distances.Sbd(KhivaArray arr)
Calculates the Shape-Based distance (SBD). It computes the normalized cross-correlation and it returns 1.0 minus the value that maximizes the correlation value between each pair of time series.
- Return
- 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
arr
: 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.
-
static KhivaArray Khiva.Distances.SquaredEuclidean(KhivaArray arr)
Calculates the Shape-Based distance (SBD). It computes the normalized cross-correlation and it returns 1.0 minus the value that maximizes the correlation value between each pair of time series.
- Return
- 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
arr
: 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.
-