update exercises w38 and w39

This commit is contained in:
KarlHenrik
2025-09-10 12:14:32 +02:00
parent cee5f8e1f0
commit fbdf9c32f8
196 changed files with 23368 additions and 300 deletions
+10 -4
View File
@@ -245,9 +245,13 @@
"id": "831db06c",
"metadata": {},
"source": [
"**a)** Show that you can rewrite this in terms of a term which contains the variance of the model itself (the so-called variance term), a\n",
"term which measures the deviation from the true data and the mean value of the model (the bias term) and finally the variance of the noise Note that in order to be able to evaluate the bias them, you will need to approximate the function $f$ with the model ${\\bf y}$.\n",
"show that\n"
"**a)** Show that you can rewrite this into an expression which contains\n",
"\n",
"- the variance of the model (the variance term)\n",
"- the expected deviation of the mean of the model from the true data (the bias term)\n",
"- the variance of the noise\n",
"\n",
"In other words, show that:\n"
]
},
{
@@ -403,6 +407,8 @@
"# X = ...\n",
"# X_train, X_test, y_train, y_test = ...\n",
"#\n",
"# #this is where you fit your model on the sampled data\n",
"#\n",
"# predictions[b, :] =\n",
"# targets[b, :] =\n",
"#\n",
@@ -418,7 +424,7 @@
"source": [
"**e)** Discuss the bias-variance trade-off as function of your model complexity (the degree of the polynomial).\n",
"\n",
"**f)** Compute and discuss the bias and variance as function of the number of data points (choose a suitable polynomial degree to show something interesiting).\n"
"**f)** Compute and discuss the bias and variance as function of the number of data points (choose a suitable polynomial degree to show something interesting).\n"
]
},
{