gluonts.model.estimator module#

class gluonts.model.estimator.Estimator(lead_time: int = 0, **kwargs)[source]#

Bases: object

An abstract class representing a trainable model.

The underlying model is trained by calling the train method with a training Dataset, producing a Predictor object.

classmethod derive_auto_fields(train_iter)[source]#
classmethod from_hyperparameters(**hyperparameters)[source]#
classmethod from_inputs(train_iter, **params)[source]#
lead_time: int#
prediction_length: int#
train(training_data: Dataset, validation_data: Optional[Dataset] = None) Predictor[source]#

Train the estimator on the given data.

Parameters:
  • training_data – Dataset to train the model on.

  • validation_data – Dataset to validate the model on during training.

Returns:

The predictor containing the trained model.

Return type:

Predictor

class gluonts.model.estimator.IncrementallyTrainable(*args, **kwargs)[source]#

Bases: Protocol

train_from(predictor: Predictor, training_data: Dataset, validation_data: Optional[Dataset] = None) Predictor[source]#

Experimental: this feature may change in future versions. Train the estimator, starting from a previously trained predictor, on the given data.

Parameters:
  • predictor – A previously trained model, from which to initialize the estimator training.

  • training_data – Dataset to train the model on.

  • validation_data – Dataset to validate the model on during training.

Returns:

The predictor containing the trained model.

Return type:

Predictor