_BasePtForecaster#

class pytorch_forecasting.models.base._base_object._BasePtForecaster[source]#

Bases: _BaseObject

Base class for all PyTorch Forecasting forecaster packages.

This class points to model objects and contains metadata as tags.

Inherited-members:

Methods

create_test_instance

create_test_instances_and_names

get_model_cls

name

classmethod create_test_instance(parameter_set='default')[source]#

Construct an instance of the class, using first test parameter set.

Parameters:

parameter_set (str, default="default") – Name of the set of test parameters to return, for use in tests. If no special parameters are defined for a value, will return “default” set.

Returns:

instance

Return type:

instance of the class with default parameters

classmethod create_test_instances_and_names(parameter_set='default')[source]#

Create list of all test instances and a list of names for them.

Parameters:

parameter_set (str, default="default") – Name of the set of test parameters to return, for use in tests. If no special parameters are defined for a value, will return “default” set.

Returns:

  • objs (list of instances of cls) – i-th instance is cls(**cls.get_test_params()[i])

  • names (list of str, same length as objs) – i-th element is name of i-th instance of obj in tests. The naming convention is {cls.__name__}-{i} if more than one instance, otherwise {cls.__name__}

classmethod get_model_cls()[source]#

Get model class.

classmethod name()[source]#

Get model name.