PytorchForecastingDeepAR#

class PytorchForecastingDeepAR(model_params: dict[str, Any] | None = None, allowed_encoder_known_variable_names: list[str] | None = None, dataset_params: dict[str, Any] | None = None, train_to_dataloader_params: dict[str, Any] | None = None, validation_to_dataloader_params: dict[str, Any] | None = None, trainer_params: dict[str, Any] | None = None, model_path: str | None = None, deterministic: bool = False, random_log_path: bool = False, broadcasting: bool = False)[源代码][源代码]#

pytorch-forecasting DeepAR 模型。

参数:
模型参数dict[str, Any] (默认=None)

传递给初始化 pytorch-forecasting NBeats 模型的参数 [1] 例如:{“cell_type”: “GRU”, “rnn_layers”: 3}

dataset_paramsdict[str, Any] (默认=None)

初始化 TimeSeriesDataSet [2] 的参数来自 pandas.DataFrame max_prediction_length 将根据 fh 被覆盖 time_idx, target, group_ids, time_varying_known_reals, time_varying_unknown_reals 将从数据中推断,因此您不需要传递它们

train_to_dataloader_paramsdict[str, Any] (默认=None)

传递给 TimeSeriesDataSet.to_dataloader() 的默认参数为 {“train”: True}

validation_to_dataloader_paramsdict[str, Any] (默认=None)

传递给 TimeSeriesDataSet.to_dataloader() 的默认参数为 {“train”: False}

model_path: 字符串 (默认=None)

尝试加载一个已存在的模型而不进行拟合。仍然需要调用拟合函数,但不会执行实际的拟合操作。

deterministic: bool (默认=False)

在预测之前设置种子,以便对于相同的输入给出相同的输出

random_log_path: bool (默认=False)

使用随机根目录进行日志记录。此参数用于Github action中的CI测试,不适用于最终用户。

属性:
算法类

导入底层的 pytorch-forecasting 算法类。

算法参数

获取 DeepAR 类的关键字参数。

dict

底层算法类的关键字参数