Skip to content

Commit

Permalink
Account for second notebook in original
Browse files Browse the repository at this point in the history
  • Loading branch information
tjburch committed Apr 16, 2024
1 parent 5948ea2 commit 1b8a0b1
Show file tree
Hide file tree
Showing 2 changed files with 583 additions and 2,608 deletions.
8 changes: 3 additions & 5 deletions docs/notebooks/orthogonal_polynomial_reg.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@
}
],
"source": [
"diagonal = np.diag(np.diag(r))\n",
"diagonal = np.diag(np.diag(r)) # First call gets elements, second creates diag matrix\n",
"transformation_matrix = np.dot(q, diagonal)\n",
"print(transformation_matrix.round(4))\n"
]
Expand Down Expand Up @@ -2707,8 +2707,6 @@
}
],
"source": [
"\n",
"\n",
"fig = plt.figure()\n",
"for p in [.68, .95]:\n",
" bmb.interpret.plot_predictions(\n",
Expand All @@ -2735,7 +2733,7 @@
"\n",
"> \"With four parameters I can fit an elephant, and with five I can make him wiggle his trunk.\" - John von Neumann\n",
"\n",
"The takeaway here is that **as you reach fit polynomial degrees, you increase the risk of overfitting**.\n",
"The takeaway here is that **as you fit higher polynomial degrees, you increase the risk of overfitting**.\n",
"\n",
"#### Extrapolation of polynomial models\n",
"\n",
Expand Down Expand Up @@ -2908,7 +2906,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.7"
"version": "3.11.8"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 1b8a0b1

Please sign in to comment.