Skip to content

Commit 55beb4d

Browse files
committed
small typos
1 parent eb31c10 commit 55beb4d

8 files changed

Lines changed: 143 additions & 101 deletions

File tree

0 Bytes
Binary file not shown.
211 Bytes
Binary file not shown.

doc/LectureNotes/_build/html/_sources/exercisesweek37.ipynb

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "markdown",
5-
"id": "b0268cb1",
5+
"id": "9b0bb122",
66
"metadata": {
77
"editable": true
88
},
@@ -14,7 +14,7 @@
1414
},
1515
{
1616
"cell_type": "markdown",
17-
"id": "700a1d0b",
17+
"id": "48cf6ad1",
1818
"metadata": {
1919
"editable": true
2020
},
@@ -27,7 +27,7 @@
2727
},
2828
{
2929
"cell_type": "markdown",
30-
"id": "dbe5809a",
30+
"id": "3765446f",
3131
"metadata": {
3232
"editable": true
3333
},
@@ -46,7 +46,7 @@
4646
},
4747
{
4848
"cell_type": "markdown",
49-
"id": "ac99e9c0",
49+
"id": "82ccb1c9",
5050
"metadata": {
5151
"editable": true
5252
},
@@ -58,19 +58,19 @@
5858
},
5959
{
6060
"cell_type": "markdown",
61-
"id": "6d71a32d",
61+
"id": "2d9c0494",
6262
"metadata": {
6363
"editable": true
6464
},
6565
"source": [
6666
"$$\n",
67-
"\\f(x)= 2-x+5x^2,\n",
67+
"f(x)= 2-x+5x^2,\n",
6868
"$$"
6969
]
7070
},
7171
{
7272
"cell_type": "markdown",
73-
"id": "c6496768",
73+
"id": "df88ac02",
7474
"metadata": {
7575
"editable": true
7676
},
@@ -83,7 +83,7 @@
8383
},
8484
{
8585
"cell_type": "markdown",
86-
"id": "24678181",
86+
"id": "ce2e4a69",
8787
"metadata": {
8888
"editable": true
8989
},
@@ -99,7 +99,7 @@
9999
},
100100
{
101101
"cell_type": "markdown",
102-
"id": "6b1bd90a",
102+
"id": "294f41ac",
103103
"metadata": {
104104
"editable": true
105105
},
@@ -120,7 +120,7 @@
120120
{
121121
"cell_type": "code",
122122
"execution_count": 1,
123-
"id": "5e751a16",
123+
"id": "9c98b0d9",
124124
"metadata": {
125125
"collapsed": false,
126126
"editable": true
@@ -140,7 +140,7 @@
140140
},
141141
{
142142
"cell_type": "markdown",
143-
"id": "50a68a52",
143+
"id": "802cf96b",
144144
"metadata": {
145145
"editable": true
146146
},
@@ -156,7 +156,7 @@
156156
},
157157
{
158158
"cell_type": "markdown",
159-
"id": "db74a970",
159+
"id": "90164acc",
160160
"metadata": {
161161
"editable": true
162162
},
@@ -168,7 +168,7 @@
168168
},
169169
{
170170
"cell_type": "markdown",
171-
"id": "f8feaa49",
171+
"id": "55d1c701",
172172
"metadata": {
173173
"editable": true
174174
},
@@ -179,7 +179,7 @@
179179
{
180180
"cell_type": "code",
181181
"execution_count": 2,
182-
"id": "e6eca7a7",
182+
"id": "22b80fe2",
183183
"metadata": {
184184
"collapsed": false,
185185
"editable": true
@@ -200,21 +200,21 @@
200200
},
201201
{
202202
"cell_type": "markdown",
203-
"id": "a2dff0cf",
203+
"id": "a0a8a8ec",
204204
"metadata": {
205205
"editable": true
206206
},
207207
"source": [
208208
"This computes the Ridge and OLS regression coefficients directly. The identity\n",
209-
"matrix $I$ has the same size as $X^T X$. It adds $\\lambda$ to the diagonal of $X^T X for Ridge regression. We\n",
209+
"matrix $I$ has the same size as $X^T X$. It adds $\\lambda$ to the diagonal of $X^T X$ for Ridge regression. We\n",
210210
"then invert this matrix and multiply by $X^T y$. The result\n",
211211
"for $\\boldsymbol{\\theta}$ is a NumPy array of shape (n$\\_$features,) containing the\n",
212-
"fitted parameters $\\boldsymbol{\\theta}$.."
212+
"fitted parameters $\\boldsymbol{\\theta}$."
213213
]
214214
},
215215
{
216216
"cell_type": "markdown",
217-
"id": "d7542c3e",
217+
"id": "8e317939",
218218
"metadata": {
219219
"editable": true
220220
},
@@ -226,7 +226,7 @@
226226
},
227227
{
228228
"cell_type": "markdown",
229-
"id": "b922fd54",
229+
"id": "7b52e9af",
230230
"metadata": {
231231
"editable": true
232232
},
@@ -238,7 +238,7 @@
238238
},
239239
{
240240
"cell_type": "markdown",
241-
"id": "92268a9a",
241+
"id": "ba0b5a80",
242242
"metadata": {
243243
"editable": true
244244
},
@@ -258,7 +258,7 @@
258258
{
259259
"cell_type": "code",
260260
"execution_count": 3,
261-
"id": "81660fa3",
261+
"id": "e29c2842",
262262
"metadata": {
263263
"collapsed": false,
264264
"editable": true
@@ -301,7 +301,7 @@
301301
},
302302
{
303303
"cell_type": "markdown",
304-
"id": "95149551",
304+
"id": "9dc52b0e",
305305
"metadata": {
306306
"editable": true
307307
},
@@ -313,7 +313,7 @@
313313
},
314314
{
315315
"cell_type": "markdown",
316-
"id": "09b5400e",
316+
"id": "4584ce15",
317317
"metadata": {
318318
"editable": true
319319
},
@@ -325,7 +325,7 @@
325325
},
326326
{
327327
"cell_type": "markdown",
328-
"id": "c635ca9e",
328+
"id": "2f9f5861",
329329
"metadata": {
330330
"editable": true
331331
},
@@ -351,7 +351,7 @@
351351
{
352352
"cell_type": "code",
353353
"execution_count": 4,
354-
"id": "4ca4ce05",
354+
"id": "9e336d9b",
355355
"metadata": {
356356
"collapsed": false,
357357
"editable": true
@@ -380,7 +380,7 @@
380380
},
381381
{
382382
"cell_type": "markdown",
383-
"id": "af39d8bc",
383+
"id": "5afbeef2",
384384
"metadata": {
385385
"editable": true
386386
},
@@ -394,7 +394,7 @@
394394
},
395395
{
396396
"cell_type": "markdown",
397-
"id": "d35d3438",
397+
"id": "28beeaf3",
398398
"metadata": {
399399
"editable": true
400400
},
@@ -406,7 +406,7 @@
406406
},
407407
{
408408
"cell_type": "markdown",
409-
"id": "b28bf122",
409+
"id": "36ba38c1",
410410
"metadata": {
411411
"editable": true
412412
},

doc/LectureNotes/_build/html/exercisesweek37.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ <h2>Simple one-dimensional second-order polynomial<a class="headerlink" href="#s
427427
<p>We start with a very simple function</p>
428428
<div class="math notranslate nohighlight">
429429
\[
430-
\f(x)= 2-x+5x^2,
430+
f(x)= 2-x+5x^2,
431431
\]</div>
432432
<p>defined for <span class="math notranslate nohighlight">\(x\in [-2,2]\)</span>. You can add noise if you wish.</p>
433433
<p>We are going to fit this function with a polynomial ansatz. The easiest thing is to set up a second-order polynomial and see if you can fit the above function.
@@ -496,10 +496,10 @@ <h2>Exercise 3, use the analytical formulae for OLS and Ridge regression to find
496496
</div>
497497
</div>
498498
<p>This computes the Ridge and OLS regression coefficients directly. The identity
499-
matrix <span class="math notranslate nohighlight">\(I\)</span> has the same size as <span class="math notranslate nohighlight">\(X^T X\)</span>. It adds <span class="math notranslate nohighlight">\(\lambda\)</span> to the diagonal of <span class="math notranslate nohighlight">\(X^T X for Ridge regression. We
500-
then invert this matrix and multiply by \)</span>X^T y<span class="math notranslate nohighlight">\(. The result
501-
for \)</span>\boldsymbol{\theta}<span class="math notranslate nohighlight">\( is a NumPy array of shape (n\)</span>_<span class="math notranslate nohighlight">\(features,) containing the
502-
fitted parameters \)</span>\boldsymbol{\theta}$..</p>
499+
matrix <span class="math notranslate nohighlight">\(I\)</span> has the same size as <span class="math notranslate nohighlight">\(X^T X\)</span>. It adds <span class="math notranslate nohighlight">\(\lambda\)</span> to the diagonal of <span class="math notranslate nohighlight">\(X^T X\)</span> for Ridge regression. We
500+
then invert this matrix and multiply by <span class="math notranslate nohighlight">\(X^T y\)</span>. The result
501+
for <span class="math notranslate nohighlight">\(\boldsymbol{\theta}\)</span> is a NumPy array of shape (n<span class="math notranslate nohighlight">\(\_\)</span>features,) containing the
502+
fitted parameters <span class="math notranslate nohighlight">\(\boldsymbol{\theta}\)</span>.</p>
503503
<section id="id1">
504504
<h3>3a)<a class="headerlink" href="#id1" title="Link to this heading">#</a></h3>
505505
<p>Finalize, in the above code, the OLS and Ridge regression determination of the optimal parameters <span class="math notranslate nohighlight">\(\boldsymbol{\theta}\)</span>.</p>

0 commit comments

Comments
 (0)