# gluonts.nursery.autogluon_tabular.predictor module¶

class gluonts.nursery.autogluon_tabular.predictor.TabularPredictor(ag_model, freq: str, prediction_length: int, time_features: List[gluonts.time_feature._base.TimeFeature], lag_indices: List[int], scaling: Callable[[pandas.core.series.Series], Tuple[pandas.core.series.Series, float]], batch_size: Optional[int] = 32, dtype=<class 'numpy.float32'>)[source]
property auto_regression
classmethod deserialize(path: pathlib.Path, scaling: Callable[[pandas.core.series.Series], Tuple[pandas.core.series.Series, float]] = <function mean_abs_scaling>, **kwargs) → gluonts.model.predictor.Predictor[source]

Load a serialized predictor from the given path

Parameters
• path – Path to the serialized files predictor.

• **kwargs – Optional context/device parameter to be used with the predictor. If nothing is passed will use the GPU if available and CPU otherwise.

predict(dataset: Iterable[Dict], batch_size: Optional[int] = None, **kwargs) → Iterator[gluonts.model.forecast.SampleForecast][source]

Compute forecasts for the time series in the provided dataset. This method is not implemented in this abstract class; please use one of the subclasses. :param dataset: The dataset containing the time series to predict.

Returns

Iterator over the forecasts, in the same order as the dataset iterable was provided.

Return type

Iterator[Forecast]

serialize(path: pathlib.Path) → None[source]
gluonts.nursery.autogluon_tabular.predictor.get_features_dataframe(series: pandas.core.series.Series, time_features: List[gluonts.time_feature._base.TimeFeature], lag_indices: List[int], past_data: Optional[pandas.core.series.Series] = None) → pandas.core.frame.DataFrame[source]

Constructs a DataFrame of features for a given Series.

Features include some date-time features (like hour-of-day, day-of-week, …) and lagged values from the series itself. Lag indices are specified by lags, while previous data can be specified by past_data: the latter allows to get lags also for the initial values of the series.

Parameters
• series – Series on which features should be computed.

• time_features – List of time features to be included in the data frame.

• lag_indices – List of indices of lagged observations to be included as features.

• past_data – Prior data, to be used to compute lagged observations.

Returns

A DataFrame containing the features. This has the same index as series.

Return type

pd.DataFrame

gluonts.nursery.autogluon_tabular.predictor.mean_abs_scaling(series: pandas.core.series.Series, minimum_scale=1e-06)[source]

Scales a Series by the mean of its absolute value. Returns the scaled Series and the scale itself.

gluonts.nursery.autogluon_tabular.predictor.no_scaling(series: pandas.core.series.Series)[source]