This commit is contained in:
Morten Hjorth-Jensen
2025-09-14 20:37:49 +02:00
parent c1a07a1b9f
commit fcbe09a20d
7 changed files with 135 additions and 135 deletions
+2 -2
View File
@@ -256,12 +256,12 @@ MathJax.Hub.Config({
<p>We could now define a new cost function to minimize, namely the negative logarithm of the above PDF</p>
$$
C(\boldsymbol{\theta}=-\log{\prod_{i=0}^{n-1}p(y_i,\boldsymbol{X}\vert\boldsymbol{\theta})}=-\sum_{i=0}^{n-1}\log{p(y_i,\boldsymbol{X}\vert\boldsymbol{\theta})},
C(\boldsymbol{\theta})=-\log{\prod_{i=0}^{n-1}p(y_i,\boldsymbol{X}\vert\boldsymbol{\theta})}=-\sum_{i=0}^{n-1}\log{p(y_i,\boldsymbol{X}\vert\boldsymbol{\theta})},
$$
<p>which becomes</p>
$$
C(\boldsymbol{\theta}=\frac{n}{2}\log{2\pi\sigma^2}+\frac{\vert\vert (\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\theta})\vert\vert_2^2}{2\sigma^2}.
C(\boldsymbol{\theta})=\frac{n}{2}\log{2\pi\sigma^2}+\frac{\vert\vert (\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\theta})\vert\vert_2^2}{2\sigma^2}.
$$
<p>Taking the derivative of the <em>new</em> cost function with respect to the parameters \( \theta \) we recognize our familiar OLS equation, namely</p>
+2 -2
View File
@@ -526,14 +526,14 @@ is equivalent to the maximization/minimization of the function itself.
<p>&nbsp;<br>
$$
C(\boldsymbol{\theta}=-\log{\prod_{i=0}^{n-1}p(y_i,\boldsymbol{X}\vert\boldsymbol{\theta})}=-\sum_{i=0}^{n-1}\log{p(y_i,\boldsymbol{X}\vert\boldsymbol{\theta})},
C(\boldsymbol{\theta})=-\log{\prod_{i=0}^{n-1}p(y_i,\boldsymbol{X}\vert\boldsymbol{\theta})}=-\sum_{i=0}^{n-1}\log{p(y_i,\boldsymbol{X}\vert\boldsymbol{\theta})},
$$
<p>&nbsp;<br>
<p>which becomes</p>
<p>&nbsp;<br>
$$
C(\boldsymbol{\theta}=\frac{n}{2}\log{2\pi\sigma^2}+\frac{\vert\vert (\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\theta})\vert\vert_2^2}{2\sigma^2}.
C(\boldsymbol{\theta})=\frac{n}{2}\log{2\pi\sigma^2}+\frac{\vert\vert (\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\theta})\vert\vert_2^2}{2\sigma^2}.
$$
<p>&nbsp;<br>
+2 -2
View File
@@ -527,12 +527,12 @@ is equivalent to the maximization/minimization of the function itself.
<p>We could now define a new cost function to minimize, namely the negative logarithm of the above PDF</p>
$$
C(\boldsymbol{\theta}=-\log{\prod_{i=0}^{n-1}p(y_i,\boldsymbol{X}\vert\boldsymbol{\theta})}=-\sum_{i=0}^{n-1}\log{p(y_i,\boldsymbol{X}\vert\boldsymbol{\theta})},
C(\boldsymbol{\theta})=-\log{\prod_{i=0}^{n-1}p(y_i,\boldsymbol{X}\vert\boldsymbol{\theta})}=-\sum_{i=0}^{n-1}\log{p(y_i,\boldsymbol{X}\vert\boldsymbol{\theta})},
$$
<p>which becomes</p>
$$
C(\boldsymbol{\theta}=\frac{n}{2}\log{2\pi\sigma^2}+\frac{\vert\vert (\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\theta})\vert\vert_2^2}{2\sigma^2}.
C(\boldsymbol{\theta})=\frac{n}{2}\log{2\pi\sigma^2}+\frac{\vert\vert (\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\theta})\vert\vert_2^2}{2\sigma^2}.
$$
<p>Taking the derivative of the <em>new</em> cost function with respect to the parameters \( \theta \) we recognize our familiar OLS equation, namely</p>
+2 -2
View File
@@ -604,12 +604,12 @@ is equivalent to the maximization/minimization of the function itself.
<p>We could now define a new cost function to minimize, namely the negative logarithm of the above PDF</p>
$$
C(\boldsymbol{\theta}=-\log{\prod_{i=0}^{n-1}p(y_i,\boldsymbol{X}\vert\boldsymbol{\theta})}=-\sum_{i=0}^{n-1}\log{p(y_i,\boldsymbol{X}\vert\boldsymbol{\theta})},
C(\boldsymbol{\theta})=-\log{\prod_{i=0}^{n-1}p(y_i,\boldsymbol{X}\vert\boldsymbol{\theta})}=-\sum_{i=0}^{n-1}\log{p(y_i,\boldsymbol{X}\vert\boldsymbol{\theta})},
$$
<p>which becomes</p>
$$
C(\boldsymbol{\theta}=\frac{n}{2}\log{2\pi\sigma^2}+\frac{\vert\vert (\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\theta})\vert\vert_2^2}{2\sigma^2}.
C(\boldsymbol{\theta})=\frac{n}{2}\log{2\pi\sigma^2}+\frac{\vert\vert (\boldsymbol{y}-\boldsymbol{X}\boldsymbol{\theta})\vert\vert_2^2}{2\sigma^2}.
$$
<p>Taking the derivative of the <em>new</em> cost function with respect to the parameters \( \theta \) we recognize our familiar OLS equation, namely</p>
Binary file not shown.
+125 -125
View File
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "169923b3",
"id": "799137cd",
"metadata": {
"editable": true
},
@@ -14,7 +14,7 @@
},
{
"cell_type": "markdown",
"id": "47013ee7",
"id": "f5b17715",
"metadata": {
"editable": true
},
@@ -27,7 +27,7 @@
},
{
"cell_type": "markdown",
"id": "d1fb5464",
"id": "cc859721",
"metadata": {
"editable": true
},
@@ -47,7 +47,7 @@
},
{
"cell_type": "markdown",
"id": "1a34a7ce",
"id": "a3ecb019",
"metadata": {
"editable": true
},
@@ -68,7 +68,7 @@
},
{
"cell_type": "markdown",
"id": "c6f56f83",
"id": "f128464d",
"metadata": {
"editable": true
},
@@ -96,7 +96,7 @@
},
{
"cell_type": "markdown",
"id": "3ece0c04",
"id": "981db0b8",
"metadata": {
"editable": true
},
@@ -112,7 +112,7 @@
},
{
"cell_type": "markdown",
"id": "d36cf6db",
"id": "85cc8db5",
"metadata": {
"editable": true
},
@@ -131,7 +131,7 @@
},
{
"cell_type": "markdown",
"id": "5903d2be",
"id": "96a431a6",
"metadata": {
"editable": true
},
@@ -145,7 +145,7 @@
},
{
"cell_type": "markdown",
"id": "37f4e199",
"id": "b6bf35de",
"metadata": {
"editable": true
},
@@ -157,7 +157,7 @@
},
{
"cell_type": "markdown",
"id": "7a7b084f",
"id": "a4133715",
"metadata": {
"editable": true
},
@@ -168,7 +168,7 @@
},
{
"cell_type": "markdown",
"id": "1ec511a1",
"id": "9d8eea64",
"metadata": {
"editable": true
},
@@ -180,7 +180,7 @@
},
{
"cell_type": "markdown",
"id": "ffe76935",
"id": "0707109a",
"metadata": {
"editable": true
},
@@ -192,7 +192,7 @@
},
{
"cell_type": "markdown",
"id": "e569274a",
"id": "c84ee75e",
"metadata": {
"editable": true
},
@@ -208,7 +208,7 @@
},
{
"cell_type": "markdown",
"id": "c4dd2623",
"id": "eceb2fb1",
"metadata": {
"editable": true
},
@@ -219,7 +219,7 @@
},
{
"cell_type": "markdown",
"id": "df2f8936",
"id": "571c857b",
"metadata": {
"editable": true
},
@@ -242,7 +242,7 @@
},
{
"cell_type": "markdown",
"id": "0a3e5956",
"id": "fa94afa6",
"metadata": {
"editable": true
},
@@ -253,7 +253,7 @@
},
{
"cell_type": "markdown",
"id": "973e45a3",
"id": "ae5807fe",
"metadata": {
"editable": true
},
@@ -265,7 +265,7 @@
},
{
"cell_type": "markdown",
"id": "ff486d1e",
"id": "9b7dbfc6",
"metadata": {
"editable": true
},
@@ -277,7 +277,7 @@
},
{
"cell_type": "markdown",
"id": "e4307815",
"id": "a469ecb5",
"metadata": {
"editable": true
},
@@ -291,7 +291,7 @@
},
{
"cell_type": "markdown",
"id": "490b2cbf",
"id": "a22a5899",
"metadata": {
"editable": true
},
@@ -322,7 +322,7 @@
},
{
"cell_type": "markdown",
"id": "5d8dd6bc",
"id": "f7b64841",
"metadata": {
"editable": true
},
@@ -344,7 +344,7 @@
},
{
"cell_type": "markdown",
"id": "3594078a",
"id": "26d50d5c",
"metadata": {
"editable": true
},
@@ -356,7 +356,7 @@
},
{
"cell_type": "markdown",
"id": "43007b7a",
"id": "e2e18a10",
"metadata": {
"editable": true
},
@@ -369,7 +369,7 @@
},
{
"cell_type": "markdown",
"id": "3cd4e7da",
"id": "9a97e0bb",
"metadata": {
"editable": true
},
@@ -381,7 +381,7 @@
},
{
"cell_type": "markdown",
"id": "5816b21e",
"id": "53cef62d",
"metadata": {
"editable": true
},
@@ -393,7 +393,7 @@
},
{
"cell_type": "markdown",
"id": "b58b8607",
"id": "c8ec4ab0",
"metadata": {
"editable": true
},
@@ -405,7 +405,7 @@
},
{
"cell_type": "markdown",
"id": "c843db7f",
"id": "1e5e5e07",
"metadata": {
"editable": true
},
@@ -417,7 +417,7 @@
},
{
"cell_type": "markdown",
"id": "e81b1c39",
"id": "b1ea4ea7",
"metadata": {
"editable": true
},
@@ -440,7 +440,7 @@
},
{
"cell_type": "markdown",
"id": "ea9719e3",
"id": "d9c8dd38",
"metadata": {
"editable": true
},
@@ -452,7 +452,7 @@
},
{
"cell_type": "markdown",
"id": "c28b598f",
"id": "7abb690f",
"metadata": {
"editable": true
},
@@ -465,7 +465,7 @@
},
{
"cell_type": "markdown",
"id": "88063ed7",
"id": "417c8406",
"metadata": {
"editable": true
},
@@ -477,7 +477,7 @@
},
{
"cell_type": "markdown",
"id": "a34e4c28",
"id": "fb01419c",
"metadata": {
"editable": true
},
@@ -489,7 +489,7 @@
},
{
"cell_type": "markdown",
"id": "1fc7ae0a",
"id": "dbe14673",
"metadata": {
"editable": true
},
@@ -501,7 +501,7 @@
},
{
"cell_type": "markdown",
"id": "30d5a1be",
"id": "a19153fe",
"metadata": {
"editable": true
},
@@ -512,7 +512,7 @@
},
{
"cell_type": "markdown",
"id": "1d29fd29",
"id": "017ca4ca",
"metadata": {
"editable": true
},
@@ -524,7 +524,7 @@
},
{
"cell_type": "markdown",
"id": "289a116c",
"id": "85c7bc4a",
"metadata": {
"editable": true
},
@@ -535,7 +535,7 @@
},
{
"cell_type": "markdown",
"id": "d1cfbb56",
"id": "ad6066d5",
"metadata": {
"editable": true
},
@@ -547,7 +547,7 @@
},
{
"cell_type": "markdown",
"id": "e089fc0e",
"id": "7d9872d8",
"metadata": {
"editable": true
},
@@ -557,7 +557,7 @@
},
{
"cell_type": "markdown",
"id": "32cf9944",
"id": "e3973752",
"metadata": {
"editable": true
},
@@ -588,7 +588,7 @@
},
{
"cell_type": "markdown",
"id": "ee8a9544",
"id": "5adedf8a",
"metadata": {
"editable": true
},
@@ -600,19 +600,19 @@
},
{
"cell_type": "markdown",
"id": "4bfeb203",
"id": "23e01c9e",
"metadata": {
"editable": true
},
"source": [
"$$\n",
"C(\\boldsymbol{\\theta}=-\\log{\\prod_{i=0}^{n-1}p(y_i,\\boldsymbol{X}\\vert\\boldsymbol{\\theta})}=-\\sum_{i=0}^{n-1}\\log{p(y_i,\\boldsymbol{X}\\vert\\boldsymbol{\\theta})},\n",
"C(\\boldsymbol{\\theta})=-\\log{\\prod_{i=0}^{n-1}p(y_i,\\boldsymbol{X}\\vert\\boldsymbol{\\theta})}=-\\sum_{i=0}^{n-1}\\log{p(y_i,\\boldsymbol{X}\\vert\\boldsymbol{\\theta})},\n",
"$$"
]
},
{
"cell_type": "markdown",
"id": "256143f9",
"id": "94cc3cc3",
"metadata": {
"editable": true
},
@@ -622,19 +622,19 @@
},
{
"cell_type": "markdown",
"id": "60d75bb1",
"id": "0e3f94c9",
"metadata": {
"editable": true
},
"source": [
"$$\n",
"C(\\boldsymbol{\\theta}=\\frac{n}{2}\\log{2\\pi\\sigma^2}+\\frac{\\vert\\vert (\\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\theta})\\vert\\vert_2^2}{2\\sigma^2}.\n",
"C(\\boldsymbol{\\theta})=\\frac{n}{2}\\log{2\\pi\\sigma^2}+\\frac{\\vert\\vert (\\boldsymbol{y}-\\boldsymbol{X}\\boldsymbol{\\theta})\\vert\\vert_2^2}{2\\sigma^2}.\n",
"$$"
]
},
{
"cell_type": "markdown",
"id": "7b111014",
"id": "b8dcd25e",
"metadata": {
"editable": true
},
@@ -644,7 +644,7 @@
},
{
"cell_type": "markdown",
"id": "0f42a0b5",
"id": "9140542c",
"metadata": {
"editable": true
},
@@ -656,7 +656,7 @@
},
{
"cell_type": "markdown",
"id": "39a9276b",
"id": "294a8ce0",
"metadata": {
"editable": true
},
@@ -666,7 +666,7 @@
},
{
"cell_type": "markdown",
"id": "84c63927",
"id": "a8c1b097",
"metadata": {
"editable": true
},
@@ -678,7 +678,7 @@
},
{
"cell_type": "markdown",
"id": "c087ef22",
"id": "4180c17f",
"metadata": {
"editable": true
},
@@ -688,7 +688,7 @@
},
{
"cell_type": "markdown",
"id": "79503987",
"id": "6a48bb05",
"metadata": {
"editable": true
},
@@ -707,7 +707,7 @@
},
{
"cell_type": "markdown",
"id": "c165025b",
"id": "d053a5c8",
"metadata": {
"editable": true
},
@@ -735,7 +735,7 @@
},
{
"cell_type": "markdown",
"id": "efb63405",
"id": "8cb550a1",
"metadata": {
"editable": true
},
@@ -761,7 +761,7 @@
},
{
"cell_type": "markdown",
"id": "88d4bfd8",
"id": "96be5396",
"metadata": {
"editable": true
},
@@ -778,7 +778,7 @@
},
{
"cell_type": "markdown",
"id": "6a0795e0",
"id": "f8a288b4",
"metadata": {
"editable": true
},
@@ -798,7 +798,7 @@
},
{
"cell_type": "markdown",
"id": "d815fdf3",
"id": "ee8bd2f9",
"metadata": {
"editable": true
},
@@ -827,7 +827,7 @@
},
{
"cell_type": "markdown",
"id": "a5b26ed1",
"id": "1037fcf3",
"metadata": {
"editable": true
},
@@ -852,7 +852,7 @@
},
{
"cell_type": "markdown",
"id": "e5783b81",
"id": "2653d9e3",
"metadata": {
"editable": true
},
@@ -872,7 +872,7 @@
},
{
"cell_type": "markdown",
"id": "9bdfff4f",
"id": "33e4596e",
"metadata": {
"editable": true
},
@@ -884,7 +884,7 @@
},
{
"cell_type": "markdown",
"id": "bd1e4a83",
"id": "137d3cd6",
"metadata": {
"editable": true
},
@@ -894,7 +894,7 @@
},
{
"cell_type": "markdown",
"id": "66d14a83",
"id": "4c9853b7",
"metadata": {
"editable": true
},
@@ -909,7 +909,7 @@
},
{
"cell_type": "markdown",
"id": "ac38d462",
"id": "493028c4",
"metadata": {
"editable": true
},
@@ -922,7 +922,7 @@
},
{
"cell_type": "markdown",
"id": "65488a60",
"id": "c819e616",
"metadata": {
"editable": true
},
@@ -935,7 +935,7 @@
},
{
"cell_type": "markdown",
"id": "9c8686d8",
"id": "f0385e1a",
"metadata": {
"editable": true
},
@@ -947,7 +947,7 @@
},
{
"cell_type": "markdown",
"id": "585dbaff",
"id": "4310a9b4",
"metadata": {
"editable": true
},
@@ -960,7 +960,7 @@
},
{
"cell_type": "markdown",
"id": "a8093a3e",
"id": "1e3932be",
"metadata": {
"editable": true
},
@@ -971,7 +971,7 @@
},
{
"cell_type": "markdown",
"id": "ec844baa",
"id": "91e64919",
"metadata": {
"editable": true
},
@@ -985,7 +985,7 @@
},
{
"cell_type": "markdown",
"id": "7f2b563b",
"id": "c83a8ca5",
"metadata": {
"editable": true
},
@@ -995,7 +995,7 @@
},
{
"cell_type": "markdown",
"id": "5a75bbe4",
"id": "16c94c48",
"metadata": {
"editable": true
},
@@ -1009,7 +1009,7 @@
},
{
"cell_type": "markdown",
"id": "8d00a9ff",
"id": "63bc9d16",
"metadata": {
"editable": true
},
@@ -1022,7 +1022,7 @@
},
{
"cell_type": "markdown",
"id": "cae54a40",
"id": "710fedd5",
"metadata": {
"editable": true
},
@@ -1035,7 +1035,7 @@
},
{
"cell_type": "markdown",
"id": "ef87a15a",
"id": "8c47e8f8",
"metadata": {
"editable": true
},
@@ -1045,7 +1045,7 @@
},
{
"cell_type": "markdown",
"id": "5bfaef5d",
"id": "c0e43db3",
"metadata": {
"editable": true
},
@@ -1058,7 +1058,7 @@
},
{
"cell_type": "markdown",
"id": "0aab5f59",
"id": "e9a40705",
"metadata": {
"editable": true
},
@@ -1068,7 +1068,7 @@
},
{
"cell_type": "markdown",
"id": "71269afb",
"id": "de6040d9",
"metadata": {
"editable": true
},
@@ -1081,7 +1081,7 @@
},
{
"cell_type": "markdown",
"id": "4d809fab",
"id": "f2907638",
"metadata": {
"editable": true
},
@@ -1093,7 +1093,7 @@
},
{
"cell_type": "markdown",
"id": "734f7c5e",
"id": "9e53d173",
"metadata": {
"editable": true
},
@@ -1112,7 +1112,7 @@
},
{
"cell_type": "markdown",
"id": "f4ff2861",
"id": "959c77be",
"metadata": {
"editable": true
},
@@ -1125,7 +1125,7 @@
},
{
"cell_type": "markdown",
"id": "fd66a47c",
"id": "6470ab77",
"metadata": {
"editable": true
},
@@ -1137,7 +1137,7 @@
},
{
"cell_type": "markdown",
"id": "51e5434b",
"id": "720c157a",
"metadata": {
"editable": true
},
@@ -1150,7 +1150,7 @@
},
{
"cell_type": "markdown",
"id": "9129f7a5",
"id": "62c153d3",
"metadata": {
"editable": true
},
@@ -1170,7 +1170,7 @@
},
{
"cell_type": "markdown",
"id": "e5fa7f9c",
"id": "cfd10bd9",
"metadata": {
"editable": true
},
@@ -1193,7 +1193,7 @@
},
{
"cell_type": "markdown",
"id": "f5bbafe6",
"id": "40dc022d",
"metadata": {
"editable": true
},
@@ -1208,7 +1208,7 @@
},
{
"cell_type": "markdown",
"id": "0cc93a0c",
"id": "242bfa08",
"metadata": {
"editable": true
},
@@ -1220,7 +1220,7 @@
},
{
"cell_type": "markdown",
"id": "8dd4f5e0",
"id": "7dd4616b",
"metadata": {
"editable": true
},
@@ -1240,7 +1240,7 @@
},
{
"cell_type": "markdown",
"id": "f51c546c",
"id": "00b509e4",
"metadata": {
"editable": true
},
@@ -1260,7 +1260,7 @@
},
{
"cell_type": "markdown",
"id": "e44fcf6d",
"id": "941834ae",
"metadata": {
"editable": true
},
@@ -1284,7 +1284,7 @@
},
{
"cell_type": "markdown",
"id": "3bd69373",
"id": "69ba3346",
"metadata": {
"editable": true
},
@@ -1305,7 +1305,7 @@
},
{
"cell_type": "markdown",
"id": "e7f867d9",
"id": "99f1499e",
"metadata": {
"editable": true
},
@@ -1335,7 +1335,7 @@
},
{
"cell_type": "markdown",
"id": "5c2c3909",
"id": "c817851a",
"metadata": {
"editable": true
},
@@ -1359,7 +1359,7 @@
{
"cell_type": "code",
"execution_count": 1,
"id": "a32faf6a",
"id": "4b9647f3",
"metadata": {
"collapsed": false,
"editable": true
@@ -1398,7 +1398,7 @@
},
{
"cell_type": "markdown",
"id": "bc95505d",
"id": "26cf7fd4",
"metadata": {
"editable": true
},
@@ -1408,7 +1408,7 @@
},
{
"cell_type": "markdown",
"id": "355f62af",
"id": "b2205188",
"metadata": {
"editable": true
},
@@ -1419,7 +1419,7 @@
{
"cell_type": "code",
"execution_count": 2,
"id": "39fd1fa8",
"id": "be6f7ced",
"metadata": {
"collapsed": false,
"editable": true
@@ -1439,7 +1439,7 @@
},
{
"cell_type": "markdown",
"id": "237b4db3",
"id": "69bcb406",
"metadata": {
"editable": true
},
@@ -1457,7 +1457,7 @@
},
{
"cell_type": "markdown",
"id": "0c13e5b0",
"id": "ce87dc4f",
"metadata": {
"editable": true
},
@@ -1469,7 +1469,7 @@
},
{
"cell_type": "markdown",
"id": "a086aa7e",
"id": "b8d1371c",
"metadata": {
"editable": true
},
@@ -1486,7 +1486,7 @@
},
{
"cell_type": "markdown",
"id": "c3837d89",
"id": "c95f3051",
"metadata": {
"editable": true
},
@@ -1498,7 +1498,7 @@
},
{
"cell_type": "markdown",
"id": "7c7cd0a7",
"id": "107fab0a",
"metadata": {
"editable": true
},
@@ -1508,7 +1508,7 @@
},
{
"cell_type": "markdown",
"id": "b9db0cd5",
"id": "d56b4bd7",
"metadata": {
"editable": true
},
@@ -1520,7 +1520,7 @@
},
{
"cell_type": "markdown",
"id": "00482b2d",
"id": "4712d813",
"metadata": {
"editable": true
},
@@ -1537,7 +1537,7 @@
},
{
"cell_type": "markdown",
"id": "2e7c7291",
"id": "43a58a59",
"metadata": {
"editable": true
},
@@ -1549,7 +1549,7 @@
},
{
"cell_type": "markdown",
"id": "9a8d29b5",
"id": "6333f694",
"metadata": {
"editable": true
},
@@ -1559,7 +1559,7 @@
},
{
"cell_type": "markdown",
"id": "9a8e2084",
"id": "24e27c2b",
"metadata": {
"editable": true
},
@@ -1571,7 +1571,7 @@
},
{
"cell_type": "markdown",
"id": "4a191c5c",
"id": "0462c197",
"metadata": {
"editable": true
},
@@ -1581,7 +1581,7 @@
},
{
"cell_type": "markdown",
"id": "c37713f8",
"id": "965cd453",
"metadata": {
"editable": true
},
@@ -1593,7 +1593,7 @@
},
{
"cell_type": "markdown",
"id": "82ca4a7b",
"id": "4426c74e",
"metadata": {
"editable": true
},
@@ -1603,7 +1603,7 @@
},
{
"cell_type": "markdown",
"id": "2765a841",
"id": "d68ec470",
"metadata": {
"editable": true
},
@@ -1619,7 +1619,7 @@
},
{
"cell_type": "markdown",
"id": "321964c1",
"id": "0198c371",
"metadata": {
"editable": true
},
@@ -1630,7 +1630,7 @@
{
"cell_type": "code",
"execution_count": 3,
"id": "5942226f",
"id": "af517050",
"metadata": {
"collapsed": false,
"editable": true
@@ -1695,7 +1695,7 @@
},
{
"cell_type": "markdown",
"id": "cf2af19d",
"id": "2b502d1d",
"metadata": {
"editable": true
},
@@ -1706,7 +1706,7 @@
{
"cell_type": "code",
"execution_count": 4,
"id": "7b371a0c",
"id": "9a5194fb",
"metadata": {
"collapsed": false,
"editable": true
@@ -1763,7 +1763,7 @@
},
{
"cell_type": "markdown",
"id": "6f583fcd",
"id": "727c7723",
"metadata": {
"editable": true
},
@@ -1801,7 +1801,7 @@
},
{
"cell_type": "markdown",
"id": "37766c51",
"id": "7e90566c",
"metadata": {
"editable": true
},
@@ -1828,7 +1828,7 @@
{
"cell_type": "code",
"execution_count": 5,
"id": "0eac5ca9",
"id": "7c760f15",
"metadata": {
"collapsed": false,
"editable": true
@@ -1890,7 +1890,7 @@
},
{
"cell_type": "markdown",
"id": "d698096e",
"id": "2619ab70",
"metadata": {
"editable": true
},
@@ -1915,7 +1915,7 @@
},
{
"cell_type": "markdown",
"id": "3e37a4d2",
"id": "3e4d0bdb",
"metadata": {
"editable": true
},
@@ -1943,7 +1943,7 @@
},
{
"cell_type": "markdown",
"id": "e7e43cf9",
"id": "65d5f3f5",
"metadata": {
"editable": true
},
@@ -1956,7 +1956,7 @@
{
"cell_type": "code",
"execution_count": 6,
"id": "7aa6a568",
"id": "66c55986",
"metadata": {
"collapsed": false,
"editable": true
@@ -2056,7 +2056,7 @@
},
{
"cell_type": "markdown",
"id": "9a90aec7",
"id": "8bd8e7a8",
"metadata": {
"editable": true
},
@@ -2067,7 +2067,7 @@
{
"cell_type": "code",
"execution_count": 7,
"id": "93b3af24",
"id": "2b363d73",
"metadata": {
"collapsed": false,
"editable": true
@@ -2156,7 +2156,7 @@
},
{
"cell_type": "markdown",
"id": "90657c6d",
"id": "de30ce89",
"metadata": {
"editable": true
},
@@ -2166,7 +2166,7 @@
},
{
"cell_type": "markdown",
"id": "a88b86e7",
"id": "936b8f0f",
"metadata": {
"editable": true
},
@@ -2179,7 +2179,7 @@
{
"cell_type": "code",
"execution_count": 8,
"id": "89f45188",
"id": "399b09d4",
"metadata": {
"collapsed": false,
"editable": true
@@ -2257,7 +2257,7 @@
},
{
"cell_type": "markdown",
"id": "75496517",
"id": "ded3c9a0",
"metadata": {
"editable": true
},
+2 -2
View File
@@ -293,13 +293,13 @@ We could now define a new cost function to minimize, namely the negative logarit
!bt
\[
C(\bm{\theta}=-\log{\prod_{i=0}^{n-1}p(y_i,\bm{X}\vert\bm{\theta})}=-\sum_{i=0}^{n-1}\log{p(y_i,\bm{X}\vert\bm{\theta})},
C(\bm{\theta})=-\log{\prod_{i=0}^{n-1}p(y_i,\bm{X}\vert\bm{\theta})}=-\sum_{i=0}^{n-1}\log{p(y_i,\bm{X}\vert\bm{\theta})},
\]
!et
which becomes
!bt
\[
C(\bm{\theta}=\frac{n}{2}\log{2\pi\sigma^2}+\frac{\vert\vert (\bm{y}-\bm{X}\bm{\theta})\vert\vert_2^2}{2\sigma^2}.
C(\bm{\theta})=\frac{n}{2}\log{2\pi\sigma^2}+\frac{\vert\vert (\bm{y}-\bm{X}\bm{\theta})\vert\vert_2^2}{2\sigma^2}.
\]
!et