Skip to content

Features

leoniewgnr edited this page Jun 15, 2023 · 1 revision

First thoughts on features that should go into NeuralProphet

Static covariates

Thoughts on implementation

  1. USER INPUT: will need to pass df (as before) and a new df_static with columns ID | static_covariate_name_1 | … | static_covariate_name_n
  2. CONFIG: NeuralProphet will have now a config_static_covariates which will be defined in configure.py in a StaticCovariates class. Keeping the same structure as the rest of components.
  3. Dataset & Dataloader:
  • In time_dataset.py we will add a new function make_static_covariates_features similar to the make_regressors_features
  • In the TimeDataset class:
    • We will have a new input variable df_static (*)
    • In the method init_after_tabularized, we add, after the line self.meta = self.name, self.static_covariates = make_static_covariates_features(df_static, config_static_covariates)
    • In __get_item__ we add a 4th output: static_covariates

After this, if I’m not missing anything, we should be fine to keep going having the static_covariates accessible in the DataLoader (*) Exactly the same as we do with df , df_static input will actually be df_static_i (passed ID by ID).