normalizer#

Provides a normalizer, which can normalize train and test data.

class Normalizer#

Bases: object

Normalizes train and test data.

denormalize_prediction_data(data: ndarray[Any, dtype[float64]]) ndarray[Any, dtype[float64]]#

Denormalizes the data.

Denormalizes the data, by multiplying with the standard deviation and adding the mean of the train set.

Parameters:

data – Data to denormalize.

Returns:

The denormalized data.

Raises:

NotInitializedError – If the normalizer is not initialized.

normalize_test_data(test: ndarray[Any, dtype[float64]]) ndarray[Any, dtype[float64]]#

Normalizes the test data.

Subtracts the mean and divides through the standard deviation of the train set.

Parameters:

test – Test data.

Returns:

The normalized test data.

Raises:

NotInitializedError – If the normalizer is not initialized.

normalize_train_data(train: list[pandas.core.frame.DataFrame], time_series_params: TimeSeriesConfig) list[pandas.core.frame.DataFrame]#

Normalizes the train data.

Normalizes the train data by subtracting the mean and dividing through the standard deviation of the train set.

Parameters:
  • train – Train data.

  • time_series_params – Time series parameters.

Returns:

The normalized train data.

exception NotInitializedError#

Bases: Exception

Raised when normalize_test_data is called on uninitialized Normalizer.

with_traceback()#

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.