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]¶ Bases:
gluonts.model.predictor.Predictor
-
property
auto_regression
¶
-
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]
-
property
-
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