From 433f75c46f95164ecd41beb99cafb4ef275bdb21 Mon Sep 17 00:00:00 2001 From: vsyrgkanis Date: Sat, 20 Jul 2024 08:11:26 -0700 Subject: [PATCH] Update python-linear-model-overfitting.ipynb --- PM1/python-linear-model-overfitting.ipynb | 33 +++++++++++++++++++---- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/PM1/python-linear-model-overfitting.ipynb b/PM1/python-linear-model-overfitting.ipynb index 9762d5d3..25b05c01 100644 --- a/PM1/python-linear-model-overfitting.ipynb +++ b/PM1/python-linear-model-overfitting.ipynb @@ -21,7 +21,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": { "id": "YTaOmenI7TfT" }, @@ -44,7 +44,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "metadata": { "id": "C57WYtYM7OL0", "papermill": { @@ -56,12 +56,35 @@ }, "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "p/n is: 1.0\n", + "R^2 is 1.0\n", + "Adjusted R^2 is nan\n", + "p/n is: 0.5\n", + "R^2 is 0.5232392347513539\n", + "Adjusted R^2 is 0.04647846950270784\n", + "p/n is: 0.05\n", + "R^2 is 0.05610356497156044\n", + "Adjusted R^2 is 0.006424805233221531\n" + ] + } + ], "source": [ "regression_stats(1000, 1000)\n", "regression_stats(1000, 500)\n", "regression_stats(1000, 50)" ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { @@ -83,7 +106,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.5" + "version": "3.12.4" }, "papermill": { "default_parameters": {}, @@ -99,5 +122,5 @@ } }, "nbformat": 4, - "nbformat_minor": 1 + "nbformat_minor": 4 }