Skip to content

Commit 18788a2

Browse files
committed
update
1 parent 7bd40a8 commit 18788a2

File tree

2 files changed

+38
-8
lines changed

2 files changed

+38
-8
lines changed

doc/LectureNotes/exercisesweek35.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@
323323
"source": [
324324
"n = 100\n",
325325
"x = np.linspace(-3, 3, n)\n",
326-
"y = np.exp(-x**2) + 1.5 * np.exp(-(x-2)**2) + np.random.normal(0, 0.1)"
326+
"y = np.exp(-x**2) + 1.5 * np.exp(-(x-2)**2) + np.random.normal(0, 1.0)"
327327
]
328328
},
329329
{

doc/LectureNotes/exercisesweek37.ipynb

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"After having completed these exercises you will have:\n",
3838
"1. Your own code for the implementation of the simplest gradient descent approach applied to ordinary least squares (OLS) and Ridge regression\n",
3939
"\n",
40-
"2. Be able to compare the analytical expressions for OLS and Rudge regression with the gradient descent approach\n",
40+
"2. Be able to compare the analytical expressions for OLS and Ridge regression with the gradient descent approach\n",
4141
"\n",
4242
"3. Explore the role of the learning rate in the gradient descent approach and the hyperparameter $\\lambda$ in Ridge regression\n",
4343
"\n",
@@ -55,7 +55,7 @@
5555
"\n",
5656
"We create a synthetic linear regression dataset with a sparse\n",
5757
"underlying relationship. This means we have many features but only a\n",
58-
"few of them actually contribute to the target. In our example, we’ll\n",
58+
"few of them actually contribute to the target. In our example, we will\n",
5959
"use 10 features with only 3 non-zero weights in the true model. This\n",
6060
"way, the target is generated as a linear combination of a few features\n",
6161
"(with known coefficients) plus some random noise. The steps we include are:\n",
@@ -75,7 +75,10 @@
7575
"id": "9e6acfef",
7676
"metadata": {
7777
"collapsed": false,
78-
"editable": true
78+
"editable": true,
79+
"jupyter": {
80+
"outputs_hidden": false
81+
}
7982
},
8083
"outputs": [],
8184
"source": [
@@ -176,7 +179,10 @@
176179
"id": "a140aac7",
177180
"metadata": {
178181
"collapsed": false,
179-
"editable": true
182+
"editable": true,
183+
"jupyter": {
184+
"outputs_hidden": false
185+
}
180186
},
181187
"outputs": [],
182188
"source": [
@@ -223,7 +229,10 @@
223229
"id": "97ac6cb6",
224230
"metadata": {
225231
"collapsed": false,
226-
"editable": true
232+
"editable": true,
233+
"jupyter": {
234+
"outputs_hidden": false
235+
}
227236
},
228237
"outputs": [],
229238
"source": [
@@ -302,7 +311,10 @@
302311
"id": "a67af634",
303312
"metadata": {
304313
"collapsed": false,
305-
"editable": true
314+
"editable": true,
315+
"jupyter": {
316+
"outputs_hidden": false
317+
}
306318
},
307319
"outputs": [],
308320
"source": [
@@ -371,7 +383,25 @@
371383
]
372384
}
373385
],
374-
"metadata": {},
386+
"metadata": {
387+
"kernelspec": {
388+
"display_name": "Python 3 (ipykernel)",
389+
"language": "python",
390+
"name": "python3"
391+
},
392+
"language_info": {
393+
"codemirror_mode": {
394+
"name": "ipython",
395+
"version": 3
396+
},
397+
"file_extension": ".py",
398+
"mimetype": "text/x-python",
399+
"name": "python",
400+
"nbconvert_exporter": "python",
401+
"pygments_lexer": "ipython3",
402+
"version": "3.9.15"
403+
}
404+
},
375405
"nbformat": 4,
376406
"nbformat_minor": 5
377407
}

0 commit comments

Comments
 (0)