Skip to content

Commit

Permalink
Strip outputs from .ipynb files [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jul 22, 2024
1 parent 51104f0 commit 4b2cdbf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 35 deletions.
22 changes: 3 additions & 19 deletions PM1/python-linear-model-overfitting.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {
"id": "YTaOmenI7TfT"
},
Expand All @@ -44,7 +44,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"metadata": {
"id": "C57WYtYM7OL0",
"papermill": {
Expand All @@ -56,23 +56,7 @@
},
"tags": []
},
"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"
]
}
],
"outputs": [],
"source": [
"regression_stats(1000, 1000)\n",
"regression_stats(1000, 500)\n",
Expand Down
18 changes: 2 additions & 16 deletions PM1/r-linear-model-overfitting.irnb
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"languageId": "r"
}
},
"outputs": [],
"source": [
"\n",
"set.seed(123)\n",
Expand All @@ -80,22 +81,7 @@
"print(summary(lm(y ~ X))$r.squared)\n",
"print(\"Adjusted R2 is\")\n",
"print(summary(lm(y ~ X))$adj.r.squared)\n"
],
"execution_count": 3,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"[1] \"p/n is\"\n",
"[1] 0.5\n",
"[1] \"R2 is\"\n",
"[1] 0.4922339\n",
"[1] \"Adjusted R2 is\"\n",
"[1] -0.01654975\n"
]
}
]
]
},
{
"cell_type": "markdown",
Expand Down

0 comments on commit 4b2cdbf

Please sign in to comment.