|
37 | 37 | "After having completed these exercises you will have:\n", |
38 | 38 | "1. Your own code for the implementation of the simplest gradient descent approach applied to ordinary least squares (OLS) and Ridge regression\n", |
39 | 39 | "\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", |
41 | 41 | "\n", |
42 | 42 | "3. Explore the role of the learning rate in the gradient descent approach and the hyperparameter $\\lambda$ in Ridge regression\n", |
43 | 43 | "\n", |
|
55 | 55 | "\n", |
56 | 56 | "We create a synthetic linear regression dataset with a sparse\n", |
57 | 57 | "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", |
59 | 59 | "use 10 features with only 3 non-zero weights in the true model. This\n", |
60 | 60 | "way, the target is generated as a linear combination of a few features\n", |
61 | 61 | "(with known coefficients) plus some random noise. The steps we include are:\n", |
|
75 | 75 | "id": "9e6acfef", |
76 | 76 | "metadata": { |
77 | 77 | "collapsed": false, |
78 | | - "editable": true |
| 78 | + "editable": true, |
| 79 | + "jupyter": { |
| 80 | + "outputs_hidden": false |
| 81 | + } |
79 | 82 | }, |
80 | 83 | "outputs": [], |
81 | 84 | "source": [ |
|
176 | 179 | "id": "a140aac7", |
177 | 180 | "metadata": { |
178 | 181 | "collapsed": false, |
179 | | - "editable": true |
| 182 | + "editable": true, |
| 183 | + "jupyter": { |
| 184 | + "outputs_hidden": false |
| 185 | + } |
180 | 186 | }, |
181 | 187 | "outputs": [], |
182 | 188 | "source": [ |
|
223 | 229 | "id": "97ac6cb6", |
224 | 230 | "metadata": { |
225 | 231 | "collapsed": false, |
226 | | - "editable": true |
| 232 | + "editable": true, |
| 233 | + "jupyter": { |
| 234 | + "outputs_hidden": false |
| 235 | + } |
227 | 236 | }, |
228 | 237 | "outputs": [], |
229 | 238 | "source": [ |
|
302 | 311 | "id": "a67af634", |
303 | 312 | "metadata": { |
304 | 313 | "collapsed": false, |
305 | | - "editable": true |
| 314 | + "editable": true, |
| 315 | + "jupyter": { |
| 316 | + "outputs_hidden": false |
| 317 | + } |
306 | 318 | }, |
307 | 319 | "outputs": [], |
308 | 320 | "source": [ |
|
371 | 383 | ] |
372 | 384 | } |
373 | 385 | ], |
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 | + }, |
375 | 405 | "nbformat": 4, |
376 | 406 | "nbformat_minor": 5 |
377 | 407 | } |
0 commit comments