1.9. Namespace Normalization

class Normalization

Khiva Normalization class containing several normalization methods.

Public Static Functions

static KhivaArray Khiva.Normalization.DecimalScalingNorm(KhivaArray tss)

Normalizes the given time series according to its maximum value and adjusts each value within the range (-1, 1).

Return
An array with the same dimensions as tss, whose values (time series in dimension 0) have been normalized by dividing each number by 10^j, where j is the number of integer digits of the max number in the time series.
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.

static void Khiva.Normalization.DecimalScalingNorm(ref KhivaArray tss)

Same as decimal_scaling_norm, but it performs the operation inplace, without allocating further memory.

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.

static KhivaArray Khiva.Normalization.MaxMinNorm(KhivaArray tss, double high, double low, double epsilon = 0.00000001)

Normalizes the given time series according to its minimum and maximum value and adjusts each value within the range[low, high].

Return
KhivaArray with the same dimensions as tss, whose values (time series in dimension 0) have been normalized by maximum and minimum values, and scaled as per high and low parameters.
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.
  • high: Maximum final value (Defaults to 1.0).
  • low: Minimum final value (Defaults to 0.0).
  • epsilon: Safeguard for constant (or near constant) time series as the operation implies a unit scale operation between min and max values in the tss.

static void Khiva.Normalization.MaxMinNorm(ref KhivaArray tss, double high, double low, double epsilon = 0.00000001)

Same as max_min_norm, but it performs the operation inplace, without allocating further memory.

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.
  • high: Maximum final value (Defaults to 1.0).
  • low: Minimum final value (Defaults to 0.0).
  • epsilon: Safeguard for constant (or near constant) time series as the operation implies a unit scale operation between min and max values in the tss.

static KhivaArray Khiva.Normalization.MeanNorm(KhivaArray tss)

Normalizes the given time series according to its maximum-minimum value and its mean. It follows the following formulae:

\[ \acute{x} = \frac{x - mean(x)}{max(x) - min(x)}. \]

Return
An array with the same dimensions as tss, whose values (time series in dimension 0) have been normalized by subtracting the mean from each number and dividing each number by \( max(x) - min(x)\), in the time series.
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.

static void Khiva.Normalization.MeanNorm(ref KhivaArray tss)

Normalizes the given time series according to its maximum-minimum value and its mean. It follows the following formulae:

\[ \acute{x} = \frac{x - mean(x)}{max(x) - min(x)}. \]

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.

static KhivaArray Khiva.Normalization.ZNorm(KhivaArray tss, double epsilon)

Calculates a new set of times series with zero mean and standard deviation one.

Return
KhivaArray with the same dimensions as tss where the time series have been adjusted for zero mean and one as standard deviation.
Parameters
  • tss: Time series concatenated in a single row.
  • epsilon: Minimum standard deviation to consider. It acts as a gatekeeper for those time series that may be constant or near constant.

static void Khiva.Normalization.ZNorm(ref KhivaArray tss, double epsilon)

Adjusts the time series in the given input and performs z-norm inplace(without allocating further memory).

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.
  • epsilon: Minimum standard deviation to consider. It acts as a gatekeeper for those time series that may be constant or near constant.