added project 1 report requirements

This commit is contained in:
KarlHenrik
2025-09-17 13:49:09 +02:00
parent 89a87f7843
commit 0cb6e24363
8 changed files with 438 additions and 317 deletions
+71 -40
View File
@@ -385,16 +385,17 @@ document.write(`
</div>
<nav aria-label="Page">
<ul class="visible nav section-nav flex-column">
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#deliverables">Deliverables</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#preamble-note-on-writing-reports-using-reference-material-ai-and-other-tools">Preamble: Note on writing reports, using reference material, AI and other tools</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#regression-analysis-and-resampling-methods">Regression analysis and resampling methods</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#part-a-ordinary-least-square-ols-for-the-runge-function">Part a : Ordinary Least Square (OLS) for the Runge function</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#part-b-adding-ridge-regression-for-the-runge-function">Part b: Adding Ridge regression for the Runge function</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#part-b-adding-ridge-regression-for-the-runge-function">Part b: Adding Ridge regression for the Runge function</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#part-c-writing-your-own-gradient-descent-code">Part c: Writing your own gradient descent code</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#part-d-including-momentum-and-more-advanced-ways-to-update-the-learning-the-rate">Part d: Including momentum and more advanced ways to update the learning the rate</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#part-e-writing-our-own-code-for-lasso-regression">Part e: Writing our own code for Lasso regression</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#part-f-stochastic-gradient-descent">Part f: Stochastic gradient descent</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#part-g-bias-variance-trade-off-and-resampling-techniques">Part g: Bias-variance trade-off and resampling techniques</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#part-h-cross-validation-as-resampling-techniques-adding-more-complexity">Part h): Cross-validation as resampling techniques, adding more complexity</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#part-h-cross-validation-as-resampling-techniques-adding-more-complexity">Part h): Cross-validation as resampling techniques, adding more complexity</a></li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#background-literature">Background literature</a></li>
@@ -414,14 +415,43 @@ document.write(`
<!-- HTML file automatically generated from DocOnce source (https://github.com/doconce/doconce/)
doconce format html Project1.do.txt -->
<!-- dom:TITLE: Project 1 on Machine Learning, deadline October 6 (midnight), 2025 --><section class="tex2jax_ignore mathjax_ignore" id="project-1-on-machine-learning-deadline-october-6-midnight-2025">
<!-- dom:TITLE: Project 1 on Machine Learning, deadline October 6 (midnight), 2025 -->
<section class="tex2jax_ignore mathjax_ignore" id="project-1-on-machine-learning-deadline-october-6-midnight-2025">
<h1>Project 1 on Machine Learning, deadline October 6 (midnight), 2025<a class="headerlink" href="#project-1-on-machine-learning-deadline-october-6-midnight-2025" title="Link to this heading">#</a></h1>
<p><strong>Data Analysis and Machine Learning FYS-STK3155/FYS4155</strong>, University of Oslo, Norway</p>
<p>Date: <strong>September 2</strong></p>
<section id="deliverables">
<h2>Deliverables<a class="headerlink" href="#deliverables" title="Link to this heading">#</a></h2>
<p>First, join a group in canvas with your group partners. Pick an avaliable group for Project 1 in the “People” page.</p>
<p>In canvas, deliver as a group and include:</p>
<ul class="simple">
<li><p>A PDF of your report which follows the guidelines covered below and in the week 39 exercises. Additional requirements include:</p>
<ul>
<li><p>It should be around 5000 words, use the word counter in Overleaf for this.</p></li>
<li><p>It should be around 10 pages long, not including references or appendices.</p></li>
<li><p>It should include around 10-15 figures.</p></li>
</ul>
</li>
<li><p>A comment linking to your github repository (or folder in one of your github repositories) for this project. It must include</p>
<ul>
<li><p>A PDF of the report</p></li>
<li><p>A folder named Code, where you put python files for your functions and notebooks for reproducing your results. Remember to use a seed for generating random data and for train-test splits when generating final results.</p></li>
<li><p>A README file with</p>
<ul>
<li><p>the name of the group members</p></li>
<li><p>a short description of the project</p></li>
<li><p>a description of how to install the required packages to run your code from a requirements.txt file</p></li>
<li><p>names and descriptions of the various notebooks in the Code folder and the results they produce</p></li>
</ul>
</li>
</ul>
</li>
</ul>
</section>
<section id="preamble-note-on-writing-reports-using-reference-material-ai-and-other-tools">
<h2>Preamble: Note on writing reports, using reference material, AI and other tools<a class="headerlink" href="#preamble-note-on-writing-reports-using-reference-material-ai-and-other-tools" title="Link to this heading">#</a></h2>
<p>We want you to answer the three different projects by handing in
reports written like a standard scientific/technical report. The
reports written like a standard scientific/technical report. The
links at
<a class="github reference external" href="https://github.com/CompPhysics/MachineLearning/tree/master/doc/Projects">CompPhysics/MachineLearning</a>
contain more information. There you can find examples of previous
@@ -446,7 +476,7 @@ side. If you opt for another data set, consider using a set which has
been studied in the scientific literature. This makes it easier for
you to compare and analyze your results. Comparing with existing
results from the scientific literature is also an essential element of
the scientific discussion. The University of California at Irvine
the scientific discussion. The University of California at Irvine
with its Machine Learning repository at
<a class="reference external" href="https://archive.ics.uci.edu/ml/index.php">https://archive.ics.uci.edu/ml/index.php</a> is an excellent site to
look up for examples and
@@ -463,42 +493,42 @@ In addition to the scientific part, in this course we want also to
give you an experience in writing scientific reports.</p>
<p>We will study how to fit polynomials to specific
one-dimensional functions (feel free to replace the suggested function with more complicated ones).</p>
<p>We will use Runges function (see <a class="reference external" href="https://en.wikipedia.org/wiki/Runge%27s_phenomenon">https://en.wikipedia.org/wiki/Runges_phenomenon</a> for a discussion). The one-dimensional function we will study is</p>
<p>We will use Runges function (see <a class="reference external" href="https://en.wikipedia.org/wiki/Runge%27s_phenomenon">https://en.wikipedia.org/wiki/Runges_phenomenon</a> for a discussion). The one-dimensional function we will study is</p>
<div class="math notranslate nohighlight">
\[
f(x) = \frac{1}{1+25x^2}.
\]</div>
<p>Our first step will be to perform an OLS regression analysis of this
function, trying out a polynomial fit with an <span class="math notranslate nohighlight">\(x\)</span> dependence of the
form <span class="math notranslate nohighlight">\([x,x^2,\dots]\)</span>. You can use a uniform distribution to set up the
form <span class="math notranslate nohighlight">\([x,x^2,\dots]\)</span>. You can use a uniform distribution to set up the
arrays of values for <span class="math notranslate nohighlight">\(x \in [-1,1]\)</span>, or alternatively use a fixed step size.
Thereafter we will repeat many of the same steps when using the Ridge and Lasso regression methods,
introducing thereby a dependence on the hyperparameter (penalty) <span class="math notranslate nohighlight">\(\lambda\)</span>.</p>
introducing thereby a dependence on the hyperparameter (penalty) <span class="math notranslate nohighlight">\(\lambda\)</span>.</p>
<p>We will also include bootstrap as a resampling technique in order to
study the so-called <strong>bias-variance tradeoff</strong>. After that we will
study the so-called <strong>bias-variance tradeoff</strong>. After that we will
include the so-called cross-validation technique.</p>
<section id="part-a-ordinary-least-square-ols-for-the-runge-function">
<h3>Part a : Ordinary Least Square (OLS) for the Runge function<a class="headerlink" href="#part-a-ordinary-least-square-ols-for-the-runge-function" title="Link to this heading">#</a></h3>
<p>We will generate our own dataset for abovementioned function
<p>We will generate our own dataset for abovementioned function
<span class="math notranslate nohighlight">\(\mathrm{Runge}(x)\)</span> function with <span class="math notranslate nohighlight">\(x\in [-1,1]\)</span>. You should explore also the addition
of an added stochastic noise to this function using the normal
distribution <span class="math notranslate nohighlight">\(N(0,1)\)</span>.</p>
<p><em>Write your own code</em> (using for example the pseudoinverse function <strong>pinv</strong> from <strong>Numpy</strong> ) and perform a standard <strong>ordinary least square regression</strong>
analysis using polynomials in <span class="math notranslate nohighlight">\(x\)</span> up to order <span class="math notranslate nohighlight">\(15\)</span> or higher. Explore the dependence on the number of data points and the polynomial degree.</p>
<p><em>Write your own code</em> (using for example the pseudoinverse function <strong>pinv</strong> from <strong>Numpy</strong> ) and perform a standard <strong>ordinary least square regression</strong>
analysis using polynomials in <span class="math notranslate nohighlight">\(x\)</span> up to order <span class="math notranslate nohighlight">\(15\)</span> or higher. Explore the dependence on the number of data points and the polynomial degree.</p>
<p>Evaluate the mean Squared error (MSE)</p>
<div class="math notranslate nohighlight">
\[
MSE(\boldsymbol{y},\tilde{\boldsymbol{y}}) = \frac{1}{n}
\sum_{i=0}^{n-1}(y_i-\tilde{y}_i)^2,
\]</div>
<p>and the <span class="math notranslate nohighlight">\(R^2\)</span> score function. If <span class="math notranslate nohighlight">\(\tilde{\boldsymbol{y}}_i\)</span> is the predicted
<p>and the <span class="math notranslate nohighlight">\(R^2\)</span> score function. If <span class="math notranslate nohighlight">\(\tilde{\boldsymbol{y}}_i\)</span> is the predicted
value of the <span class="math notranslate nohighlight">\(i-th\)</span> sample and <span class="math notranslate nohighlight">\(y_i\)</span> is the corresponding true value,
then the score <span class="math notranslate nohighlight">\(R^2\)</span> is defined as</p>
<div class="math notranslate nohighlight">
\[
R^2(\boldsymbol{y}, \tilde{\boldsymbol{y}}) = 1 - \frac{\sum_{i=0}^{n - 1} (y_i - \tilde{y}_i)^2}{\sum_{i=0}^{n - 1} (y_i - \bar{y})^2},
\]</div>
<p>where we have defined the mean value of <span class="math notranslate nohighlight">\(\boldsymbol{y}\)</span> as</p>
<p>where we have defined the mean value of <span class="math notranslate nohighlight">\(\boldsymbol{y}\)</span> as</p>
<div class="math notranslate nohighlight">
\[
\bar{y} = \frac{1}{n} \sum_{i=0}^{n - 1} y_i.
@@ -507,27 +537,27 @@ R^2(\boldsymbol{y}, \tilde{\boldsymbol{y}}) = 1 - \frac{\sum_{i=0}^{n - 1} (y_i
Plot also the parameters <span class="math notranslate nohighlight">\(\theta\)</span> as you increase the order of the polynomial. Comment your results.</p>
<p>Your code has to include a scaling/centering of the data (for example by
subtracting the mean value), and
a split of the data in training and test data. For the scaling you can
a split of the data in training and test data. For the scaling you can
either write your own code or use for example the function for
splitting training data provided by the library <strong>Scikit-Learn</strong> (make
sure you have installed it). This function is called
<span class="math notranslate nohighlight">\(train\_test\_split\)</span>. <strong>You should present a critical discussion of why and how you have scaled or not scaled the data</strong>.</p>
sure you have installed it). This function is called
<span class="math notranslate nohighlight">\(train\_test\_split\)</span>. <strong>You should present a critical discussion of why and how you have scaled or not scaled the data</strong>.</p>
<p>It is normal in essentially all Machine Learning studies to split the
data in a training set and a test set (eventually also an additional
validation set). There
data in a training set and a test set (eventually also an additional
validation set). There
is no explicit recipe for how much data should be included as training
data and say test data. An accepted rule of thumb is to use
data and say test data. An accepted rule of thumb is to use
approximately <span class="math notranslate nohighlight">\(2/3\)</span> to <span class="math notranslate nohighlight">\(4/5\)</span> of the data as training data.</p>
<p>You can easily reuse the solutions to your exercises from week 35.
See also the lecture slides from week 35 and week 36.</p>
<p>On scaling, we recommend reading the following section from the scikit-learn software description, see <a class="reference external" href="https://scikit-learn.org/stable/auto_examples/preprocessing/plot_all_scaling.html#plot-all-scaling-standard-scaler-section">https://scikit-learn.org/stable/auto_examples/preprocessing/plot_all_scaling.html#plot-all-scaling-standard-scaler-section</a>.</p>
</section>
<section id="part-b-adding-ridge-regression-for-the-runge-function">
<h3>Part b: Adding Ridge regression for the Runge function<a class="headerlink" href="#part-b-adding-ridge-regression-for-the-runge-function" title="Link to this heading">#</a></h3>
<h3>Part b: Adding Ridge regression for the Runge function<a class="headerlink" href="#part-b-adding-ridge-regression-for-the-runge-function" title="Link to this heading">#</a></h3>
<p>Write your own code for the Ridge method as done in the previous
exercise. The lecture notes from week 35 and 36 contain more information. Furthermore, the results from the exercise set from week 36 is something you can reuse here.</p>
exercise. The lecture notes from week 35 and 36 contain more information. Furthermore, the results from the exercise set from week 36 is something you can reuse here.</p>
<p>Perform the same analysis as you did in the previous exercise but now for different values of <span class="math notranslate nohighlight">\(\lambda\)</span>. Compare and
analyze your results with those obtained in part a) with the OLS method. Study the
analyze your results with those obtained in part a) with the OLS method. Study the
dependence on <span class="math notranslate nohighlight">\(\lambda\)</span>.</p>
</section>
<section id="part-c-writing-your-own-gradient-descent-code">
@@ -570,7 +600,7 @@ and give a critical assessment of the various methods.</p>
<section id="part-g-bias-variance-trade-off-and-resampling-techniques">
<h3>Part g: Bias-variance trade-off and resampling techniques<a class="headerlink" href="#part-g-bias-variance-trade-off-and-resampling-techniques" title="Link to this heading">#</a></h3>
<p>Our aim here is to study the bias-variance trade-off by implementing
the <strong>bootstrap</strong> resampling technique. <strong>We will only use the simpler
the <strong>bootstrap</strong> resampling technique. <strong>We will only use the simpler
ordinary least squares here</strong>.</p>
<p>With a code which does OLS and includes resampling techniques,
we will now discuss the bias-variance trade-off in the context of
@@ -628,8 +658,8 @@ the model (the bias term) and finally the variance of the noise.</p>
\]</div>
<p><strong>Important note</strong>: Since the function <span class="math notranslate nohighlight">\(f(x)\)</span> is unknown, in order to be able to evalute the bias, we replace <span class="math notranslate nohighlight">\(f(\boldsymbol{x})\)</span> in the expression for the bias with <span class="math notranslate nohighlight">\(\boldsymbol{y}\)</span>.</p>
<p>The answer to this exercise should be included in the theory part of
the report. This exercise is also part of the weekly exercises of
week 38. Explain what the terms mean and discuss their
the report. This exercise is also part of the weekly exercises of
week 38. Explain what the terms mean and discuss their
interpretations.</p>
<p>Perform then a bias-variance analysis of the Runge function by
studying the MSE value as function of the complexity of your model.</p>
@@ -639,7 +669,7 @@ of data points, and possibly also your training and test data using the <strong>
You can follow the code example in the jupyter-book at <a class="reference external" href="https://compphysics.github.io/MachineLearning/doc/LectureNotes/_build/html/chapter3.html#the-bias-variance-tradeoff">https://compphysics.github.io/MachineLearning/doc/LectureNotes/_build/html/chapter3.html#the-bias-variance-tradeoff</a>.</p>
</section>
<section id="part-h-cross-validation-as-resampling-techniques-adding-more-complexity">
<h3>Part h): Cross-validation as resampling techniques, adding more complexity<a class="headerlink" href="#part-h-cross-validation-as-resampling-techniques-adding-more-complexity" title="Link to this heading">#</a></h3>
<h3>Part h): Cross-validation as resampling techniques, adding more complexity<a class="headerlink" href="#part-h-cross-validation-as-resampling-techniques-adding-more-complexity" title="Link to this heading">#</a></h3>
<p>The aim here is to implement another widely popular
resampling technique, the so-called cross-validation method.</p>
<p>Implement the <span class="math notranslate nohighlight">\(k\)</span>-fold cross-validation algorithm (feel free to use
@@ -662,23 +692,23 @@ include both Ridge and Lasso regression in the final analysis.</p>
<h2>Introduction to numerical projects<a class="headerlink" href="#introduction-to-numerical-projects" title="Link to this heading">#</a></h2>
<p>Here follows a brief recipe and recommendation on how to answer the various questions when preparing your answers.</p>
<ul class="simple">
<li><p>Give a short description of the nature of the problem and the eventual numerical methods you have used.</p></li>
<li><p>Give a short description of the nature of the problem and the eventual numerical methods you have used.</p></li>
<li><p>Describe the algorithm you have used and/or developed. Here you may find it convenient to use pseudocoding. In many cases you can describe the algorithm in the program itself.</p></li>
<li><p>Include the source code of your program. Comment your program properly. You should have the code at your GitHub/GitLab link. You can also place the code in an appendix of your report.</p></li>
<li><p>If possible, try to find analytic solutions, or known limits in order to test your program when developing the code.</p></li>
<li><p>Include your results either in figure form or in a table. Remember to label your results. All tables and figures should have relevant captions and labels on the axes.</p></li>
<li><p>Include your results either in figure form or in a table. Remember to label your results. All tables and figures should have relevant captions and labels on the axes.</p></li>
<li><p>Try to evaluate the reliabilty and numerical stability/precision of your results. If possible, include a qualitative and/or quantitative discussion of the numerical stability, eventual loss of precision etc.</p></li>
<li><p>Try to give an interpretation of you results in your answers to the problems.</p></li>
<li><p>Critique: if possible include your comments and reflections about the exercise, whether you felt you learnt something, ideas for improvements and other thoughts youve made when solving the exercise. We wish to keep this course at the interactive level and your comments can help us improve it.</p></li>
<li><p>Try to establish a practice where you log your work at the computerlab. You may find such a logbook very handy at later stages in your work, especially when you dont properly remember what a previous test version of your program did. Here you could also record the time spent on solving the exercise, various algorithms you may have tested or other topics which you feel worthy of mentioning.</p></li>
<li><p>Try to give an interpretation of you results in your answers to the problems.</p></li>
<li><p>Critique: if possible include your comments and reflections about the exercise, whether you felt you learnt something, ideas for improvements and other thoughts youve made when solving the exercise. We wish to keep this course at the interactive level and your comments can help us improve it.</p></li>
<li><p>Try to establish a practice where you log your work at the computerlab. You may find such a logbook very handy at later stages in your work, especially when you dont properly remember what a previous test version of your program did. Here you could also record the time spent on solving the exercise, various algorithms you may have tested or other topics which you feel worthy of mentioning.</p></li>
</ul>
</section>
<section id="format-for-electronic-delivery-of-report-and-programs">
<h2>Format for electronic delivery of report and programs<a class="headerlink" href="#format-for-electronic-delivery-of-report-and-programs" title="Link to this heading">#</a></h2>
<p>The preferred format for the report is a PDF file. You can also use DOC or postscript formats or as an ipython notebook file. As programming language we prefer that you choose between C/C++, Fortran2008, Julia or Python. The following prescription should be followed when preparing the report:</p>
<p>The preferred format for the report is a PDF file. You can also use DOC or postscript formats or as an ipython notebook file. As programming language we prefer that you choose between C/C++, Fortran2008, Julia or Python. The following prescription should be followed when preparing the report:</p>
<ul class="simple">
<li><p>Use Canvas to hand in your projects, log in at <a class="reference external" href="https://www.uio.no/english/services/it/education/canvas/">https://www.uio.no/english/services/it/education/canvas/</a> with your normal UiO username and password.</p></li>
<li><p>Upload <strong>only</strong> the report file or the link to your GitHub/GitLab or similar typo of repos! For the source code file(s) you have developed please provide us with your link to your GitHub/GitLab or similar domain. The report file should include all of your discussions and a list of the codes you have developed. Do not include library files which are available at the course homepage, unless you have made specific changes to them.</p></li>
<li><p>Use Canvas to hand in your projects, log in at <a class="reference external" href="https://www.uio.no/english/services/it/education/canvas/">https://www.uio.no/english/services/it/education/canvas/</a> with your normal UiO username and password.</p></li>
<li><p>Upload <strong>only</strong> the report file or the link to your GitHub/GitLab or similar typo of repos! For the source code file(s) you have developed please provide us with your link to your GitHub/GitLab or similar domain. The report file should include all of your discussions and a list of the codes you have developed. Do not include library files which are available at the course homepage, unless you have made specific changes to them.</p></li>
<li><p>In your GitHub/GitLab or similar repository, please include a folder which contains selected results. These can be in the form of output from your code for a selected set of runs and input parameters.</p></li>
</ul>
<p>Finally,
@@ -702,13 +732,13 @@ for a seamless installation of additional software via for example</p>
<p>For Linux users, with its variety of distributions like for example the widely popular Ubuntu distribution
you can use <strong>pip</strong> as well and simply install Python as</p>
<ol class="arabic simple">
<li><p>sudo apt-get install python3 (or python for python2.7)</p></li>
<li><p>sudo apt-get install python3 (or python for python2.7)</p></li>
</ol>
<p>etc etc.</p>
<p>If you dont want to install various Python packages with their dependencies separately, we recommend two widely used distrubutions which set up all relevant dependencies for Python, namely</p>
<p>If you dont want to install various Python packages with their dependencies separately, we recommend two widely used distrubutions which set up all relevant dependencies for Python, namely</p>
<ol class="arabic simple">
<li><p><a class="reference external" href="https://docs.anaconda.com/">Anaconda</a> Anaconda is an open source distribution of the Python and R programming languages for large-scale data processing, predictive analytics, and scientific computing, that aims to simplify package management and deployment. Package versions are managed by the package management system <strong>conda</strong></p></li>
<li><p><a class="reference external" href="https://www.enthought.com/product/canopy/">Enthought canopy</a> is a Python distribution for scientific and analytic computing distribution and analysis environment, available for free and under a commercial license.</p></li>
<li><p><a class="reference external" href="https://www.enthought.com/product/canopy/">Enthought canopy</a> is a Python distribution for scientific and analytic computing distribution and analysis environment, available for free and under a commercial license.</p></li>
</ol>
<p>Popular software packages written in Python for ML are</p>
<ul class="simple">
@@ -778,16 +808,17 @@ of code developers and contributors keeps increasing.</p>
</div>
<nav class="bd-toc-nav page-toc">
<ul class="visible nav section-nav flex-column">
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#deliverables">Deliverables</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#preamble-note-on-writing-reports-using-reference-material-ai-and-other-tools">Preamble: Note on writing reports, using reference material, AI and other tools</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#regression-analysis-and-resampling-methods">Regression analysis and resampling methods</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#part-a-ordinary-least-square-ols-for-the-runge-function">Part a : Ordinary Least Square (OLS) for the Runge function</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#part-b-adding-ridge-regression-for-the-runge-function">Part b: Adding Ridge regression for the Runge function</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#part-b-adding-ridge-regression-for-the-runge-function">Part b: Adding Ridge regression for the Runge function</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#part-c-writing-your-own-gradient-descent-code">Part c: Writing your own gradient descent code</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#part-d-including-momentum-and-more-advanced-ways-to-update-the-learning-the-rate">Part d: Including momentum and more advanced ways to update the learning the rate</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#part-e-writing-our-own-code-for-lasso-regression">Part e: Writing our own code for Lasso regression</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#part-f-stochastic-gradient-descent">Part f: Stochastic gradient descent</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#part-g-bias-variance-trade-off-and-resampling-techniques">Part g: Bias-variance trade-off and resampling techniques</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#part-h-cross-validation-as-resampling-techniques-adding-more-complexity">Part h): Cross-validation as resampling techniques, adding more complexity</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#part-h-cross-validation-as-resampling-techniques-adding-more-complexity">Part h): Cross-validation as resampling techniques, adding more complexity</a></li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#background-literature">Background literature</a></li>