actableai.timeseries.transform.base.ArrayTransformation¶Bases: actableai.timeseries.transform.base.MapTransformation
Base class for Transformations than are applied on numpy array.
map_revert_forecast(forecast: gluonts.model.forecast.Forecast, group: Tuple[Any, ...]) gluonts.model.forecast.Forecast¶Revert a transformation on a forecast.
The transformed forecast.
map_revert_time_series(data: Union[pandas.core.frame.DataFrame, pandas.core.series.Series], group: Tuple[Any, ...]) Union[pandas.core.frame.DataFrame, pandas.core.series.Series]¶Revert a transformation on a time series.
The transformed time series.
map_transform(data: Dict[str, Any], group: Tuple[Any, ...]) Dict[str, Any]¶Transform a data entry.
The transformed data entry.
revert_array(array: numpy.ndarray, start_date: pandas._libs.tslibs.period.Period, group: Tuple[Any, ...]) numpy.ndarray¶Revert a transformation on an array.
The transformed array.
transform_array(array: numpy.ndarray, start_date: pandas._libs.tslibs.period.Period, group: Tuple[Any, ...]) numpy.ndarray¶Transform an array.
The transformed array.
actableai.timeseries.transform.base.Chain(transformations: List[actableai.timeseries.transform.base.Transformation], is_flattenable: bool = True)¶Bases: actableai.timeseries.transform.base.Transformation
Chain multiple transformations together.
revert_forecasts(forecast_it: Iterable[gluonts.model.forecast.Forecast]) Iterable[gluonts.model.forecast.Forecast]¶Revert a transformation on forecasts.
revert_time_series(data_it: Iterable[Union[pandas.core.frame.DataFrame, pandas.core.series.Series]]) Iterable[Union[pandas.core.frame.DataFrame, pandas.core.series.Series]]¶Revert a transformation on time series.
transform(data_it: Iterable[Dict[str, Any]]) Iterable[Dict[str, Any]]¶Transform data entries.
actableai.timeseries.transform.base.MapTransformation¶Bases: actableai.timeseries.transform.base.Transformation
map_revert_forecast(forecast: gluonts.model.forecast.Forecast, group: Tuple[Any, ...]) gluonts.model.forecast.Forecast¶Revert a transformation on a forecast.
The transformed forecast.
map_revert_time_series(data: Union[pandas.core.frame.DataFrame, pandas.core.series.Series], group: Tuple[Any, ...]) Union[pandas.core.frame.DataFrame, pandas.core.series.Series]¶Revert a transformation on a time series.
The transformed time series.
map_transform(data: Dict[str, Any], group: Tuple[Any, ...]) Dict[str, Any]¶Transform a data entry.
The transformed data entry.
revert_forecasts(forecast_it: Iterable[gluonts.model.forecast.Forecast]) Iterable[gluonts.model.forecast.Forecast]¶Revert a transformation on forecasts.
revert_time_series(data_it: Iterable[Union[pandas.core.frame.DataFrame, pandas.core.series.Series]]) Iterable[Union[pandas.core.frame.DataFrame, pandas.core.series.Series]]¶Revert a transformation on time series.
transform(data_it: Iterable[Dict[str, Any]]) Iterable[Dict[str, Any]]¶Transform data entries.
actableai.timeseries.transform.base.Transformation¶Bases: object
Base class for all Transformations.
chain(other: actableai.timeseries.transform.base.Transformation) Union[actableai.timeseries.transform.base.Transformation, actableai.timeseries.transform.base.Chain]¶Chain transformation with the current transformation.
revert_forecasts(forecast_it: Iterable[gluonts.model.forecast.Forecast]) Iterable[gluonts.model.forecast.Forecast]¶Revert a transformation on forecasts.
revert_time_series(data_it: Iterable[Union[pandas.core.frame.DataFrame, pandas.core.series.Series]]) Iterable[Union[pandas.core.frame.DataFrame, pandas.core.series.Series]]¶Revert a transformation on time series.
setup(dataset: actableai.timeseries.dataset.AAITimeSeriesDataset)¶Set up the transformation with a dataset.
transform(data_it: Iterable[Dict[str, Any]]) Iterable[Dict[str, Any]]¶Transform data entries.
actableai.timeseries.transform.clean_features.CleanFeatures(keep_feat_static_real: bool = True, keep_feat_static_cat: bool = True, keep_feat_dynamic_real: bool = True, keep_feat_dynamic_cat: bool = True)¶Bases: actableai.timeseries.transform.base.MapTransformation
Transformation that clean features from dataset.
map_transform(data: Dict[str, Any], group: Tuple[Any, ...]) Dict[str, Any]¶Transform a data entry.
The transformed data entry.
actableai.timeseries.transform.deseasonalizing.Deseasonalizing(seasonal_period: int)¶Bases: actableai.timeseries.transform.base.ArrayTransformation
Remove seasonality.
Will compute the mean of all the values over a specified period of time. This mean values represent what is called the seasonality component. This transformation consists in removing this component from the time series.
For a more accurate representation of the seasonality it is advised to run a PowerTransformation and Detrend transformation beforehand.
revert_array(array: numpy.ndarray, start_date: pandas._libs.tslibs.period.Period, group: Tuple[Any, ...]) numpy.ndarray¶Revert a transformation on an array.
The transformed array.
transform_array(array: numpy.ndarray, start_date: pandas._libs.tslibs.period.Period, group: Tuple[Any, ...]) numpy.ndarray¶Transform an array.
The transformed array.
actableai.timeseries.transform.deseasonalizing.MultiDeseasonalizing¶Bases: actableai.timeseries.transform.base.Chain
Remove multiple seasonality.
actableai.timeseries.transform.detrend.Detrend¶Bases: actableai.timeseries.transform.base.ArrayTransformation
Detrend transformation using model fitting.
The trend is computed using a simple Linear Regression. This transformation computes the trend and subtracts it from the time series. Since it is a simple Linear Regression this transformation does not handle multiple trends.
revert_array(array: numpy.ndarray, start_date: pandas._libs.tslibs.period.Period, group: Tuple[Any, ...]) numpy.ndarray¶Revert a transformation on an array.
The transformed array.
transform_array(array: numpy.ndarray, start_date: pandas._libs.tslibs.period.Period, group: Tuple[Any, ...]) numpy.ndarray¶Transform an array.
The transformed array.
actableai.timeseries.transform.identity.Identity¶Bases: actableai.timeseries.transform.base.Transformation
Identity transformation (no transformation).
transform(data_it: Iterable[Dict[str, Any]]) Iterable[Dict[str, Any]]¶Transform data entries.
actableai.timeseries.transform.power_transformation.PowerTransformation¶Bases: actableai.timeseries.transform.base.ArrayTransformation
Power transformation.
This transformation will have for effect to make the data more Gaussian-like. see: https://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.PowerTransformer.html
revert_array(array: numpy.ndarray, start_date: pandas._libs.tslibs.period.Period, group: Tuple[Any, ...]) numpy.ndarray¶Revert a transformation on an array.
The transformed array.
transform_array(array: numpy.ndarray, start_date: pandas._libs.tslibs.period.Period, group: Tuple[Any, ...]) numpy.ndarray¶Transform an array.
The transformed array.