Skip to content

Commit

Permalink
fix: update docs to add hist exog list instead of previous behaviour (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
AzulGarza authored Nov 4, 2024
1 parent 56f01ad commit f293217
Show file tree
Hide file tree
Showing 2 changed files with 186 additions and 174 deletions.
14 changes: 10 additions & 4 deletions nbs/docs/capabilities/forecast/02_exogenous_variables.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@
" h=24,\n",
" id_col='unique_id',\n",
" target_col='y',\n",
" time_col='ds'\n",
" time_col='ds',\n",
" # Add the columns of `df` that will be considered as historical\n",
" hist_exog_list=['Exogenous1', 'Exogenous2', 'day_0', 'day_1', 'day_2', 'day_3', 'day_4', 'day_5', 'day_6']\n",
")\n"
]
},
Expand Down Expand Up @@ -185,8 +187,10 @@
"# Load the future value of exogenous variables over the forecast horizon\n",
"future_ex_vars_df = pd.read_csv('https://raw.githubusercontent.com/Nixtla/transfer-learning-time-series/main/datasets/electricity-short-future-ex-vars.csv')\n",
"\n",
"# We will only use 2 exogenous of future_ex_vars_df. The columns not included in future_ex_vars_df will be considered as historical exogenous variables, as the future values have not been supplied.\n",
"# We will only use 2 exogenous of future_ex_vars_df\n",
"future_ex_vars_df = future_ex_vars_df[[\"unique_id\", \"ds\", \"Exogenous1\", \"Exogenous2\"]]\n",
"# To pass historical exogenous variables, we need to add the list of columns\n",
"# in the `hist_exog_list` as follows.\n",
"\n",
"# Forecast\n",
"forecast_df = nixtla_client.forecast(\n",
Expand All @@ -195,7 +199,9 @@
" h=24,\n",
" id_col='unique_id',\n",
" target_col='y',\n",
" time_col='ds'\n",
" time_col='ds',\n",
" # Add the columns of `df` that will be considered as historical\n",
" hist_exog_list=['day_0', 'day_1', 'day_2', 'day_3', 'day_4', 'day_5', 'day_6']\n",
")"
]
},
Expand Down Expand Up @@ -230,5 +236,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
346 changes: 176 additions & 170 deletions nbs/docs/tutorials/01_exogenous_variables.ipynb

Large diffs are not rendered by default.

0 comments on commit f293217

Please sign in to comment.