Skip to content

Commit

Permalink
test different hist exogs
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoralez committed Nov 13, 2024
1 parent 19c80f5 commit 91b27ec
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions nbs/src/nixtla_client.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2292,6 +2292,27 @@
" )"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"#| hide\n",
"# different hist exog, different results\n",
"for X_df in (None, valid):\n",
" res1 = nixtla_client.forecast(train, h=h, X_df=X_df, freq=freq, hist_exog_list=x_cols[:2])\n",
" res2 = nixtla_client.forecast(train, h=h, X_df=X_df, freq=freq, hist_exog_list=x_cols[2:])\n",
" np.testing.assert_raises(\n",
" AssertionError,\n",
" np.testing.assert_allclose,\n",
" res1['TimeGPT'],\n",
" res2['TimeGPT'],\n",
" atol=1e-4,\n",
" rtol=1e-3,\n",
" )"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down

0 comments on commit 91b27ec

Please sign in to comment.