add 1 to HORIZON to prevent looping errors

pull/264/head
Alfredo Deza 4 years ago
parent cc750de797
commit 067bcf54ff

@ -224,7 +224,7 @@ Walk-forward validation is the gold standard of time series model evaluation and
```python ```python
test_shifted = test.copy() test_shifted = test.copy()
for t in range(1, HORIZON): for t in range(1, HORIZON+1):
test_shifted['load+'+str(t)] = test_shifted['load'].shift(-t, freq='H') test_shifted['load+'+str(t)] = test_shifted['load'].shift(-t, freq='H')
test_shifted = test_shifted.dropna(how='any') test_shifted = test_shifted.dropna(how='any')

Loading…
Cancel
Save