update
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>19. Exercises week 34 — Applied Data Analysis and Machine Learning</title>
|
||||
<title>Exercises week 34 — Applied Data Analysis and Machine Learning</title>
|
||||
|
||||
<link href="_static/css/theme.css" rel="stylesheet">
|
||||
<link href="_static/css/index.ff1ffe594081f20da1ef19478df9384b.css" rel="stylesheet">
|
||||
@@ -55,7 +55,7 @@ const thebe_selector_output = ".output, .cell_output"
|
||||
<script defer="defer" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="20. Week 34: Introduction to the course, Logistics and Practicalities" href="week34.html" />
|
||||
<link rel="next" title="Week 34: Introduction to the course, Logistics and Practicalities" href="week34.html" />
|
||||
<link rel="prev" title="17. Recurrent neural networks: Overarching view" href="chapter13.html" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="docsearch:language" content="None">
|
||||
@@ -250,12 +250,22 @@ const thebe_selector_output = ".output, .cell_output"
|
||||
<ul class="current nav bd-sidenav">
|
||||
<li class="toctree-l1 current active">
|
||||
<a class="current reference internal" href="#">
|
||||
19. Exercises week 34
|
||||
Exercises week 34
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l1">
|
||||
<a class="reference internal" href="week34.html">
|
||||
20. Week 34: Introduction to the course, Logistics and Practicalities
|
||||
Week 34: Introduction to the course, Logistics and Practicalities
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l1">
|
||||
<a class="reference internal" href="exercisesweek35.html">
|
||||
Exercises week 35
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l1">
|
||||
<a class="reference internal" href="week35.html">
|
||||
Week 35: From Ordinary Linear Regression to Ridge and Lasso Regression
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -331,22 +341,22 @@ const thebe_selector_output = ".output, .cell_output"
|
||||
<ul class="visible nav section-nav flex-column">
|
||||
<li class="toc-h2 nav-item toc-entry">
|
||||
<a class="reference internal nav-link" href="#exercises">
|
||||
19.1. Exercises
|
||||
Exercises
|
||||
</a>
|
||||
</li>
|
||||
<li class="toc-h2 nav-item toc-entry">
|
||||
<a class="reference internal nav-link" href="#exercise-1-setting-up-various-python-environments">
|
||||
19.2. Exercise 1: Setting up various Python environments
|
||||
Exercise 1: Setting up various Python environments
|
||||
</a>
|
||||
</li>
|
||||
<li class="toc-h2 nav-item toc-entry">
|
||||
<a class="reference internal nav-link" href="#exercise-2-making-your-own-data-and-exploring-scikit-learn">
|
||||
19.3. Exercise 2: making your own data and exploring scikit-learn
|
||||
Exercise 2: making your own data and exploring scikit-learn
|
||||
</a>
|
||||
</li>
|
||||
<li class="toc-h2 nav-item toc-entry">
|
||||
<a class="reference internal nav-link" href="#exercise-3-split-data-in-test-and-training-data">
|
||||
19.4. Exercise 3: Split data in test and training data
|
||||
Exercise 3: Split data in test and training data
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -371,22 +381,22 @@ const thebe_selector_output = ".output, .cell_output"
|
||||
<ul class="visible nav section-nav flex-column">
|
||||
<li class="toc-h2 nav-item toc-entry">
|
||||
<a class="reference internal nav-link" href="#exercises">
|
||||
19.1. Exercises
|
||||
Exercises
|
||||
</a>
|
||||
</li>
|
||||
<li class="toc-h2 nav-item toc-entry">
|
||||
<a class="reference internal nav-link" href="#exercise-1-setting-up-various-python-environments">
|
||||
19.2. Exercise 1: Setting up various Python environments
|
||||
Exercise 1: Setting up various Python environments
|
||||
</a>
|
||||
</li>
|
||||
<li class="toc-h2 nav-item toc-entry">
|
||||
<a class="reference internal nav-link" href="#exercise-2-making-your-own-data-and-exploring-scikit-learn">
|
||||
19.3. Exercise 2: making your own data and exploring scikit-learn
|
||||
Exercise 2: making your own data and exploring scikit-learn
|
||||
</a>
|
||||
</li>
|
||||
<li class="toc-h2 nav-item toc-entry">
|
||||
<a class="reference internal nav-link" href="#exercise-3-split-data-in-test-and-training-data">
|
||||
19.4. Exercise 3: Split data in test and training data
|
||||
Exercise 3: Split data in test and training data
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -401,15 +411,15 @@ const thebe_selector_output = ".output, .cell_output"
|
||||
<!-- HTML file automatically generated from DocOnce source (https://github.com/doconce/doconce/)
|
||||
doconce format html exercisesweek34.do.txt -->
|
||||
<!-- dom:TITLE: Exercises week 34 --><div class="tex2jax_ignore mathjax_ignore section" id="exercises-week-34">
|
||||
<h1><span class="section-number">19. </span>Exercises week 34<a class="headerlink" href="#exercises-week-34" title="Permalink to this headline">¶</a></h1>
|
||||
<h1>Exercises week 34<a class="headerlink" href="#exercises-week-34" title="Permalink to this headline">¶</a></h1>
|
||||
<p><strong>FYS-STK3155/4155</strong></p>
|
||||
<p>Date: <strong>August 21-25, 2023</strong></p>
|
||||
<div class="section" id="exercises">
|
||||
<h2><span class="section-number">19.1. </span>Exercises<a class="headerlink" href="#exercises" title="Permalink to this headline">¶</a></h2>
|
||||
<h2>Exercises<a class="headerlink" href="#exercises" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Here are three possible exercises for week 34</p>
|
||||
</div>
|
||||
<div class="section" id="exercise-1-setting-up-various-python-environments">
|
||||
<h2><span class="section-number">19.2. </span>Exercise 1: Setting up various Python environments<a class="headerlink" href="#exercise-1-setting-up-various-python-environments" title="Permalink to this headline">¶</a></h2>
|
||||
<h2>Exercise 1: Setting up various Python environments<a class="headerlink" href="#exercise-1-setting-up-various-python-environments" title="Permalink to this headline">¶</a></h2>
|
||||
<p>The first exercise here is of a mere technical art. We want you to have</p>
|
||||
<ul class="simple">
|
||||
<li><p>git as a version control software and to establish a user account on a provider like GitHub. Other providers like GitLab etc are equally fine. You can also use the University of Oslo <a class="reference external" href="https://www.uio.no/tjenester/it/maskin/filer/versjonskontroll/github.html">GitHub facilities</a>.</p></li>
|
||||
@@ -465,7 +475,7 @@ license.</p>
|
||||
<p>We recommend using <strong>Anaconda</strong> if you are not too familiar with setting paths in a terminal environment.</p>
|
||||
</div>
|
||||
<div class="section" id="exercise-2-making-your-own-data-and-exploring-scikit-learn">
|
||||
<h2><span class="section-number">19.3. </span>Exercise 2: making your own data and exploring scikit-learn<a class="headerlink" href="#exercise-2-making-your-own-data-and-exploring-scikit-learn" title="Permalink to this headline">¶</a></h2>
|
||||
<h2>Exercise 2: making your own data and exploring scikit-learn<a class="headerlink" href="#exercise-2-making-your-own-data-and-exploring-scikit-learn" title="Permalink to this headline">¶</a></h2>
|
||||
<p>We will generate our own dataset for a function <span class="math notranslate nohighlight">\(y(x)\)</span> where <span class="math notranslate nohighlight">\(x \in [0,1]\)</span> and defined by random numbers computed with the uniform distribution. The function <span class="math notranslate nohighlight">\(y\)</span> is a quadratic polynomial in <span class="math notranslate nohighlight">\(x\)</span> with added stochastic noise according to the normal distribution <span class="math notranslate nohighlight">\(\cal {N}(0,1)\)</span>.
|
||||
The following simple Python instructions define our <span class="math notranslate nohighlight">\(x\)</span> and <span class="math notranslate nohighlight">\(y\)</span> values (with 100 data points).</p>
|
||||
<div class="cell docutils container">
|
||||
@@ -512,7 +522,7 @@ R^2(\boldsymbol{y}, \tilde{\boldsymbol{y}}) = 1 - \frac{\sum_{i=0}^{n - 1} (y_i
|
||||
Discuss the meaning of these results. Try also to vary the coefficient in front of the added stochastic noise term and discuss the quality of the fits.</p>
|
||||
</div>
|
||||
<div class="section" id="exercise-3-split-data-in-test-and-training-data">
|
||||
<h2><span class="section-number">19.4. </span>Exercise 3: Split data in test and training data<a class="headerlink" href="#exercise-3-split-data-in-test-and-training-data" title="Permalink to this headline">¶</a></h2>
|
||||
<h2>Exercise 3: Split data in test and training data<a class="headerlink" href="#exercise-3-split-data-in-test-and-training-data" title="Permalink to this headline">¶</a></h2>
|
||||
<p>In this exercise we want you to to compute the MSE for the training
|
||||
data and the test data as function of the complexity of a polynomial,
|
||||
that is the degree of a given polynomial.</p>
|
||||
@@ -575,7 +585,7 @@ Add now a model which allows you to make polynomials up to degree <span class="m
|
||||
<a class='right-next' id="next-link" href="week34.html" title="next page">
|
||||
<div class="prev-next-info">
|
||||
<p class="prev-next-subtitle">next</p>
|
||||
<p class="prev-next-title"><span class="section-number">20. </span>Week 34: Introduction to the course, Logistics and Practicalities</p>
|
||||
<p class="prev-next-title">Week 34: Introduction to the course, Logistics and Practicalities</p>
|
||||
</div>
|
||||
<i class="fas fa-angle-right"></i>
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user