fixed w38 4a error
This commit is contained in:
@@ -290,7 +290,8 @@
|
||||
"$$\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",
|
||||
"$$\n",
|
||||
"In order to arrive at the equation for the bias, we have to approximate the unknown function $f$ with the output/target values $y$."
|
||||
"\n",
|
||||
"In order to arrive at the equation for the bias, we have to approximate the unknown function $f$ with the output/target values $y$.\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -321,7 +322,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 67,
|
||||
"execution_count": null,
|
||||
"id": "b5bf581c",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
@@ -332,7 +333,8 @@
|
||||
"bootstraps = 1000\n",
|
||||
"\n",
|
||||
"predictions = np.random.rand(bootstraps, n) * 10 + 10\n",
|
||||
"targets = np.random.rand(bootstraps, n)\n",
|
||||
"# The definition of targets has been updated, and was wrong earlier in the week.\n",
|
||||
"targets = np.random.rand(1, n)\n",
|
||||
"\n",
|
||||
"mse = ...\n",
|
||||
"bias = ...\n",
|
||||
|
||||
Reference in New Issue
Block a user