Skip to content

Commit

Permalink
[FIX] Default AutoPatchTST config (#811)
Browse files Browse the repository at this point in the history
* fix default patchtst

* base recurrent import split
  • Loading branch information
cchallu authored Nov 7, 2023
1 parent ff1566c commit 73684e5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
21 changes: 11 additions & 10 deletions nbs/common.base_recurrent.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -691,11 +691,19 @@
"outputs": [],
"source": [
"#| hide\n",
"# add h=0,1 unit test for _parse_windows \n",
"from neuralforecast.losses.pytorch import MAE\n",
"from neuralforecast.utils import AirPassengersDF\n",
"from neuralforecast.tsdataset import TimeSeriesDataset, TimeSeriesDataModule\n",
"\n",
"from neuralforecast.tsdataset import TimeSeriesDataset, TimeSeriesDataModule"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"#| hide\n",
"# add h=0,1 unit test for _parse_windows \n",
"# Declare batch\n",
"AirPassengersDF['x'] = np.array(len(AirPassengersDF))\n",
"AirPassengersDF['x2'] = np.array(len(AirPassengersDF)) * 2\n",
Expand Down Expand Up @@ -729,13 +737,6 @@
"test_eq(set(temporal_data_cols), set(['y', 'x', 'x2']))\n",
"test_eq(windows['temporal'].shape, torch.Size([1,len(['y', 'x', 'x2', 'available_mask']),117,12+1]))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
2 changes: 1 addition & 1 deletion nbs/models.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1683,7 +1683,7 @@
" \"input_size_multiplier\": [1, 2, 3],\n",
" \"h\": None,\n",
" \"hidden_size\": tune.choice([16, 128, 256]),\n",
" \"n_head\": tune.choice([4, 16]),\n",
" \"n_heads\": tune.choice([4, 16]),\n",
" \"patch_len\": tune.choice([16, 24]),\n",
" \"learning_rate\": tune.loguniform(1e-4, 1e-1),\n",
" \"scaler_type\": tune.choice([None, 'robust', 'standard']),\n",
Expand Down
2 changes: 1 addition & 1 deletion neuralforecast/auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,7 @@ class AutoPatchTST(BaseAuto):
"input_size_multiplier": [1, 2, 3],
"h": None,
"hidden_size": tune.choice([16, 128, 256]),
"n_head": tune.choice([4, 16]),
"n_heads": tune.choice([4, 16]),
"patch_len": tune.choice([16, 24]),
"learning_rate": tune.loguniform(1e-4, 1e-1),
"scaler_type": tune.choice([None, "robust", "standard"]),
Expand Down
2 changes: 1 addition & 1 deletion neuralforecast/models/hint.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def get_bottomup_P(S: np.ndarray):
**References:**<br>
- [Orcutt, G.H., Watts, H.W., & Edwards, J.B.(1968). \"Data aggregation and information loss\". The American
Economic Review, 58 , 773{787)](http://www.jstor.org/stable/1815532).
Economic Review, 58 , 773(787)](http://www.jstor.org/stable/1815532).
"""
n_series = len(S)
n_agg = n_series - S.shape[1]
Expand Down

0 comments on commit 73684e5

Please sign in to comment.