From 22f3bb2b1cc15f9b94b0dddd00134f1521331e6d Mon Sep 17 00:00:00 2001 From: Michelle Hapich Date: Tue, 20 Jul 2021 10:36:44 -0400 Subject: [PATCH] Fix incorrect dataframe used to create histogram from page 352 in book --- 10_Manual_Feature_Engineering_code.ipynb | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/10_Manual_Feature_Engineering_code.ipynb b/10_Manual_Feature_Engineering_code.ipynb index 6ca82bd..0a05590 100644 --- a/10_Manual_Feature_Engineering_code.ipynb +++ b/10_Manual_Feature_Engineering_code.ipynb @@ -718,7 +718,7 @@ "predicted = (smf.ols(\"d2 ~ x_sq\", data=magic)\n", " .fit()\n", " .predict())\n", - "actual = comparison['d2']\n", + "actual = magic['d2']\n", "sns.distplot(predicted - actual, rug=True, \n", " norm_hist = True, ax=ax2)\n", "\n", @@ -827,7 +827,25 @@ ] } ], - "metadata": {}, + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.5" + } + }, "nbformat": 4, "nbformat_minor": 2 }