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[numpy.ndarray[Any, numpy.dtype[numpy.float64]]]) list[numpy.ndarray[Any, numpy.dtype[numpy.float64]]]#

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.

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.