Skip to content

Commit af039f9

Browse files
committed
Fixed notebooks
1 parent 7e320ca commit af039f9

3 files changed

+23
-17
lines changed

notebooks/05 Timeseries Forecasting.ipynb

+9-9
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@
215215
"cell_type": "markdown",
216216
"metadata": {},
217217
"source": [
218-
"we now have 1252 unique windows (identified by stock symbol and ending date):"
218+
"we now have 1253 unique windows (identified by stock symbol and ending date):"
219219
]
220220
},
221221
{
@@ -342,7 +342,7 @@
342342
"cell_type": "markdown",
343343
"metadata": {},
344344
"source": [
345-
"Just to repeat: the features in this row were only calculated using the time series values of `AAPL` up to and including `2015-07-14` and the last 20 days."
345+
"Just to repeat: the features in this row were only calculated using the time series values of `AAPL` up to and including `2020-07-14` and the last 20 days."
346346
]
347347
},
348348
{
@@ -418,7 +418,7 @@
418418
"source": [
419419
"We can now train normal AdaBoostRegressors to predict the next time step .\n",
420420
"Let's split the data into a training and testing sample (but make sure to keep temporal consistency).\n",
421-
"We take everything until 2019 as train data an the rest as test:"
421+
"We take everything until 2020 as train data an the rest as test:"
422422
]
423423
},
424424
{
@@ -427,7 +427,7 @@
427427
"metadata": {},
428428
"outputs": [],
429429
"source": [
430-
"X[:\"2018\"]"
430+
"X[:\"2020\"]"
431431
]
432432
},
433433
{
@@ -436,11 +436,11 @@
436436
"metadata": {},
437437
"outputs": [],
438438
"source": [
439-
"X_train = X[:\"2018\"]\n",
440-
"X_test = X[\"2019\":]\n",
439+
"X_train = X[:\"2020\"]\n",
440+
"X_test = X[\"2021\":]\n",
441441
"\n",
442-
"y_train = y[:\"2018\"]\n",
443-
"y_test = y[\"2019\":]"
442+
"y_train = y[:\"2020\"]\n",
443+
"y_test = y[\"2021\":]"
444444
]
445445
},
446446
{
@@ -535,7 +535,7 @@
535535
"name": "python",
536536
"nbconvert_exporter": "python",
537537
"pygments_lexer": "ipython3",
538-
"version": "3.10.9"
538+
"version": "3.10.13"
539539
}
540540
},
541541
"nbformat": 4,

notebooks/advanced/05 Timeseries Forecasting (multiple ids).ipynb

+13-6
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@
197197
"cell_type": "markdown",
198198
"metadata": {},
199199
"source": [
200-
"Just to repeat: the features in this row were only calculated using the time series values of `AAPL` up to and including `2015-07-15` and the last 20 days."
200+
"Just to repeat: the features in this row were only calculated using the time series values of `AAPL` up to and including `2020-07-14` and the last 20 days."
201201
]
202202
},
203203
{
@@ -268,11 +268,11 @@
268268
"metadata": {},
269269
"outputs": [],
270270
"source": [
271-
"X_train = X.loc[(slice(None), slice(None, \"2018\")), :]\n",
272-
"X_test = X.loc[(slice(None), slice(\"2019\", \"2020\")), :]\n",
271+
"X_train = X.loc[(slice(None), slice(None, \"2020\")), :]\n",
272+
"X_test = X.loc[(slice(None), slice(\"2021\", \"2022\")), :]\n",
273273
"\n",
274-
"y_train = y.loc[(slice(None), slice(None, \"2018\"))]\n",
275-
"y_test = y.loc[(slice(None), slice(\"2019\", \"2020\"))]"
274+
"y_train = y.loc[(slice(None), slice(None, \"2020\"))]\n",
275+
"y_test = y.loc[(slice(None), slice(\"2021\", \"2022\"))]"
276276
]
277277
},
278278
{
@@ -336,6 +336,13 @@
336336
"y.unstack(\"Symbols\").plot(ax=plt.gca())\n",
337337
"y_pred.unstack(\"Symbols\").plot(ax=plt.gca(), legend=None, marker=\".\")"
338338
]
339+
},
340+
{
341+
"cell_type": "code",
342+
"execution_count": null,
343+
"metadata": {},
344+
"outputs": [],
345+
"source": []
339346
}
340347
],
341348
"metadata": {
@@ -354,7 +361,7 @@
354361
"name": "python",
355362
"nbconvert_exporter": "python",
356363
"pygments_lexer": "ipython3",
357-
"version": "3.7.7"
364+
"version": "3.10.13"
358365
}
359366
},
360367
"nbformat": 4,

notebooks/advanced/visualize-benjamini-yekutieli-procedure.ipynb

+1-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@
3838
"from tsfresh.feature_extraction import ComprehensiveFCParameters\n",
3939
"\n",
4040
"matplotlib.rcParams[\"figure.figsize\"] = [16, 6]\n",
41-
"matplotlib.rcParams[\"font.size\"] = 14\n",
42-
"matplotlib.style.use('seaborn-darkgrid')"
41+
"matplotlib.rcParams[\"font.size\"] = 14"
4342
]
4443
},
4544
{

0 commit comments

Comments
 (0)