Skip to content

Commit

Permalink
Update r-linear-model-overfitting.irnb
Browse files Browse the repository at this point in the history
  • Loading branch information
vsyrgkanis committed Jul 22, 2024
1 parent 7e833a5 commit d75604a
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions PM1/r-linear-model-overfitting.irnb
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@
"languageId": "r"
}
},
"outputs": [
"text": ["asdfas\n"]
],
"source": [
"\n",
"set.seed(123)\n",
Expand All @@ -83,7 +80,22 @@
"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 d75604a

Please sign in to comment.