small change to project text
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -2,7 +2,7 @@
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "b2cf4bdf",
|
||||
"id": "d8f7704f",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -14,7 +14,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "43316fd6",
|
||||
"id": "9e388b87",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -27,7 +27,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "1f8db1a6",
|
||||
"id": "80d7df2a",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -45,7 +45,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "41067a3c",
|
||||
"id": "80e18e80",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -57,7 +57,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "68997f6b",
|
||||
"id": "3a74059f",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -76,7 +76,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "f7e45184",
|
||||
"id": "1f92f219",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -88,7 +88,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "4c15509e",
|
||||
"id": "416cd63a",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -97,13 +97,12 @@
|
||||
"\n",
|
||||
"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.\n",
|
||||
"\n",
|
||||
"That is, show that"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "046ec084",
|
||||
"id": "d65d4905",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -115,7 +114,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "b2cc33db",
|
||||
"id": "d102dec2",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -125,7 +124,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "7ab1bc0e",
|
||||
"id": "869dc9d9",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -137,7 +136,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "a8da71db",
|
||||
"id": "fee09cce",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -147,26 +146,23 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "b74aa5e4",
|
||||
"id": "b6fb6522",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"$$\n",
|
||||
"\\mathrm{var}[\\tilde{y}]=\\frac{1}{n}\\sum_i(\\tilde{y}_i-\\mathbb{E}\\left[\\boldsymbol{\\tilde{y}}\\right])^2.\n",
|
||||
"\\mathrm{var}[\\tilde{y}]=\\mathbb{E}\\left[\\left(\\tilde{\\boldsymbol{y}}-\\mathbb{E}\\left[\\boldsymbol{\\tilde{y}}\\right]\\right)^2\\right]=\\frac{1}{n}\\sum_i(\\tilde{y}_i-\\mathbb{E}\\left[\\boldsymbol{\\tilde{y}}\\right])^2.\n",
|
||||
"$$"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "de559d80",
|
||||
"id": "6fa010b9",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"The answer to this exercise should be included in the theory part of the report. This exercise is also part of the weekly exercises of week 37.\n",
|
||||
"Explain what the terms mean and discuss their interpretations.\n",
|
||||
"\n",
|
||||
"Explain what the terms mean and discuss their interpretations.\n",
|
||||
"\n",
|
||||
"Perform then a bias-variance analysis of a simple one-dimensional (or other models of your choice) function by\n",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "7424fea1",
|
||||
"id": "ee871b85",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -14,7 +14,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "c9ca1d90",
|
||||
"id": "de647a13",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -27,7 +27,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "3e4164b6",
|
||||
"id": "f0094ea8",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -63,7 +63,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "dd4dcdf5",
|
||||
"id": "9d47e07f",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -85,7 +85,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "71ddc478",
|
||||
"id": "13b3c63c",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -100,7 +100,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "d4184afb",
|
||||
"id": "588eb391",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -133,7 +133,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"id": "62880fe6",
|
||||
"id": "2b565e88",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
@@ -185,7 +185,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "6f7e7c97",
|
||||
"id": "5a80d8fa",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -207,7 +207,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "7377112f",
|
||||
"id": "2b8a75d3",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -220,7 +220,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "72f83fe7",
|
||||
"id": "de8e68ca",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -232,7 +232,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "7a3578ff",
|
||||
"id": "70a2795e",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -244,7 +244,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "e0aef819",
|
||||
"id": "07d74c94",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -254,7 +254,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "c7f751af",
|
||||
"id": "cb7a1688",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -266,7 +266,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "c026a4bd",
|
||||
"id": "0c273378",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -295,7 +295,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "2635bcbd",
|
||||
"id": "b6aa07e9",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -313,7 +313,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "92892df2",
|
||||
"id": "4c297a7f",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -330,7 +330,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "35987aab",
|
||||
"id": "9b65abbd",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -346,7 +346,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "e61048c2",
|
||||
"id": "9f2c97bc",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -358,7 +358,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "5ef456d4",
|
||||
"id": "1390caea",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -369,7 +369,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "52e6fbad",
|
||||
"id": "757a87d4",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -381,7 +381,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "db6028a0",
|
||||
"id": "cf182a2a",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -393,7 +393,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "9477ad5e",
|
||||
"id": "c7f15f3d",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -405,7 +405,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "8c2aeccd",
|
||||
"id": "70c8c4e9",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -416,7 +416,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "6a774b74",
|
||||
"id": "3879a5b4",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -428,7 +428,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "98fde9b7",
|
||||
"id": "17191387",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -441,7 +441,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "87a4d11d",
|
||||
"id": "a7e3a698",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -453,7 +453,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "b4844f1e",
|
||||
"id": "93fc4a12",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -463,7 +463,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "f7662ade",
|
||||
"id": "85d336ad",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -475,7 +475,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "1d61362e",
|
||||
"id": "869ed780",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -486,7 +486,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "74bbb4ab",
|
||||
"id": "88502fe8",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -519,7 +519,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "ac939724",
|
||||
"id": "db4583da",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -531,7 +531,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "4066d012",
|
||||
"id": "da3a0dfc",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -550,7 +550,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "7e5c5ef4",
|
||||
"id": "07b53a45",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -562,7 +562,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "690337b9",
|
||||
"id": "1d8bc8d4",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -576,7 +576,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "92dabf3c",
|
||||
"id": "7f06bfd3",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -588,7 +588,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "7da90966",
|
||||
"id": "5624047e",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -598,7 +598,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "33a81d54",
|
||||
"id": "1b26ef35",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -610,7 +610,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "abb9bd28",
|
||||
"id": "6319fcec",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -620,24 +620,24 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "5b4668fd",
|
||||
"id": "2253bb98",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"$$\n",
|
||||
"\\mathrm{var}[\\tilde{y}]=\\frac{1}{n}\\sum_i(\\tilde{y}_i-\\mathbb{E}\\left[\\boldsymbol{\\tilde{y}}\\right])^2.\n",
|
||||
"\\mathrm{var}[\\tilde{y}]=\\mathbb{E}\\left[\\left(\\tilde{\\boldsymbol{y}}-\\mathbb{E}\\left[\\boldsymbol{\\tilde{y}}\\right]\\right)^2\\right]=\\frac{1}{n}\\sum_i(\\tilde{y}_i-\\mathbb{E}\\left[\\boldsymbol{\\tilde{y}}\\right])^2.\n",
|
||||
"$$"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "b453f8fc",
|
||||
"id": "d08baf03",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"The answer to this exercise should be included in the theory part of the report. This exercise is also part of the weekly exercises of week 37.\n",
|
||||
"The answer to this exercise should be included in the theory part of the report. This exercise is also part of the weekly exercises of week 38.\n",
|
||||
"Explain what the terms mean and discuss their interpretations.\n",
|
||||
"\n",
|
||||
"Perform then a bias-variance analysis of the Franke function by\n",
|
||||
@@ -651,7 +651,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "6fe323b0",
|
||||
"id": "d06c2f80",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -676,7 +676,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "5fd2f486",
|
||||
"id": "2a957aee",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -704,7 +704,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"id": "e88e39ea",
|
||||
"id": "1c0d6323",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
@@ -716,7 +716,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "29817da1",
|
||||
"id": "183f2666",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -728,7 +728,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"id": "560fc9f4",
|
||||
"id": "3ccf3ab9",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
@@ -754,7 +754,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "3fc05383",
|
||||
"id": "cf6cdda9",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -779,7 +779,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "bb21261e",
|
||||
"id": "f28a3bdf",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -793,7 +793,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "c5ab9dbf",
|
||||
"id": "ed920879",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -823,7 +823,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "7d0dbb14",
|
||||
"id": "f2bef519",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -845,7 +845,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "e301049d",
|
||||
"id": "e1891d3f",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
|
||||
@@ -451,8 +451,8 @@ C(\boldsymbol{X},\boldsymbol{\beta}) =\frac{1}{n}\sum_{i=0}^{n-1}(y_i-\tilde{y}_
|
||||
\]</div>
|
||||
<p>Here the expected value <span class="math notranslate nohighlight">\(\mathbb{E}\)</span> is the sample value.</p>
|
||||
<p>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
|
||||
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.</p>
|
||||
<p>That is, show that</p>
|
||||
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.
|
||||
That is, show that</p>
|
||||
<div class="math notranslate nohighlight">
|
||||
\[
|
||||
\mathbb{E}\left[(\boldsymbol{y}-\boldsymbol{\tilde{y}})^2\right]=\mathrm{Bias}[y]+\mathrm{var}[\tilde{y}]+\sigma^2,
|
||||
@@ -465,10 +465,8 @@ term which measures the deviation from the true data and the mean value of the m
|
||||
<p>and</p>
|
||||
<div class="math notranslate nohighlight">
|
||||
\[
|
||||
\mathrm{var}[\tilde{y}]=\frac{1}{n}\sum_i(\tilde{y}_i-\mathbb{E}\left[\boldsymbol{\tilde{y}}\right])^2.
|
||||
\mathrm{var}[\tilde{y}]=\mathbb{E}\left[\left(\tilde{\boldsymbol{y}}-\mathbb{E}\left[\boldsymbol{\tilde{y}}\right]\right)^2\right]=\frac{1}{n}\sum_i(\tilde{y}_i-\mathbb{E}\left[\boldsymbol{\tilde{y}}\right])^2.
|
||||
\]</div>
|
||||
<p>The answer to this exercise should be included in the theory part of the report. This exercise is also part of the weekly exercises of week 37.
|
||||
Explain what the terms mean and discuss their interpretations.</p>
|
||||
<p>Explain what the terms mean and discuss their interpretations.</p>
|
||||
<p>Perform then a bias-variance analysis of a simple one-dimensional (or other models of your choice) function by
|
||||
studying the MSE value as function of the complexity of your model. Use ordinary least squares only.</p>
|
||||
|
||||
@@ -659,7 +659,7 @@ which polynomial fits the data best.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell_output docutils container">
|
||||
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>/var/folders/td/3yk470mj5p931p9dtkk0y6jw0000gn/T/ipykernel_20604/39730396.py:11: MatplotlibDeprecationWarning: Calling gca() with keyword arguments was deprecated in Matplotlib 3.4. Starting two minor releases later, gca() will take no keyword arguments. The gca() function should only be used to get the current axes, or if no axes exist, create new axes with default keyword arguments. To create a new axes with non-default arguments, use plt.axes() or plt.subplot().
|
||||
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>/var/folders/td/3yk470mj5p931p9dtkk0y6jw0000gn/T/ipykernel_21682/39730396.py:11: MatplotlibDeprecationWarning: Calling gca() with keyword arguments was deprecated in Matplotlib 3.4. Starting two minor releases later, gca() will take no keyword arguments. The gca() function should only be used to get the current axes, or if no axes exist, create new axes with default keyword arguments. To create a new axes with non-default arguments, use plt.axes() or plt.subplot().
|
||||
ax = fig.gca(projection='3d')
|
||||
</pre></div>
|
||||
</div>
|
||||
@@ -825,9 +825,9 @@ That is, show that</p>
|
||||
<p>and</p>
|
||||
<div class="math notranslate nohighlight">
|
||||
\[
|
||||
\mathrm{var}[\tilde{y}]=\frac{1}{n}\sum_i(\tilde{y}_i-\mathbb{E}\left[\boldsymbol{\tilde{y}}\right])^2.
|
||||
\mathrm{var}[\tilde{y}]=\mathbb{E}\left[\left(\tilde{\boldsymbol{y}}-\mathbb{E}\left[\boldsymbol{\tilde{y}}\right]\right)^2\right]=\frac{1}{n}\sum_i(\tilde{y}_i-\mathbb{E}\left[\boldsymbol{\tilde{y}}\right])^2.
|
||||
\]</div>
|
||||
<p>The answer to this exercise should be included in the theory part of the report. This exercise is also part of the weekly exercises of week 37.
|
||||
<p>The answer to this exercise should be included in the theory part of the report. This exercise is also part of the weekly exercises of week 38.
|
||||
Explain what the terms mean and discuss their interpretations.</p>
|
||||
<p>Perform then a bias-variance analysis of the Franke function by
|
||||
studying the MSE value as function of the complexity of your model.</p>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -2,7 +2,7 @@
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "b2cf4bdf",
|
||||
"id": "d8f7704f",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -14,7 +14,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "43316fd6",
|
||||
"id": "9e388b87",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -27,7 +27,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "1f8db1a6",
|
||||
"id": "80d7df2a",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -45,7 +45,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "41067a3c",
|
||||
"id": "80e18e80",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -57,7 +57,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "68997f6b",
|
||||
"id": "3a74059f",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -76,7 +76,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "f7e45184",
|
||||
"id": "1f92f219",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -88,7 +88,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "4c15509e",
|
||||
"id": "416cd63a",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -97,13 +97,12 @@
|
||||
"\n",
|
||||
"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.\n",
|
||||
"\n",
|
||||
"That is, show that"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "046ec084",
|
||||
"id": "d65d4905",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -115,7 +114,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "b2cc33db",
|
||||
"id": "d102dec2",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -125,7 +124,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "7ab1bc0e",
|
||||
"id": "869dc9d9",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -137,7 +136,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "a8da71db",
|
||||
"id": "fee09cce",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -147,26 +146,23 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "b74aa5e4",
|
||||
"id": "b6fb6522",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"$$\n",
|
||||
"\\mathrm{var}[\\tilde{y}]=\\frac{1}{n}\\sum_i(\\tilde{y}_i-\\mathbb{E}\\left[\\boldsymbol{\\tilde{y}}\\right])^2.\n",
|
||||
"\\mathrm{var}[\\tilde{y}]=\\mathbb{E}\\left[\\left(\\tilde{\\boldsymbol{y}}-\\mathbb{E}\\left[\\boldsymbol{\\tilde{y}}\\right]\\right)^2\\right]=\\frac{1}{n}\\sum_i(\\tilde{y}_i-\\mathbb{E}\\left[\\boldsymbol{\\tilde{y}}\\right])^2.\n",
|
||||
"$$"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "de559d80",
|
||||
"id": "6fa010b9",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"The answer to this exercise should be included in the theory part of the report. This exercise is also part of the weekly exercises of week 37.\n",
|
||||
"Explain what the terms mean and discuss their interpretations.\n",
|
||||
"\n",
|
||||
"Explain what the terms mean and discuss their interpretations.\n",
|
||||
"\n",
|
||||
"Perform then a bias-variance analysis of a simple one-dimensional (or other models of your choice) function by\n",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "7424fea1",
|
||||
"id": "ee871b85",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -14,7 +14,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "c9ca1d90",
|
||||
"id": "de647a13",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -27,7 +27,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "3e4164b6",
|
||||
"id": "f0094ea8",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -63,7 +63,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "dd4dcdf5",
|
||||
"id": "9d47e07f",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -85,7 +85,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "71ddc478",
|
||||
"id": "13b3c63c",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -100,7 +100,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "d4184afb",
|
||||
"id": "588eb391",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -133,7 +133,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"id": "62880fe6",
|
||||
"id": "2b565e88",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
@@ -143,7 +143,7 @@
|
||||
"name": "stderr",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"/var/folders/td/3yk470mj5p931p9dtkk0y6jw0000gn/T/ipykernel_20604/39730396.py:11: MatplotlibDeprecationWarning: Calling gca() with keyword arguments was deprecated in Matplotlib 3.4. Starting two minor releases later, gca() will take no keyword arguments. The gca() function should only be used to get the current axes, or if no axes exist, create new axes with default keyword arguments. To create a new axes with non-default arguments, use plt.axes() or plt.subplot().\n",
|
||||
"/var/folders/td/3yk470mj5p931p9dtkk0y6jw0000gn/T/ipykernel_21682/39730396.py:11: MatplotlibDeprecationWarning: Calling gca() with keyword arguments was deprecated in Matplotlib 3.4. Starting two minor releases later, gca() will take no keyword arguments. The gca() function should only be used to get the current axes, or if no axes exist, create new axes with default keyword arguments. To create a new axes with non-default arguments, use plt.axes() or plt.subplot().\n",
|
||||
" ax = fig.gca(projection='3d')\n"
|
||||
]
|
||||
},
|
||||
@@ -208,7 +208,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "6f7e7c97",
|
||||
"id": "5a80d8fa",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -230,7 +230,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "7377112f",
|
||||
"id": "2b8a75d3",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -243,7 +243,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "72f83fe7",
|
||||
"id": "de8e68ca",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -255,7 +255,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "7a3578ff",
|
||||
"id": "70a2795e",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -267,7 +267,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "e0aef819",
|
||||
"id": "07d74c94",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -277,7 +277,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "c7f751af",
|
||||
"id": "cb7a1688",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -289,7 +289,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "c026a4bd",
|
||||
"id": "0c273378",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -318,7 +318,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "2635bcbd",
|
||||
"id": "b6aa07e9",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -336,7 +336,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "92892df2",
|
||||
"id": "4c297a7f",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -353,7 +353,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "35987aab",
|
||||
"id": "9b65abbd",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -369,7 +369,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "e61048c2",
|
||||
"id": "9f2c97bc",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -381,7 +381,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "5ef456d4",
|
||||
"id": "1390caea",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -392,7 +392,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "52e6fbad",
|
||||
"id": "757a87d4",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -404,7 +404,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "db6028a0",
|
||||
"id": "cf182a2a",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -416,7 +416,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "9477ad5e",
|
||||
"id": "c7f15f3d",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -428,7 +428,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "8c2aeccd",
|
||||
"id": "70c8c4e9",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -439,7 +439,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "6a774b74",
|
||||
"id": "3879a5b4",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -451,7 +451,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "98fde9b7",
|
||||
"id": "17191387",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -464,7 +464,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "87a4d11d",
|
||||
"id": "a7e3a698",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -476,7 +476,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "b4844f1e",
|
||||
"id": "93fc4a12",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -486,7 +486,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "f7662ade",
|
||||
"id": "85d336ad",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -498,7 +498,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "1d61362e",
|
||||
"id": "869ed780",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -509,7 +509,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "74bbb4ab",
|
||||
"id": "88502fe8",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -542,7 +542,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "ac939724",
|
||||
"id": "db4583da",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -554,7 +554,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "4066d012",
|
||||
"id": "da3a0dfc",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -573,7 +573,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "7e5c5ef4",
|
||||
"id": "07b53a45",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -585,7 +585,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "690337b9",
|
||||
"id": "1d8bc8d4",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -599,7 +599,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "92dabf3c",
|
||||
"id": "7f06bfd3",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -611,7 +611,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "7da90966",
|
||||
"id": "5624047e",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -621,7 +621,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "33a81d54",
|
||||
"id": "1b26ef35",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -633,7 +633,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "abb9bd28",
|
||||
"id": "6319fcec",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -643,24 +643,24 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "5b4668fd",
|
||||
"id": "2253bb98",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"$$\n",
|
||||
"\\mathrm{var}[\\tilde{y}]=\\frac{1}{n}\\sum_i(\\tilde{y}_i-\\mathbb{E}\\left[\\boldsymbol{\\tilde{y}}\\right])^2.\n",
|
||||
"\\mathrm{var}[\\tilde{y}]=\\mathbb{E}\\left[\\left(\\tilde{\\boldsymbol{y}}-\\mathbb{E}\\left[\\boldsymbol{\\tilde{y}}\\right]\\right)^2\\right]=\\frac{1}{n}\\sum_i(\\tilde{y}_i-\\mathbb{E}\\left[\\boldsymbol{\\tilde{y}}\\right])^2.\n",
|
||||
"$$"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "b453f8fc",
|
||||
"id": "d08baf03",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"The answer to this exercise should be included in the theory part of the report. This exercise is also part of the weekly exercises of week 37.\n",
|
||||
"The answer to this exercise should be included in the theory part of the report. This exercise is also part of the weekly exercises of week 38.\n",
|
||||
"Explain what the terms mean and discuss their interpretations.\n",
|
||||
"\n",
|
||||
"Perform then a bias-variance analysis of the Franke function by\n",
|
||||
@@ -674,7 +674,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "6fe323b0",
|
||||
"id": "d06c2f80",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -699,7 +699,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "5fd2f486",
|
||||
"id": "2a957aee",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -727,7 +727,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"id": "e88e39ea",
|
||||
"id": "1c0d6323",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
@@ -751,7 +751,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "29817da1",
|
||||
"id": "183f2666",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -763,7 +763,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"id": "560fc9f4",
|
||||
"id": "3ccf3ab9",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
@@ -789,7 +789,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "3fc05383",
|
||||
"id": "cf6cdda9",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -814,7 +814,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "bb21261e",
|
||||
"id": "f28a3bdf",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -828,7 +828,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "c5ab9dbf",
|
||||
"id": "ed920879",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -858,7 +858,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "7d0dbb14",
|
||||
"id": "f2bef519",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -880,7 +880,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "e301049d",
|
||||
"id": "e1891d3f",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
|
||||
@@ -317,10 +317,10 @@ plt.show()
|
||||
# and
|
||||
|
||||
# $$
|
||||
# \mathrm{var}[\tilde{y}]=\frac{1}{n}\sum_i(\tilde{y}_i-\mathbb{E}\left[\boldsymbol{\tilde{y}}\right])^2.
|
||||
# \mathrm{var}[\tilde{y}]=\mathbb{E}\left[\left(\tilde{\boldsymbol{y}}-\mathbb{E}\left[\boldsymbol{\tilde{y}}\right]\right)^2\right]=\frac{1}{n}\sum_i(\tilde{y}_i-\mathbb{E}\left[\boldsymbol{\tilde{y}}\right])^2.
|
||||
# $$
|
||||
|
||||
# The answer to this exercise should be included in the theory part of the report. This exercise is also part of the weekly exercises of week 37.
|
||||
# The answer to this exercise should be included in the theory part of the report. This exercise is also part of the weekly exercises of week 38.
|
||||
# Explain what the terms mean and discuss their interpretations.
|
||||
#
|
||||
# Perform then a bias-variance analysis of the Franke function by
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "b2cf4bdf",
|
||||
"id": "d8f7704f",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -14,7 +14,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "43316fd6",
|
||||
"id": "9e388b87",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -27,7 +27,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "1f8db1a6",
|
||||
"id": "80d7df2a",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -45,7 +45,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "41067a3c",
|
||||
"id": "80e18e80",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -57,7 +57,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "68997f6b",
|
||||
"id": "3a74059f",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -76,7 +76,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "f7e45184",
|
||||
"id": "1f92f219",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -88,7 +88,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "4c15509e",
|
||||
"id": "416cd63a",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -97,13 +97,12 @@
|
||||
"\n",
|
||||
"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.\n",
|
||||
"\n",
|
||||
"That is, show that"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "046ec084",
|
||||
"id": "d65d4905",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -115,7 +114,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "b2cc33db",
|
||||
"id": "d102dec2",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -125,7 +124,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "7ab1bc0e",
|
||||
"id": "869dc9d9",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -137,7 +136,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "a8da71db",
|
||||
"id": "fee09cce",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -147,26 +146,23 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "b74aa5e4",
|
||||
"id": "b6fb6522",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"$$\n",
|
||||
"\\mathrm{var}[\\tilde{y}]=\\frac{1}{n}\\sum_i(\\tilde{y}_i-\\mathbb{E}\\left[\\boldsymbol{\\tilde{y}}\\right])^2.\n",
|
||||
"\\mathrm{var}[\\tilde{y}]=\\mathbb{E}\\left[\\left(\\tilde{\\boldsymbol{y}}-\\mathbb{E}\\left[\\boldsymbol{\\tilde{y}}\\right]\\right)^2\\right]=\\frac{1}{n}\\sum_i(\\tilde{y}_i-\\mathbb{E}\\left[\\boldsymbol{\\tilde{y}}\\right])^2.\n",
|
||||
"$$"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "de559d80",
|
||||
"id": "6fa010b9",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"The answer to this exercise should be included in the theory part of the report. This exercise is also part of the weekly exercises of week 37.\n",
|
||||
"Explain what the terms mean and discuss their interpretations.\n",
|
||||
"\n",
|
||||
"Explain what the terms mean and discuss their interpretations.\n",
|
||||
"\n",
|
||||
"Perform then a bias-variance analysis of a simple one-dimensional (or other models of your choice) function by\n",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "7424fea1",
|
||||
"id": "ee871b85",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -14,7 +14,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "c9ca1d90",
|
||||
"id": "de647a13",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -27,7 +27,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "3e4164b6",
|
||||
"id": "f0094ea8",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -63,7 +63,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "dd4dcdf5",
|
||||
"id": "9d47e07f",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -85,7 +85,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "71ddc478",
|
||||
"id": "13b3c63c",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -100,7 +100,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "d4184afb",
|
||||
"id": "588eb391",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -133,7 +133,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"id": "62880fe6",
|
||||
"id": "2b565e88",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
@@ -185,7 +185,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "6f7e7c97",
|
||||
"id": "5a80d8fa",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -207,7 +207,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "7377112f",
|
||||
"id": "2b8a75d3",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -220,7 +220,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "72f83fe7",
|
||||
"id": "de8e68ca",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -232,7 +232,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "7a3578ff",
|
||||
"id": "70a2795e",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -244,7 +244,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "e0aef819",
|
||||
"id": "07d74c94",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -254,7 +254,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "c7f751af",
|
||||
"id": "cb7a1688",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -266,7 +266,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "c026a4bd",
|
||||
"id": "0c273378",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -295,7 +295,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "2635bcbd",
|
||||
"id": "b6aa07e9",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -313,7 +313,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "92892df2",
|
||||
"id": "4c297a7f",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -330,7 +330,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "35987aab",
|
||||
"id": "9b65abbd",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -346,7 +346,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "e61048c2",
|
||||
"id": "9f2c97bc",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -358,7 +358,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "5ef456d4",
|
||||
"id": "1390caea",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -369,7 +369,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "52e6fbad",
|
||||
"id": "757a87d4",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -381,7 +381,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "db6028a0",
|
||||
"id": "cf182a2a",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -393,7 +393,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "9477ad5e",
|
||||
"id": "c7f15f3d",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -405,7 +405,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "8c2aeccd",
|
||||
"id": "70c8c4e9",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -416,7 +416,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "6a774b74",
|
||||
"id": "3879a5b4",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -428,7 +428,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "98fde9b7",
|
||||
"id": "17191387",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -441,7 +441,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "87a4d11d",
|
||||
"id": "a7e3a698",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -453,7 +453,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "b4844f1e",
|
||||
"id": "93fc4a12",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -463,7 +463,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "f7662ade",
|
||||
"id": "85d336ad",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -475,7 +475,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "1d61362e",
|
||||
"id": "869ed780",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -486,7 +486,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "74bbb4ab",
|
||||
"id": "88502fe8",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -519,7 +519,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "ac939724",
|
||||
"id": "db4583da",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -531,7 +531,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "4066d012",
|
||||
"id": "da3a0dfc",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -550,7 +550,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "7e5c5ef4",
|
||||
"id": "07b53a45",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -562,7 +562,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "690337b9",
|
||||
"id": "1d8bc8d4",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -576,7 +576,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "92dabf3c",
|
||||
"id": "7f06bfd3",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -588,7 +588,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "7da90966",
|
||||
"id": "5624047e",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -598,7 +598,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "33a81d54",
|
||||
"id": "1b26ef35",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -610,7 +610,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "abb9bd28",
|
||||
"id": "6319fcec",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -620,24 +620,24 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "5b4668fd",
|
||||
"id": "2253bb98",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"$$\n",
|
||||
"\\mathrm{var}[\\tilde{y}]=\\frac{1}{n}\\sum_i(\\tilde{y}_i-\\mathbb{E}\\left[\\boldsymbol{\\tilde{y}}\\right])^2.\n",
|
||||
"\\mathrm{var}[\\tilde{y}]=\\mathbb{E}\\left[\\left(\\tilde{\\boldsymbol{y}}-\\mathbb{E}\\left[\\boldsymbol{\\tilde{y}}\\right]\\right)^2\\right]=\\frac{1}{n}\\sum_i(\\tilde{y}_i-\\mathbb{E}\\left[\\boldsymbol{\\tilde{y}}\\right])^2.\n",
|
||||
"$$"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "b453f8fc",
|
||||
"id": "d08baf03",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
"source": [
|
||||
"The answer to this exercise should be included in the theory part of the report. This exercise is also part of the weekly exercises of week 37.\n",
|
||||
"The answer to this exercise should be included in the theory part of the report. This exercise is also part of the weekly exercises of week 38.\n",
|
||||
"Explain what the terms mean and discuss their interpretations.\n",
|
||||
"\n",
|
||||
"Perform then a bias-variance analysis of the Franke function by\n",
|
||||
@@ -651,7 +651,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "6fe323b0",
|
||||
"id": "d06c2f80",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -676,7 +676,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "5fd2f486",
|
||||
"id": "2a957aee",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -704,7 +704,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"id": "e88e39ea",
|
||||
"id": "1c0d6323",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
@@ -716,7 +716,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "29817da1",
|
||||
"id": "183f2666",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -728,7 +728,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"id": "560fc9f4",
|
||||
"id": "3ccf3ab9",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
@@ -754,7 +754,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "3fc05383",
|
||||
"id": "cf6cdda9",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -779,7 +779,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "bb21261e",
|
||||
"id": "f28a3bdf",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -793,7 +793,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "c5ab9dbf",
|
||||
"id": "ed920879",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -823,7 +823,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "7d0dbb14",
|
||||
"id": "f2bef519",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -845,7 +845,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "e301049d",
|
||||
"id": "e1891d3f",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user