Table Of Contents
Table Of Contents

gluonts.model.estimator module

class gluonts.model.estimator.DummyEstimator(predictor_cls: type, **kwargs)[source]

Bases: gluonts.model.estimator.Estimator

An Estimator that, upon training, simply returns a pre-constructed Predictor.

Parameters:
  • predictor_clsPredictor class to instantiate.
  • **kwargs – Keyword arguments to pass to the predictor constructor.
train(training_data: gluonts.dataset.common.Dataset) → gluonts.model.predictor.Predictor[source]

Train the estimator on the given data.

Parameters:training_data – Dataset to train the model on.
Returns:The predictor containing the trained model.
Return type:Predictor
class gluonts.model.estimator.Estimator[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 from_hyperparameters(**hyperparameters)[source]
train(training_data: gluonts.dataset.common.Dataset) → gluonts.model.predictor.Predictor[source]

Train the estimator on the given data.

Parameters:training_data – Dataset to train the model on.
Returns:The predictor containing the trained model.
Return type:Predictor
class gluonts.model.estimator.GluonEstimator(trainer: gluonts.trainer._base.Trainer, float_type: gluonts.core.component.DType = <class 'numpy.float32'>)[source]

Bases: gluonts.model.estimator.Estimator

An Estimator type with utilities for creating Gluon-based models.

To extend this class, one needs to implement three methods: create_transformation, create_training_network, create_predictor.

create_predictor(transformation: gluonts.transform.Transformation, trained_network: mxnet.gluon.block.HybridBlock) → gluonts.model.predictor.Predictor[source]

Create and return a predictor object.

Returns:A predictor wrapping a HybridBlock used for inference.
Return type:Predictor
create_training_network() → mxnet.gluon.block.HybridBlock[source]

Create and return the network used for training (i.e., computing the loss).

Returns:The network that computes the loss given input data.
Return type:HybridBlock
create_transformation() → gluonts.transform.Transformation[source]

Create and return the transformation needed for training and inference.

Returns:The transformation that will be applied entry-wise to datasets, at training and inference time.
Return type:Transformation
classmethod from_hyperparameters(**hyperparameters) → gluonts.model.estimator.GluonEstimator[source]
train(training_data: gluonts.dataset.common.Dataset) → gluonts.model.predictor.Predictor[source]

Train the estimator on the given data.

Parameters:training_data – Dataset to train the model on.
Returns:The predictor containing the trained model.
Return type:Predictor
train_model(training_data: gluonts.dataset.common.Dataset) → gluonts.model.estimator.TrainOutput[source]
class gluonts.model.estimator.TrainOutput(transformation, trained_net, predictor)[source]

Bases: tuple

predictor

Alias for field number 2

trained_net

Alias for field number 1

transformation

Alias for field number 0