Skip to main content

BaseTargetTransform

Bases: ABC Base class used for target transformations.

Differences

Bases: _BaseGroupedArrayTargetTransform Subtracts previous values of the serie. Can be used to remove trend or seasonalities.

AutoDifferences

Bases: _BaseGroupedArrayTargetTransform Find and apply the optimal number of differences to each serie. Parameters:
NameTypeDescriptionDefault
max_diffsintMaximum number of differences to apply.required

AutoDifferences.inverse_transform_fitted

Inverse transform fitted values. Reverses the differencing transformation by reconstructing the original values from the differenced fitted values. This is used when fitted=True to restore the fitted predictions to the original scale. Parameters:
NameTypeDescriptionDefault
gaGroupedArrayGroupedArray containing the differenced fitted values.required
Returns:
TypeDescription
GroupedArrayGroupedArray with fitted values in the original scale.
Raises:
TypeDescription
ValueErrorIf fitted differences are smaller than provided target.

AutoSeasonalDifferences

Bases: AutoDifferences Find and apply the optimal number of seasonal differences to each group. Parameters:
NameTypeDescriptionDefault
season_lengthintLength of the seasonal period.required
max_diffsintMaximum number of differences to apply.required
n_seasonsintNumber of seasons to use to determine the number of differences. Defaults to 10. If None will use all samples, otherwise season_length * n_seasons samples will be used for the test. Smaller values will be faster but could be less accurate.10

AutoSeasonalDifferences.inverse_transform_fitted

Inverse transform fitted values. Reverses the differencing transformation by reconstructing the original values from the differenced fitted values. This is used when fitted=True to restore the fitted predictions to the original scale. Parameters:
NameTypeDescriptionDefault
gaGroupedArrayGroupedArray containing the differenced fitted values.required
Returns:
TypeDescription
GroupedArrayGroupedArray with fitted values in the original scale.
Raises:
TypeDescription
ValueErrorIf fitted differences are smaller than provided target.

AutoSeasonalityAndDifferences

Bases: AutoDifferences Find the length of the seasonal period and apply the optimal number of differences to each group. Parameters:
NameTypeDescriptionDefault
max_season_lengthintMaximum length of the seasonal period.required
max_diffsintMaximum number of differences to apply.required
n_seasonsintNumber of seasons to use to determine the number of differences. Defaults to 10. If None will use all samples, otherwise max_season_length * n_seasons samples will be used for the test. Smaller values will be faster but could be less accurate.10
Raises:
TypeDescription
ValueErrorIf any series has fewer than max_diffs + 4 observations. This ensures that after differencing, there are at least 4 observations remaining for STL decomposition (minimum 2 periods × minimum period of 2).

AutoSeasonalityAndDifferences.inverse_transform_fitted

Inverse transform fitted values. Reverses the differencing transformation by reconstructing the original values from the differenced fitted values. This is used when fitted=True to restore the fitted predictions to the original scale. Parameters:
NameTypeDescriptionDefault
gaGroupedArrayGroupedArray containing the differenced fitted values.required
Returns:
TypeDescription
GroupedArrayGroupedArray with fitted values in the original scale.
Raises:
TypeDescription
ValueErrorIf fitted differences are smaller than provided target.

LocalStandardScaler

Bases: _BaseLocalScaler Standardizes each serie by subtracting its mean and dividing by its standard deviation.

LocalMinMaxScaler

Bases: _BaseLocalScaler Scales each serie to be in the [0, 1] interval.

LocalRobustScaler

Bases: _BaseLocalScaler Scaler robust to outliers. Parameters:
NameTypeDescriptionDefault
scalestrStatistic to use for scaling. Can be either ‘iqr’ (Inter Quartile Range) or ‘mad’ (Median Asbolute Deviation). Defaults to ‘iqr’.required

LocalBoxCox

Bases: _BaseLocalScaler Finds the optimum lambda for each serie and applies the Box-Cox transformation

GlobalSklearnTransformer

Bases: BaseTargetTransform Applies the same scikit-learn transformer to all series.