Skip to content

Commit

Permalink
Update electricity.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
jwdink committed Jan 7, 2025
1 parent 52ae254 commit 5322331
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions docs/examples/electricity.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@
"id": "4a82175c-56c8-454a-925f-9cabfbedd079"
},
"source": [
"The first thing you'll notice about this approach is that it's **incredibly slow to train**. The second problem is that the forecasts are **terrible**:"
"The problem is that the forecasts are **terrible**:"
]
},
{
Expand Down Expand Up @@ -495,10 +495,9 @@
"source": [
"### Attempt 2\n",
"\n",
"Let's see if we can improve on this. We'll leave the model unchanged but make two changes:\n",
"Let's see if we can improve on this. We'll leave the model unchanged, but train it differently. We'll use the `n_step` argument to train our model on one-week ahead forecasts, instead of one-hour ahead. This improves the efficiency of training by encouraging the model to 'care about' longer range forecasts vs. over-focusing on the easier problem of forecasting the next hour.\n",
"\n",
"- Use the `n_step` argument to train our model on one-week ahead forecasts, instead of one step (i.e. hour) ahead. This improves the efficiency of training by encouraging the model to 'care about' longer range forecasts vs. over-focusing on the easier problem of forecasting the next hour.\n",
"- Split our single series into multiple groups. This is helpful to speed up training, since pytorch has a non-trivial overhead for separate tensors: i.e., it scales well with an increasing batch-size (fewer, but bigger, tensors), but poorly with an increasing time-series length (smaller, but more, tensors)."
"Another thing we'll address is the fact that the simple (and lousy) model above was surprisingly slow to train. This is because Pytorch has a non-trivial overhead for separate tensors: i.e., it scales well with an increasing batch-size (fewer, but bigger, tensors), but poorly with an increasing time-series length (smaller, but more, tensors). So to speed things up, we'll split our single series into multiple groups."
]
},
{
Expand Down

0 comments on commit 5322331

Please sign in to comment.