From 06588d18e6ececd69932b0a7daeef8bc7f9fa16d Mon Sep 17 00:00:00 2001
From: Morten Hjorth-Jensen
Date: Sun, 28 Aug 2022 22:48:30 +0200
Subject: [PATCH] update week 35
---
doc/pub/week35/html/._week35-bs000.html | 32 +-
doc/pub/week35/html/._week35-bs001.html | 34 +-
doc/pub/week35/html/._week35-bs002.html | 32 +-
doc/pub/week35/html/._week35-bs003.html | 32 +-
doc/pub/week35/html/._week35-bs004.html | 32 +-
doc/pub/week35/html/._week35-bs005.html | 32 +-
doc/pub/week35/html/._week35-bs006.html | 32 +-
doc/pub/week35/html/._week35-bs007.html | 32 +-
doc/pub/week35/html/._week35-bs008.html | 32 +-
doc/pub/week35/html/._week35-bs009.html | 32 +-
doc/pub/week35/html/._week35-bs010.html | 32 +-
doc/pub/week35/html/._week35-bs011.html | 32 +-
doc/pub/week35/html/._week35-bs012.html | 32 +-
doc/pub/week35/html/._week35-bs013.html | 32 +-
doc/pub/week35/html/._week35-bs014.html | 32 +-
doc/pub/week35/html/._week35-bs015.html | 32 +-
doc/pub/week35/html/._week35-bs016.html | 32 +-
doc/pub/week35/html/._week35-bs017.html | 32 +-
doc/pub/week35/html/._week35-bs018.html | 32 +-
doc/pub/week35/html/._week35-bs019.html | 32 +-
doc/pub/week35/html/._week35-bs020.html | 32 +-
doc/pub/week35/html/._week35-bs021.html | 32 +-
doc/pub/week35/html/._week35-bs022.html | 32 +-
doc/pub/week35/html/._week35-bs023.html | 32 +-
doc/pub/week35/html/._week35-bs024.html | 32 +-
doc/pub/week35/html/._week35-bs025.html | 32 +-
doc/pub/week35/html/._week35-bs026.html | 32 +-
doc/pub/week35/html/._week35-bs027.html | 32 +-
doc/pub/week35/html/._week35-bs028.html | 32 +-
doc/pub/week35/html/._week35-bs029.html | 32 +-
doc/pub/week35/html/._week35-bs030.html | 32 +-
doc/pub/week35/html/._week35-bs031.html | 32 +-
doc/pub/week35/html/._week35-bs032.html | 32 +-
doc/pub/week35/html/._week35-bs033.html | 32 +-
doc/pub/week35/html/._week35-bs034.html | 32 +-
doc/pub/week35/html/._week35-bs035.html | 32 +-
doc/pub/week35/html/._week35-bs036.html | 32 +-
doc/pub/week35/html/._week35-bs037.html | 32 +-
doc/pub/week35/html/._week35-bs038.html | 32 +-
doc/pub/week35/html/._week35-bs039.html | 32 +-
doc/pub/week35/html/._week35-bs040.html | 32 +-
doc/pub/week35/html/._week35-bs041.html | 32 +-
doc/pub/week35/html/._week35-bs042.html | 32 +-
doc/pub/week35/html/._week35-bs043.html | 32 +-
doc/pub/week35/html/._week35-bs044.html | 32 +-
doc/pub/week35/html/._week35-bs045.html | 32 +-
doc/pub/week35/html/._week35-bs046.html | 32 +-
doc/pub/week35/html/._week35-bs047.html | 32 +-
doc/pub/week35/html/._week35-bs048.html | 32 +-
doc/pub/week35/html/._week35-bs049.html | 32 +-
doc/pub/week35/html/._week35-bs050.html | 32 +-
doc/pub/week35/html/._week35-bs051.html | 32 +-
doc/pub/week35/html/._week35-bs052.html | 32 +-
doc/pub/week35/html/._week35-bs053.html | 32 +-
doc/pub/week35/html/._week35-bs054.html | 32 +-
doc/pub/week35/html/._week35-bs055.html | 32 +-
doc/pub/week35/html/._week35-bs056.html | 32 +-
doc/pub/week35/html/._week35-bs057.html | 32 +-
doc/pub/week35/html/._week35-bs058.html | 32 +-
doc/pub/week35/html/._week35-bs059.html | 32 +-
doc/pub/week35/html/._week35-bs060.html | 32 +-
doc/pub/week35/html/._week35-bs061.html | 32 +-
doc/pub/week35/html/._week35-bs062.html | 32 +-
doc/pub/week35/html/._week35-bs063.html | 32 +-
doc/pub/week35/html/._week35-bs064.html | 32 +-
doc/pub/week35/html/._week35-bs065.html | 32 +-
doc/pub/week35/html/._week35-bs066.html | 32 +-
doc/pub/week35/html/._week35-bs067.html | 32 +-
doc/pub/week35/html/._week35-bs068.html | 32 +-
doc/pub/week35/html/._week35-bs069.html | 630 +++++---
doc/pub/week35/html/week35-bs.html | 32 +-
doc/pub/week35/html/week35-reveal.html | 602 +++++---
doc/pub/week35/html/week35-solarized.html | 609 +++++---
doc/pub/week35/html/week35.html | 609 +++++---
doc/pub/week35/ipynb/ipynb-week35-src.tar.gz | Bin 192 -> 192 bytes
doc/pub/week35/ipynb/week35.ipynb | 1408 ++++++++++--------
doc/src/week35/week35.do.txt | 442 +++---
77 files changed, 4271 insertions(+), 2271 deletions(-)
diff --git a/doc/pub/week35/html/._week35-bs000.html b/doc/pub/week35/html/._week35-bs000.html
index 606fe872d..5bd60570c 100644
--- a/doc/pub/week35/html/._week35-bs000.html
+++ b/doc/pub/week35/html/._week35-bs000.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs001.html b/doc/pub/week35/html/._week35-bs001.html
index a4291f69b..2a5dad845 100644
--- a/doc/pub/week35/html/._week35-bs001.html
+++ b/doc/pub/week35/html/._week35-bs001.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
@@ -377,7 +389,7 @@ MathJax.Hub.Config({
Plans for week 35
-- Lab Wednesday: Work on exercises 1-5 for week 35
+- Lab Wednesday: Work on exercises 1-5 for week 35, see end of these slides for the exercises
- Thursday: Review of ordinary Least Squares with applications, reminder on statistics and start discussion of Ridge Regression and Singular Value Decom\
position
diff --git a/doc/pub/week35/html/._week35-bs002.html b/doc/pub/week35/html/._week35-bs002.html
index 0ce2ba91a..53d9313cd 100644
--- a/doc/pub/week35/html/._week35-bs002.html
+++ b/doc/pub/week35/html/._week35-bs002.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs003.html b/doc/pub/week35/html/._week35-bs003.html
index 9424da969..7ee424d58 100644
--- a/doc/pub/week35/html/._week35-bs003.html
+++ b/doc/pub/week35/html/._week35-bs003.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs004.html b/doc/pub/week35/html/._week35-bs004.html
index d13140e20..3f32e5034 100644
--- a/doc/pub/week35/html/._week35-bs004.html
+++ b/doc/pub/week35/html/._week35-bs004.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs005.html b/doc/pub/week35/html/._week35-bs005.html
index f649741c3..3b94b3cd1 100644
--- a/doc/pub/week35/html/._week35-bs005.html
+++ b/doc/pub/week35/html/._week35-bs005.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs006.html b/doc/pub/week35/html/._week35-bs006.html
index 1200ab2bf..14b5eb092 100644
--- a/doc/pub/week35/html/._week35-bs006.html
+++ b/doc/pub/week35/html/._week35-bs006.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs007.html b/doc/pub/week35/html/._week35-bs007.html
index 4ce795658..9e39f5ca8 100644
--- a/doc/pub/week35/html/._week35-bs007.html
+++ b/doc/pub/week35/html/._week35-bs007.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs008.html b/doc/pub/week35/html/._week35-bs008.html
index dd230d219..6aeef9813 100644
--- a/doc/pub/week35/html/._week35-bs008.html
+++ b/doc/pub/week35/html/._week35-bs008.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs009.html b/doc/pub/week35/html/._week35-bs009.html
index 4d51f75f7..1e78943d1 100644
--- a/doc/pub/week35/html/._week35-bs009.html
+++ b/doc/pub/week35/html/._week35-bs009.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs010.html b/doc/pub/week35/html/._week35-bs010.html
index a1f678b63..f33ba8596 100644
--- a/doc/pub/week35/html/._week35-bs010.html
+++ b/doc/pub/week35/html/._week35-bs010.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs011.html b/doc/pub/week35/html/._week35-bs011.html
index 555b7e388..125f862e2 100644
--- a/doc/pub/week35/html/._week35-bs011.html
+++ b/doc/pub/week35/html/._week35-bs011.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs012.html b/doc/pub/week35/html/._week35-bs012.html
index fc9fda447..64d1f1f73 100644
--- a/doc/pub/week35/html/._week35-bs012.html
+++ b/doc/pub/week35/html/._week35-bs012.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs013.html b/doc/pub/week35/html/._week35-bs013.html
index 0b20d9403..688ebcc0f 100644
--- a/doc/pub/week35/html/._week35-bs013.html
+++ b/doc/pub/week35/html/._week35-bs013.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs014.html b/doc/pub/week35/html/._week35-bs014.html
index b1a71c23f..75b237e62 100644
--- a/doc/pub/week35/html/._week35-bs014.html
+++ b/doc/pub/week35/html/._week35-bs014.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs015.html b/doc/pub/week35/html/._week35-bs015.html
index 281118582..1f887b4d1 100644
--- a/doc/pub/week35/html/._week35-bs015.html
+++ b/doc/pub/week35/html/._week35-bs015.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs016.html b/doc/pub/week35/html/._week35-bs016.html
index 71b7f3769..b1033ab7c 100644
--- a/doc/pub/week35/html/._week35-bs016.html
+++ b/doc/pub/week35/html/._week35-bs016.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs017.html b/doc/pub/week35/html/._week35-bs017.html
index d28a3371d..63fddb812 100644
--- a/doc/pub/week35/html/._week35-bs017.html
+++ b/doc/pub/week35/html/._week35-bs017.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs018.html b/doc/pub/week35/html/._week35-bs018.html
index 58a71c1ec..54f0644cd 100644
--- a/doc/pub/week35/html/._week35-bs018.html
+++ b/doc/pub/week35/html/._week35-bs018.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs019.html b/doc/pub/week35/html/._week35-bs019.html
index 2f177682a..e9e01b629 100644
--- a/doc/pub/week35/html/._week35-bs019.html
+++ b/doc/pub/week35/html/._week35-bs019.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs020.html b/doc/pub/week35/html/._week35-bs020.html
index c137569a3..b67a55047 100644
--- a/doc/pub/week35/html/._week35-bs020.html
+++ b/doc/pub/week35/html/._week35-bs020.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs021.html b/doc/pub/week35/html/._week35-bs021.html
index 1e937e8c3..266f879ea 100644
--- a/doc/pub/week35/html/._week35-bs021.html
+++ b/doc/pub/week35/html/._week35-bs021.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs022.html b/doc/pub/week35/html/._week35-bs022.html
index 5b97a3888..6f8345e97 100644
--- a/doc/pub/week35/html/._week35-bs022.html
+++ b/doc/pub/week35/html/._week35-bs022.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs023.html b/doc/pub/week35/html/._week35-bs023.html
index 7b03f5840..6cd283ebf 100644
--- a/doc/pub/week35/html/._week35-bs023.html
+++ b/doc/pub/week35/html/._week35-bs023.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs024.html b/doc/pub/week35/html/._week35-bs024.html
index 4ee2a42c7..e955dd36a 100644
--- a/doc/pub/week35/html/._week35-bs024.html
+++ b/doc/pub/week35/html/._week35-bs024.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs025.html b/doc/pub/week35/html/._week35-bs025.html
index 5aa466894..2c2bc339d 100644
--- a/doc/pub/week35/html/._week35-bs025.html
+++ b/doc/pub/week35/html/._week35-bs025.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs026.html b/doc/pub/week35/html/._week35-bs026.html
index 47957d36a..f5f3c0418 100644
--- a/doc/pub/week35/html/._week35-bs026.html
+++ b/doc/pub/week35/html/._week35-bs026.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs027.html b/doc/pub/week35/html/._week35-bs027.html
index 206210fda..259eaecd1 100644
--- a/doc/pub/week35/html/._week35-bs027.html
+++ b/doc/pub/week35/html/._week35-bs027.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs028.html b/doc/pub/week35/html/._week35-bs028.html
index 1b1988c77..e2ce6e47a 100644
--- a/doc/pub/week35/html/._week35-bs028.html
+++ b/doc/pub/week35/html/._week35-bs028.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs029.html b/doc/pub/week35/html/._week35-bs029.html
index 8ee3a9a7c..c7d5f87b8 100644
--- a/doc/pub/week35/html/._week35-bs029.html
+++ b/doc/pub/week35/html/._week35-bs029.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs030.html b/doc/pub/week35/html/._week35-bs030.html
index c9478012e..be6154485 100644
--- a/doc/pub/week35/html/._week35-bs030.html
+++ b/doc/pub/week35/html/._week35-bs030.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs031.html b/doc/pub/week35/html/._week35-bs031.html
index 70b80d405..341ca524d 100644
--- a/doc/pub/week35/html/._week35-bs031.html
+++ b/doc/pub/week35/html/._week35-bs031.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs032.html b/doc/pub/week35/html/._week35-bs032.html
index 5bdd50f32..3058fd63b 100644
--- a/doc/pub/week35/html/._week35-bs032.html
+++ b/doc/pub/week35/html/._week35-bs032.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs033.html b/doc/pub/week35/html/._week35-bs033.html
index 3b1e03484..fd8548485 100644
--- a/doc/pub/week35/html/._week35-bs033.html
+++ b/doc/pub/week35/html/._week35-bs033.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs034.html b/doc/pub/week35/html/._week35-bs034.html
index 11acc507d..94c2acef2 100644
--- a/doc/pub/week35/html/._week35-bs034.html
+++ b/doc/pub/week35/html/._week35-bs034.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs035.html b/doc/pub/week35/html/._week35-bs035.html
index a3d2507ae..6fcebdfb7 100644
--- a/doc/pub/week35/html/._week35-bs035.html
+++ b/doc/pub/week35/html/._week35-bs035.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs036.html b/doc/pub/week35/html/._week35-bs036.html
index af570ad01..8f6b000ec 100644
--- a/doc/pub/week35/html/._week35-bs036.html
+++ b/doc/pub/week35/html/._week35-bs036.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs037.html b/doc/pub/week35/html/._week35-bs037.html
index e269b9a09..58448d18a 100644
--- a/doc/pub/week35/html/._week35-bs037.html
+++ b/doc/pub/week35/html/._week35-bs037.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs038.html b/doc/pub/week35/html/._week35-bs038.html
index 38cf353e4..95c1ea294 100644
--- a/doc/pub/week35/html/._week35-bs038.html
+++ b/doc/pub/week35/html/._week35-bs038.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs039.html b/doc/pub/week35/html/._week35-bs039.html
index 81f7e615b..176431b9d 100644
--- a/doc/pub/week35/html/._week35-bs039.html
+++ b/doc/pub/week35/html/._week35-bs039.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs040.html b/doc/pub/week35/html/._week35-bs040.html
index e81dd3679..7cc650fe3 100644
--- a/doc/pub/week35/html/._week35-bs040.html
+++ b/doc/pub/week35/html/._week35-bs040.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs041.html b/doc/pub/week35/html/._week35-bs041.html
index 6b8b15aa8..7561c0a5e 100644
--- a/doc/pub/week35/html/._week35-bs041.html
+++ b/doc/pub/week35/html/._week35-bs041.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs042.html b/doc/pub/week35/html/._week35-bs042.html
index e698f45ac..e2fa59084 100644
--- a/doc/pub/week35/html/._week35-bs042.html
+++ b/doc/pub/week35/html/._week35-bs042.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs043.html b/doc/pub/week35/html/._week35-bs043.html
index ef67fc0fc..b3d5c52df 100644
--- a/doc/pub/week35/html/._week35-bs043.html
+++ b/doc/pub/week35/html/._week35-bs043.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs044.html b/doc/pub/week35/html/._week35-bs044.html
index 762ec7f57..258a2b6f0 100644
--- a/doc/pub/week35/html/._week35-bs044.html
+++ b/doc/pub/week35/html/._week35-bs044.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs045.html b/doc/pub/week35/html/._week35-bs045.html
index 8b2c6afbf..a2b622763 100644
--- a/doc/pub/week35/html/._week35-bs045.html
+++ b/doc/pub/week35/html/._week35-bs045.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs046.html b/doc/pub/week35/html/._week35-bs046.html
index 9ac3e58c1..ceea54733 100644
--- a/doc/pub/week35/html/._week35-bs046.html
+++ b/doc/pub/week35/html/._week35-bs046.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs047.html b/doc/pub/week35/html/._week35-bs047.html
index 6362977ee..121b0d5ea 100644
--- a/doc/pub/week35/html/._week35-bs047.html
+++ b/doc/pub/week35/html/._week35-bs047.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs048.html b/doc/pub/week35/html/._week35-bs048.html
index 60d69583a..23f90c2a3 100644
--- a/doc/pub/week35/html/._week35-bs048.html
+++ b/doc/pub/week35/html/._week35-bs048.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs049.html b/doc/pub/week35/html/._week35-bs049.html
index 47910efef..715cd5f97 100644
--- a/doc/pub/week35/html/._week35-bs049.html
+++ b/doc/pub/week35/html/._week35-bs049.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs050.html b/doc/pub/week35/html/._week35-bs050.html
index 5e20e6f3a..e082f1b15 100644
--- a/doc/pub/week35/html/._week35-bs050.html
+++ b/doc/pub/week35/html/._week35-bs050.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs051.html b/doc/pub/week35/html/._week35-bs051.html
index db05aee14..53ab92816 100644
--- a/doc/pub/week35/html/._week35-bs051.html
+++ b/doc/pub/week35/html/._week35-bs051.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs052.html b/doc/pub/week35/html/._week35-bs052.html
index f2eba5f51..f46219fd3 100644
--- a/doc/pub/week35/html/._week35-bs052.html
+++ b/doc/pub/week35/html/._week35-bs052.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs053.html b/doc/pub/week35/html/._week35-bs053.html
index c25fa0fe1..34f8fb769 100644
--- a/doc/pub/week35/html/._week35-bs053.html
+++ b/doc/pub/week35/html/._week35-bs053.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs054.html b/doc/pub/week35/html/._week35-bs054.html
index 7de57365b..921bf87cd 100644
--- a/doc/pub/week35/html/._week35-bs054.html
+++ b/doc/pub/week35/html/._week35-bs054.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs055.html b/doc/pub/week35/html/._week35-bs055.html
index d3717e807..6490140af 100644
--- a/doc/pub/week35/html/._week35-bs055.html
+++ b/doc/pub/week35/html/._week35-bs055.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs056.html b/doc/pub/week35/html/._week35-bs056.html
index 0eaa49395..ec3940f20 100644
--- a/doc/pub/week35/html/._week35-bs056.html
+++ b/doc/pub/week35/html/._week35-bs056.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs057.html b/doc/pub/week35/html/._week35-bs057.html
index 898259aa2..ccde149d7 100644
--- a/doc/pub/week35/html/._week35-bs057.html
+++ b/doc/pub/week35/html/._week35-bs057.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs058.html b/doc/pub/week35/html/._week35-bs058.html
index 22f4ae81a..f5f5d37ec 100644
--- a/doc/pub/week35/html/._week35-bs058.html
+++ b/doc/pub/week35/html/._week35-bs058.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs059.html b/doc/pub/week35/html/._week35-bs059.html
index 1fac57f80..f6c48c491 100644
--- a/doc/pub/week35/html/._week35-bs059.html
+++ b/doc/pub/week35/html/._week35-bs059.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs060.html b/doc/pub/week35/html/._week35-bs060.html
index c7a5b0ee7..bbfc551eb 100644
--- a/doc/pub/week35/html/._week35-bs060.html
+++ b/doc/pub/week35/html/._week35-bs060.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs061.html b/doc/pub/week35/html/._week35-bs061.html
index 353a2f9ac..d56a89d60 100644
--- a/doc/pub/week35/html/._week35-bs061.html
+++ b/doc/pub/week35/html/._week35-bs061.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs062.html b/doc/pub/week35/html/._week35-bs062.html
index 44a3580f2..c1ad8acbf 100644
--- a/doc/pub/week35/html/._week35-bs062.html
+++ b/doc/pub/week35/html/._week35-bs062.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs063.html b/doc/pub/week35/html/._week35-bs063.html
index 5d0def676..0b3b94698 100644
--- a/doc/pub/week35/html/._week35-bs063.html
+++ b/doc/pub/week35/html/._week35-bs063.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs064.html b/doc/pub/week35/html/._week35-bs064.html
index a26f8fb55..15c66cae4 100644
--- a/doc/pub/week35/html/._week35-bs064.html
+++ b/doc/pub/week35/html/._week35-bs064.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs065.html b/doc/pub/week35/html/._week35-bs065.html
index 0293b7af2..7beeed95e 100644
--- a/doc/pub/week35/html/._week35-bs065.html
+++ b/doc/pub/week35/html/._week35-bs065.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs066.html b/doc/pub/week35/html/._week35-bs066.html
index b388595b0..7763701c6 100644
--- a/doc/pub/week35/html/._week35-bs066.html
+++ b/doc/pub/week35/html/._week35-bs066.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs067.html b/doc/pub/week35/html/._week35-bs067.html
index 59a6b0992..4b44d008c 100644
--- a/doc/pub/week35/html/._week35-bs067.html
+++ b/doc/pub/week35/html/._week35-bs067.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs068.html b/doc/pub/week35/html/._week35-bs068.html
index 21b44423c..fc7128313 100644
--- a/doc/pub/week35/html/._week35-bs068.html
+++ b/doc/pub/week35/html/._week35-bs068.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/._week35-bs069.html b/doc/pub/week35/html/._week35-bs069.html
index edb16a8df..cb9194933 100644
--- a/doc/pub/week35/html/._week35-bs069.html
+++ b/doc/pub/week35/html/._week35-bs069.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
@@ -374,18 +386,395 @@ MathJax.Hub.Config({
-Exercises for week 36, September 6-10
+Exercises for week 35
The exercises here are meant to prepare you for work with project 1. The first exercise is a follow-up of exercise 2 from week 35 August 30-September 3).
-Exercise 1: Adding Ridge and Lasso Regression
+Exercise 1: Setting up various Python environments
-This exercise is a continuation of exercise 2 from exercise set 1
-(week 35, August 30-September 3). We will use the same function to
+
The first exercise here is of a mere technical art. We want you to have
+
+- 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 GitHub facilities.
+- Install various Python packages
+
+We will make extensive use of Python as programming language and its
+myriad of available libraries. You will find
+IPython/Jupyter notebooks invaluable in your work. You can run R
+codes in the Jupyter/IPython notebooks, with the immediate benefit of
+visualizing your data. You can also use compiled languages like C++,
+Rust, Fortran etc if you prefer. The focus in these lectures will be
+on Python.
+
+
+If you have Python installed (we recommend Python3) and you feel
+pretty familiar with installing different packages, we recommend that
+you install the following Python packages via pip as
+
+
+
+- pip install numpy scipy matplotlib ipython scikit-learn sympy pandas pillow
+
+For Tensorflow, we recommend following the instructions in the text of
+Aurelien Geron, Hands‑On Machine Learning with Scikit‑Learn and TensorFlow, O'Reilly
+
+
+We will come back to tensorflow later.
+
+For Python3, replace pip with pip3.
+
+For OSX users we recommend, after having installed Xcode, to
+install brew. Brew allows for a seamless installation of additional
+software via for example
+
+
+
+- brew install python3
+
+For Linux users, with its variety of distributions like for example the widely popular Ubuntu distribution,
+you can use pip as well and simply install Python as
+
+
+
+- sudo apt-get install python3 (or python for Python2.7)
+
+If you don't want to perform these operations separately and venture
+into the hassle of exploring how to set up dependencies and paths, we
+recommend two widely used distrubutions which set up all relevant
+dependencies for Python, namely
+
+
+
+which 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 conda.
+
+
+
+is a Python
+distribution for scientific and analytic computing distribution and
+analysis environment, available for free and under a commercial
+license.
+
+
+We recommend using Anaconda if you are not too familiar with setting paths in a terminal environment.
+
+
+
+
+Exercise 2: making your own data and exploring scikit-learn
+
+We will generate our own dataset for a function \( y(x) \) where \( x \in [0,1] \) and defined by random numbers computed with the uniform distribution. The function \( y \) is a quadratic polynomial in \( x \) with added stochastic noise according to the normal distribution \( \cal {N}(0,1) \).
+The following simple Python instructions define our \( x \) and \( y \) values (with 100 data points).
+
+
+
+
+
+
+
+- Write your own code (following the examples under the regression notes) for computing the parametrization of the data set fitting a second-order polynomial.
+- Use thereafter scikit-learn (see again the examples in the regression slides) and compare with your own code.
+- Using scikit-learn, compute also the mean square error, a risk metric corresponding to the expected value of the squared (quadratic) error defined as
+
+$$ MSE(\boldsymbol{y},\boldsymbol{\tilde{y}}) = \frac{1}{n}
+\sum_{i=0}^{n-1}(y_i-\tilde{y}_i)^2,
+$$
+
+and the \( R^2 \) score function.
+If \( \tilde{\boldsymbol{y}}_i \) is the predicted value of the \( i-th \) sample and \( y_i \) is the corresponding true value, then the score \( R^2 \) is defined as
+
+$$
+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},
+$$
+
+where we have defined the mean value of \( \boldsymbol{y} \) as
+$$
+\bar{y} = \frac{1}{n} \sum_{i=0}^{n - 1} y_i.
+$$
+
+You can use the functionality included in scikit-learn. If you feel for it, you can use your own program and define functions which compute the above two functions.
+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.
+
+
+
+
+
+
+
+
+
+Solution.
+
+
+
+
+
+
The code here is an example of where we define our own design matrix and fit parameters \( \beta \).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Exercise 3: Normalizing our data
+
+A much used approach before starting to train the data is to preprocess our
+data. Normally the data may need a rescaling and/or may be sensitive
+to extreme values. Scaling the data renders our inputs much more
+suitable for the algorithms we want to employ.
+
+
+Scikit-Learn has several functions which allow us to rescale the
+data, normally resulting in much better results in terms of various
+accuracy scores. The StandardScaler function in Scikit-Learn
+ensures that for each feature/predictor we study the mean value is
+zero and the variance is one (every column in the design/feature
+matrix). This scaling has the drawback that it does not ensure that
+we have a particular maximum or minimum in our data set. Another
+function included in Scikit-Learn is the MinMaxScaler which
+ensures that all features are exactly between \( 0 \) and \( 1 \). The
+
+
+The Normalizer scales each data
+point such that the feature vector has a euclidean length of one. In other words, it
+projects a data point on the circle (or sphere in the case of higher dimensions) with a
+radius of 1. This means every data point is scaled by a different number (by the
+inverse of it’s length).
+This normalization is often used when only the direction (or angle) of the data matters,
+not the length of the feature vector.
+
+
+The RobustScaler works similarly to the StandardScaler in that it
+ensures statistical properties for each feature that guarantee that
+they are on the same scale. However, the RobustScaler uses the median
+and quartiles, instead of mean and variance. This makes the
+RobustScaler ignore data points that are very different from the rest
+(like measurement errors). These odd data points are also called
+outliers, and might often lead to trouble for other scaling
+techniques.
+
+
+It also common to split the data in a training set and a testing set. A typical split is to use \( 80\% \) of the data for training and the rest
+for testing. This can be done as follows with our design matrix \( \boldsymbol{X} \) and data \( \boldsymbol{y} \) (remember to import scikit-learn)
+
+
+
+
+
+Then we can use the standard scaler to scale our data as
+
+
+
+
+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. We want you also to compute the \( R2 \) score as function of the complexity of the model for both training data and test data. You should also run the calculation with and without scaling.
+
+
+One of
+the aims is to reproduce Figure 2.11 of Hastie et al.
+
+
+Our data is defined by \( x\in [-3,3] \) with a total of for example \( 100 \) data points.
+
+
+
+
+where \( y \) is the function we want to fit with a given polynomial.
+
+
+
+a)
+Write a first code which sets up a design matrix \( X \) defined by a fifth-order polynomial. Scale your data and split it in training and test data.
+
+
+
+
+
+
+b)
+Perform an ordinary least squares and compute the means squared error and the \( R2 \) factor for the training data and the test data, with and without scaling.
+
+
+
+
+
+
+c)
+Add now a model which allows you to make polynomials up to degree \( 15 \). Perform a standard OLS fitting of the training data and compute the MSE and \( R2 \) for the training and test data and plot both test and training data MSE and \( R2 \) as functions of the polynomial degree. Compare what you see with Figure 2.11 of Hastie et al. Comment your results. For which polynomial degree do you find an optimal MSE (smallest value)?
+
+
+
+
+
+
+
+Exercise 4: Adding Ridge Regression
+
+This exercise is a continuation of exercise 2. We will use the same function to
generate our data set, still staying with a simple function \( y(x) \)
which we want to fit using linear regression, but now extending the
-analysis to include the Ridge and the Lasso regression methods.
+analysis to include the Ridge regression method.
We will thus again generate our own dataset for a function \( y(x) \) where
@@ -540,205 +929,40 @@ $$
\bar{y} = \frac{1}{n} \sum_{i=0}^{n - 1} y_i.
$$
-
Discuss these quantities as functions of the variable \( \lambda \) in the Ridge and Lasso regression methods.
-Exercise: Linear Regression for a two-dimensional function
+Discuss these quantities as functions of the variable \( \lambda \) in Ridge regression.
-This is a longer exercise and the aim is to study in more detail various
-regression methods, including the Ordinary Least Squares (OLS) method,
-Ridge regression and finally Lasso regression.
-This exercise forms a part of project 1.
+
+
+
+
Exercise 5: Analytical exercises
+
+In this exercise we derive the expressions for various derivatives of
+products of vectors and matrices. Such derivatives are central to the
+optimization of various cost functions. Although we will often use
+automatic differentiation in actual calculations, to be able to have
+analytical expressions is extremely helpful in case we have simpler
+derivatives as well as when we analyze various properties (like second
+derivatives) of the chosen cost functions. Vectors are always written
+as boldfaced lower case letters and matrices as upper case boldfaced
+letters.
-We will study how to fit polynomials to a specific
-two-dimensional function called Franke's
-function. This
-is a function which has been widely used when testing various
-interpolation and fitting algorithms.
-
-
-The Franke function, which is a weighted sum of four exponentials reads as follows
+Show that
$$
-\begin{align*}
-f(x,y) &= \frac{3}{4}\exp{\left(-\frac{(9x-2)^2}{4} - \frac{(9y-2)^2}{4}\right)}+\frac{3}{4}\exp{\left(-\frac{(9x+1)^2}{49}- \frac{(9y+1)}{10}\right)} \\
-&+\frac{1}{2}\exp{\left(-\frac{(9x-7)^2}{4} - \frac{(9y-3)^2}{4}\right)} -\frac{1}{5}\exp{\left(-(9x-4)^2 - (9y-7)^2\right) }.
-\end{align*}
+\frac{\partial (\boldsymbol{b}^T\boldsymbol{a})}{\partial \boldsymbol{a}} = \boldsymbol{b},
$$
-The function will be defined for \( x,y\in [0,1] \). Our first step will
-be to perform an OLS regression analysis of this function, trying out
-a polynomial fit with an \( x \) and \( y \) dependence of the form \( [x, y,
-x^2, y^2, xy, \dots] \). We will fit a
-function (for example a polynomial) of \( x \) and \( y \). Thereafter we
-will repeat much of the same procedure using the Ridge and Lasso
-regression methods, introducing thus a dependence on the bias
-(penalty) \( \lambda \).
-
-
-The Python fucntion for the Franke function is included here (it performs also a three-dimensional plot of it)
-
-
-
-
-We will generate our own dataset for a function
-\( \mathrm{FrankeFunction}(x,y) \) with \( x,y \in [0,1] \). The function
-\( f(x,y) \) is the Franke function. You should explore also the addition
-an added stochastic noise to this function using the normal
-distribution \( \cal{N}(0,1) \).
-
-
-Write your own code (using either a matrix inversion or a singular
-value decomposition from e.g., numpy ) or use your code and perform a standard least square regression
-analysis using polynomials in \( x \) and \( y \) up to fifth order. You can use scikit-learn as well.
-
-
-Evaluate the Mean Squared error (MSE)
-
-$$ MSE(\hat{y},\hat{\tilde{y}}) = \frac{1}{n}
-\sum_{i=0}^{n-1}(y_i-\tilde{y}_i)^2,
+and
+$$
+\frac{\partial (\boldsymbol{a}^T\boldsymbol{A}\boldsymbol{a})}{\partial \boldsymbol{a}} = (\boldsymbol{A}+\boldsymbol{A}^T)\boldsymbol{a},
$$
-and the \( R^2 \) score function. If \( \tilde{\hat{y}}_i \) is the predicted
-value of the \( i-th \) sample and \( y_i \) is the corresponding true value,
-then the score \( R^2 \) is defined as
-
-
+and
$$
-R^2(\hat{y}, \tilde{\hat{y}}) = 1 - \frac{\sum_{i=0}^{n - 1} (y_i - \tilde{y}_i)^2}{\sum_{i=0}^{n - 1} (y_i - \bar{y})^2},
+\frac{\partial \left(\boldsymbol{x}-\boldsymbol{A}\boldsymbol{s}\right)^T\left(\boldsymbol{x}-\boldsymbol{A}\boldsymbol{s}\right)}{\partial \boldsymbol{s}} = -2\left(\boldsymbol{x}-\boldsymbol{A}\boldsymbol{s}\right)^T\boldsymbol{A},
$$
-where we have defined the mean value of \( \hat{y} \) as
-
-$$
-\bar{y} = \frac{1}{n} \sum_{i=0}^{n - 1} y_i.
-$$
-
-You should split your data in train and test and also consider scaling the data.
-
-To set up the design matrix, the following code can be used
-
-
-
-
-Write then your own code for the Ridge method or use Scikit-Learn.
-Perform the same analysis as you did for ordinary Least Squares (for the same polynomials) but now for different values of \( \lambda \). Compare and
-analyze your results with those obtained with ordinary Least Squares. Study the
-dependence on \( \lambda \).
-
-
-This part is essentially a repeat of the previous ones, but now
-with Lasso regression. Write either your own code or
-use the functionalities of Scikit-Learn (recommended).
-Give a
-critical discussion of the three methods and a judgement of which
-model fits the data best.
-
+and finally find the second derivative of this function with respect to the vector \( \boldsymbol{s} \).
diff --git a/doc/pub/week35/html/week35-bs.html b/doc/pub/week35/html/week35-bs.html
index 606fe872d..5bd60570c 100644
--- a/doc/pub/week35/html/week35-bs.html
+++ b/doc/pub/week35/html/week35-bs.html
@@ -245,18 +245,27 @@ doconce format html week35.do.txt --html_style=bootstrap --pygments_html_style=d
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -360,9 +369,12 @@ MathJax.Hub.Config({
Interpreting the Ridge results
More interpretations
Deriving the Lasso Regression Equations
- Exercises for week 36, September 6-10
- Exercise 1: Adding Ridge and Lasso Regression
- Exercise: Linear Regression for a two-dimensional function
+ Exercises for week 35
+ Exercise 1: Setting up various Python environments
+ Exercise 2: making your own data and exploring scikit-learn
+ Exercise 3: Normalizing our data
+ Exercise 4: Adding Ridge Regression
+ Exercise 5: Analytical exercises
diff --git a/doc/pub/week35/html/week35-reveal.html b/doc/pub/week35/html/week35-reveal.html
index d38d1af35..a96fd8065 100644
--- a/doc/pub/week35/html/week35-reveal.html
+++ b/doc/pub/week35/html/week35-reveal.html
@@ -198,7 +198,7 @@ MathJax.Hub.Config({
Plans for week 35
-- Lab Wednesday: Work on exercises 1-5 for week 35
+- Lab Wednesday: Work on exercises 1-5 for week 35, see end of these slides for the exercises
- Thursday: Review of ordinary Least Squares with applications, reminder on statistics and start discussion of Ridge Regression and Singular Value Decom\
@@ -3494,18 +3494,395 @@ $$
-Exercises for week 36, September 6-10
+Exercises for week 35
The exercises here are meant to prepare you for work with project 1. The first exercise is a follow-up of exercise 2 from week 35 August 30-September 3).
-Exercise 1: Adding Ridge and Lasso Regression
+Exercise 1: Setting up various Python environments
-This exercise is a continuation of exercise 2 from exercise set 1
-(week 35, August 30-September 3). We will use the same function to
+
The first exercise here is of a mere technical art. We want you to have
+
+- 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 GitHub facilities.
+- Install various Python packages
+
+
+
We will make extensive use of Python as programming language and its
+myriad of available libraries. You will find
+IPython/Jupyter notebooks invaluable in your work. You can run R
+codes in the Jupyter/IPython notebooks, with the immediate benefit of
+visualizing your data. You can also use compiled languages like C++,
+Rust, Fortran etc if you prefer. The focus in these lectures will be
+on Python.
+
+
+If you have Python installed (we recommend Python3) and you feel
+pretty familiar with installing different packages, we recommend that
+you install the following Python packages via pip as
+
+
+
+- pip install numpy scipy matplotlib ipython scikit-learn sympy pandas pillow
+
+
+
For Tensorflow, we recommend following the instructions in the text of
+Aurelien Geron, Hands‑On Machine Learning with Scikit‑Learn and TensorFlow, O'Reilly
+
+
+We will come back to tensorflow later.
+
+For Python3, replace pip with pip3.
+
+For OSX users we recommend, after having installed Xcode, to
+install brew. Brew allows for a seamless installation of additional
+software via for example
+
+
+
+- brew install python3
+
+
+
For Linux users, with its variety of distributions like for example the widely popular Ubuntu distribution,
+you can use pip as well and simply install Python as
+
+
+
+- sudo apt-get install python3 (or python for Python2.7)
+
+
+
If you don't want to perform these operations separately and venture
+into the hassle of exploring how to set up dependencies and paths, we
+recommend two widely used distrubutions which set up all relevant
+dependencies for Python, namely
+
+
+
+
+
which 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 conda.
+
+
+
+
+
is a Python
+distribution for scientific and analytic computing distribution and
+analysis environment, available for free and under a commercial
+license.
+
+
+We recommend using Anaconda if you are not too familiar with setting paths in a terminal environment.
+
+
+
+
+Exercise 2: making your own data and exploring scikit-learn
+
+We will generate our own dataset for a function \( y(x) \) where \( x \in [0,1] \) and defined by random numbers computed with the uniform distribution. The function \( y \) is a quadratic polynomial in \( x \) with added stochastic noise according to the normal distribution \( \cal {N}(0,1) \).
+The following simple Python instructions define our \( x \) and \( y \) values (with 100 data points).
+
+
+
+
+
+
+
+- Write your own code (following the examples under the regression notes) for computing the parametrization of the data set fitting a second-order polynomial.
+- Use thereafter scikit-learn (see again the examples in the regression slides) and compare with your own code.
+
+- Using scikit-learn, compute also the mean square error, a risk metric corresponding to the expected value of the squared (quadratic) error defined as
+
+
+
+$$ MSE(\boldsymbol{y},\boldsymbol{\tilde{y}}) = \frac{1}{n}
+\sum_{i=0}^{n-1}(y_i-\tilde{y}_i)^2,
+$$
+
+
+
and the \( R^2 \) score function.
+If \( \tilde{\boldsymbol{y}}_i \) is the predicted value of the \( i-th \) sample and \( y_i \) is the corresponding true value, then the score \( R^2 \) is defined as
+
+
+$$
+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},
+$$
+
+
+
where we have defined the mean value of \( \boldsymbol{y} \) as
+
+$$
+\bar{y} = \frac{1}{n} \sum_{i=0}^{n - 1} y_i.
+$$
+
+
+
You can use the functionality included in scikit-learn. If you feel for it, you can use your own program and define functions which compute the above two functions.
+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.
+
+
+
+
+Solution.
+The code here is an example of where we define our own design matrix and fit parameters \( \beta \).
+
+
+
+
+
+
+
+
+
+
+
+Exercise 3: Normalizing our data
+
+A much used approach before starting to train the data is to preprocess our
+data. Normally the data may need a rescaling and/or may be sensitive
+to extreme values. Scaling the data renders our inputs much more
+suitable for the algorithms we want to employ.
+
+
+Scikit-Learn has several functions which allow us to rescale the
+data, normally resulting in much better results in terms of various
+accuracy scores. The StandardScaler function in Scikit-Learn
+ensures that for each feature/predictor we study the mean value is
+zero and the variance is one (every column in the design/feature
+matrix). This scaling has the drawback that it does not ensure that
+we have a particular maximum or minimum in our data set. Another
+function included in Scikit-Learn is the MinMaxScaler which
+ensures that all features are exactly between \( 0 \) and \( 1 \). The
+
+
+The Normalizer scales each data
+point such that the feature vector has a euclidean length of one. In other words, it
+projects a data point on the circle (or sphere in the case of higher dimensions) with a
+radius of 1. This means every data point is scaled by a different number (by the
+inverse of it’s length).
+This normalization is often used when only the direction (or angle) of the data matters,
+not the length of the feature vector.
+
+
+The RobustScaler works similarly to the StandardScaler in that it
+ensures statistical properties for each feature that guarantee that
+they are on the same scale. However, the RobustScaler uses the median
+and quartiles, instead of mean and variance. This makes the
+RobustScaler ignore data points that are very different from the rest
+(like measurement errors). These odd data points are also called
+outliers, and might often lead to trouble for other scaling
+techniques.
+
+
+It also common to split the data in a training set and a testing set. A typical split is to use \( 80\% \) of the data for training and the rest
+for testing. This can be done as follows with our design matrix \( \boldsymbol{X} \) and data \( \boldsymbol{y} \) (remember to import scikit-learn)
+
+
+
+
+
+Then we can use the standard scaler to scale our data as
+
+
+
+
+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. We want you also to compute the \( R2 \) score as function of the complexity of the model for both training data and test data. You should also run the calculation with and without scaling.
+
+
+One of
+the aims is to reproduce Figure 2.11 of Hastie et al.
+
+
+Our data is defined by \( x\in [-3,3] \) with a total of for example \( 100 \) data points.
+
+
+
+
+where \( y \) is the function we want to fit with a given polynomial.
+
+
+
+a)
+Write a first code which sets up a design matrix \( X \) defined by a fifth-order polynomial. Scale your data and split it in training and test data.
+
+
+
+
+
+
+b)
+Perform an ordinary least squares and compute the means squared error and the \( R2 \) factor for the training data and the test data, with and without scaling.
+
+
+
+
+
+
+c)
+Add now a model which allows you to make polynomials up to degree \( 15 \). Perform a standard OLS fitting of the training data and compute the MSE and \( R2 \) for the training and test data and plot both test and training data MSE and \( R2 \) as functions of the polynomial degree. Compare what you see with Figure 2.11 of Hastie et al. Comment your results. For which polynomial degree do you find an optimal MSE (smallest value)?
+
+
+
+
+
+
+
+Exercise 4: Adding Ridge Regression
+
+This exercise is a continuation of exercise 2. We will use the same function to
generate our data set, still staying with a simple function \( y(x) \)
which we want to fit using linear regression, but now extending the
-analysis to include the Ridge and the Lasso regression methods.
+analysis to include the Ridge regression method.
We will thus again generate our own dataset for a function \( y(x) \) where
@@ -3666,213 +4043,46 @@ $$
$$
-
Discuss these quantities as functions of the variable \( \lambda \) in the Ridge and Lasso regression methods.
-Exercise: Linear Regression for a two-dimensional function
+Discuss these quantities as functions of the variable \( \lambda \) in Ridge regression.
-This is a longer exercise and the aim is to study in more detail various
-regression methods, including the Ordinary Least Squares (OLS) method,
-Ridge regression and finally Lasso regression.
-This exercise forms a part of project 1.
+
+
+
+
Exercise 5: Analytical exercises
+
+In this exercise we derive the expressions for various derivatives of
+products of vectors and matrices. Such derivatives are central to the
+optimization of various cost functions. Although we will often use
+automatic differentiation in actual calculations, to be able to have
+analytical expressions is extremely helpful in case we have simpler
+derivatives as well as when we analyze various properties (like second
+derivatives) of the chosen cost functions. Vectors are always written
+as boldfaced lower case letters and matrices as upper case boldfaced
+letters.
-We will study how to fit polynomials to a specific
-two-dimensional function called Franke's
-function. This
-is a function which has been widely used when testing various
-interpolation and fitting algorithms.
-
-
-The Franke function, which is a weighted sum of four exponentials reads as follows
+Show that
$$
-\begin{align*}
-f(x,y) &= \frac{3}{4}\exp{\left(-\frac{(9x-2)^2}{4} - \frac{(9y-2)^2}{4}\right)}+\frac{3}{4}\exp{\left(-\frac{(9x+1)^2}{49}- \frac{(9y+1)}{10}\right)} \\
-&+\frac{1}{2}\exp{\left(-\frac{(9x-7)^2}{4} - \frac{(9y-3)^2}{4}\right)} -\frac{1}{5}\exp{\left(-(9x-4)^2 - (9y-7)^2\right) }.
-\end{align*}
+\frac{\partial (\boldsymbol{b}^T\boldsymbol{a})}{\partial \boldsymbol{a}} = \boldsymbol{b},
$$
-
The function will be defined for \( x,y\in [0,1] \). Our first step will
-be to perform an OLS regression analysis of this function, trying out
-a polynomial fit with an \( x \) and \( y \) dependence of the form \( [x, y,
-x^2, y^2, xy, \dots] \). We will fit a
-function (for example a polynomial) of \( x \) and \( y \). Thereafter we
-will repeat much of the same procedure using the Ridge and Lasso
-regression methods, introducing thus a dependence on the bias
-(penalty) \( \lambda \).
-
-
-The Python fucntion for the Franke function is included here (it performs also a three-dimensional plot of it)
-
-
-
-
-We will generate our own dataset for a function
-\( \mathrm{FrankeFunction}(x,y) \) with \( x,y \in [0,1] \). The function
-\( f(x,y) \) is the Franke function. You should explore also the addition
-an added stochastic noise to this function using the normal
-distribution \( \cal{N}(0,1) \).
-
-
-Write your own code (using either a matrix inversion or a singular
-value decomposition from e.g., numpy ) or use your code and perform a standard least square regression
-analysis using polynomials in \( x \) and \( y \) up to fifth order. You can use scikit-learn as well.
-
-
-Evaluate the Mean Squared error (MSE)
-
+and
-$$ MSE(\hat{y},\hat{\tilde{y}}) = \frac{1}{n}
-\sum_{i=0}^{n-1}(y_i-\tilde{y}_i)^2,
+$$
+\frac{\partial (\boldsymbol{a}^T\boldsymbol{A}\boldsymbol{a})}{\partial \boldsymbol{a}} = (\boldsymbol{A}+\boldsymbol{A}^T)\boldsymbol{a},
$$
-
and the \( R^2 \) score function. If \( \tilde{\hat{y}}_i \) is the predicted
-value of the \( i-th \) sample and \( y_i \) is the corresponding true value,
-then the score \( R^2 \) is defined as
-
-
+and
$$
-R^2(\hat{y}, \tilde{\hat{y}}) = 1 - \frac{\sum_{i=0}^{n - 1} (y_i - \tilde{y}_i)^2}{\sum_{i=0}^{n - 1} (y_i - \bar{y})^2},
+\frac{\partial \left(\boldsymbol{x}-\boldsymbol{A}\boldsymbol{s}\right)^T\left(\boldsymbol{x}-\boldsymbol{A}\boldsymbol{s}\right)}{\partial \boldsymbol{s}} = -2\left(\boldsymbol{x}-\boldsymbol{A}\boldsymbol{s}\right)^T\boldsymbol{A},
$$
-
where we have defined the mean value of \( \hat{y} \) as
-
-
-$$
-\bar{y} = \frac{1}{n} \sum_{i=0}^{n - 1} y_i.
-$$
-
-
-
You should split your data in train and test and also consider scaling the data.
-
-To set up the design matrix, the following code can be used
-
-
-
-
-Write then your own code for the Ridge method or use Scikit-Learn.
-Perform the same analysis as you did for ordinary Least Squares (for the same polynomials) but now for different values of \( \lambda \). Compare and
-analyze your results with those obtained with ordinary Least Squares. Study the
-dependence on \( \lambda \).
-
-
-This part is essentially a repeat of the previous ones, but now
-with Lasso regression. Write either your own code or
-use the functionalities of Scikit-Learn (recommended).
-Give a
-critical discussion of the three methods and a judgement of which
-model fits the data best.
-
+and finally find the second derivative of this function with respect to the vector \( \boldsymbol{s} \).
diff --git a/doc/pub/week35/html/week35-solarized.html b/doc/pub/week35/html/week35-solarized.html
index 8477cb689..091c14384 100644
--- a/doc/pub/week35/html/week35-solarized.html
+++ b/doc/pub/week35/html/week35-solarized.html
@@ -272,18 +272,27 @@ div.toc p,a {
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -329,7 +338,7 @@ MathJax.Hub.Config({
Plans for week 35
-- Lab Wednesday: Work on exercises 1-5 for week 35
+- Lab Wednesday: Work on exercises 1-5 for week 35, see end of these slides for the exercises
- Thursday: Review of ordinary Least Squares with applications, reminder on statistics and start discussion of Ridge Regression and Singular Value Decom\
position
@@ -3323,18 +3332,381 @@ $$
This equation does not lead to a nice analytical equation as in either Ridge regression or ordinary least squares. This equation can however be solved by using standard convex optimization algorithms using for example the Python package CVXOPT. We will discuss this later.
-Exercises for week 36, September 6-10
+Exercises for week 35
The exercises here are meant to prepare you for work with project 1. The first exercise is a follow-up of exercise 2 from week 35 August 30-September 3).
-Exercise 1: Adding Ridge and Lasso Regression
+Exercise 1: Setting up various Python environments
-This exercise is a continuation of exercise 2 from exercise set 1
-(week 35, August 30-September 3). We will use the same function to
+
The first exercise here is of a mere technical art. We want you to have
+
+- 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 GitHub facilities.
+- Install various Python packages
+
+We will make extensive use of Python as programming language and its
+myriad of available libraries. You will find
+IPython/Jupyter notebooks invaluable in your work. You can run R
+codes in the Jupyter/IPython notebooks, with the immediate benefit of
+visualizing your data. You can also use compiled languages like C++,
+Rust, Fortran etc if you prefer. The focus in these lectures will be
+on Python.
+
+
+If you have Python installed (we recommend Python3) and you feel
+pretty familiar with installing different packages, we recommend that
+you install the following Python packages via pip as
+
+
+
+- pip install numpy scipy matplotlib ipython scikit-learn sympy pandas pillow
+
+For Tensorflow, we recommend following the instructions in the text of
+Aurelien Geron, Hands‑On Machine Learning with Scikit‑Learn and TensorFlow, O'Reilly
+
+
+We will come back to tensorflow later.
+
+For Python3, replace pip with pip3.
+
+For OSX users we recommend, after having installed Xcode, to
+install brew. Brew allows for a seamless installation of additional
+software via for example
+
+
+
+- brew install python3
+
+For Linux users, with its variety of distributions like for example the widely popular Ubuntu distribution,
+you can use pip as well and simply install Python as
+
+
+
+- sudo apt-get install python3 (or python for Python2.7)
+
+If you don't want to perform these operations separately and venture
+into the hassle of exploring how to set up dependencies and paths, we
+recommend two widely used distrubutions which set up all relevant
+dependencies for Python, namely
+
+
+
+which 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 conda.
+
+
+
+is a Python
+distribution for scientific and analytic computing distribution and
+analysis environment, available for free and under a commercial
+license.
+
+
+We recommend using Anaconda if you are not too familiar with setting paths in a terminal environment.
+
+
+
+
+Exercise 2: making your own data and exploring scikit-learn
+
+We will generate our own dataset for a function \( y(x) \) where \( x \in [0,1] \) and defined by random numbers computed with the uniform distribution. The function \( y \) is a quadratic polynomial in \( x \) with added stochastic noise according to the normal distribution \( \cal {N}(0,1) \).
+The following simple Python instructions define our \( x \) and \( y \) values (with 100 data points).
+
+
+
+
+
+
+
+- Write your own code (following the examples under the regression notes) for computing the parametrization of the data set fitting a second-order polynomial.
+- Use thereafter scikit-learn (see again the examples in the regression slides) and compare with your own code.
+- Using scikit-learn, compute also the mean square error, a risk metric corresponding to the expected value of the squared (quadratic) error defined as
+
+$$ MSE(\boldsymbol{y},\boldsymbol{\tilde{y}}) = \frac{1}{n}
+\sum_{i=0}^{n-1}(y_i-\tilde{y}_i)^2,
+$$
+
+and the \( R^2 \) score function.
+If \( \tilde{\boldsymbol{y}}_i \) is the predicted value of the \( i-th \) sample and \( y_i \) is the corresponding true value, then the score \( R^2 \) is defined as
+
+$$
+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},
+$$
+
+where we have defined the mean value of \( \boldsymbol{y} \) as
+$$
+\bar{y} = \frac{1}{n} \sum_{i=0}^{n - 1} y_i.
+$$
+
+You can use the functionality included in scikit-learn. If you feel for it, you can use your own program and define functions which compute the above two functions.
+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.
+
+
+
+
+Solution.
+The code here is an example of where we define our own design matrix and fit parameters \( \beta \).
+
+
+
+
+
+
+
+
+
+
+
+Exercise 3: Normalizing our data
+
+A much used approach before starting to train the data is to preprocess our
+data. Normally the data may need a rescaling and/or may be sensitive
+to extreme values. Scaling the data renders our inputs much more
+suitable for the algorithms we want to employ.
+
+
+Scikit-Learn has several functions which allow us to rescale the
+data, normally resulting in much better results in terms of various
+accuracy scores. The StandardScaler function in Scikit-Learn
+ensures that for each feature/predictor we study the mean value is
+zero and the variance is one (every column in the design/feature
+matrix). This scaling has the drawback that it does not ensure that
+we have a particular maximum or minimum in our data set. Another
+function included in Scikit-Learn is the MinMaxScaler which
+ensures that all features are exactly between \( 0 \) and \( 1 \). The
+
+
+The Normalizer scales each data
+point such that the feature vector has a euclidean length of one. In other words, it
+projects a data point on the circle (or sphere in the case of higher dimensions) with a
+radius of 1. This means every data point is scaled by a different number (by the
+inverse of it’s length).
+This normalization is often used when only the direction (or angle) of the data matters,
+not the length of the feature vector.
+
+
+The RobustScaler works similarly to the StandardScaler in that it
+ensures statistical properties for each feature that guarantee that
+they are on the same scale. However, the RobustScaler uses the median
+and quartiles, instead of mean and variance. This makes the
+RobustScaler ignore data points that are very different from the rest
+(like measurement errors). These odd data points are also called
+outliers, and might often lead to trouble for other scaling
+techniques.
+
+
+It also common to split the data in a training set and a testing set. A typical split is to use \( 80\% \) of the data for training and the rest
+for testing. This can be done as follows with our design matrix \( \boldsymbol{X} \) and data \( \boldsymbol{y} \) (remember to import scikit-learn)
+
+
+
+
+
+Then we can use the standard scaler to scale our data as
+
+
+
+
+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. We want you also to compute the \( R2 \) score as function of the complexity of the model for both training data and test data. You should also run the calculation with and without scaling.
+
+
+One of
+the aims is to reproduce Figure 2.11 of Hastie et al.
+
+
+Our data is defined by \( x\in [-3,3] \) with a total of for example \( 100 \) data points.
+
+
+
+
+where \( y \) is the function we want to fit with a given polynomial.
+
+
+
+a)
+Write a first code which sets up a design matrix \( X \) defined by a fifth-order polynomial. Scale your data and split it in training and test data.
+
+
+
+
+
+
+b)
+Perform an ordinary least squares and compute the means squared error and the \( R2 \) factor for the training data and the test data, with and without scaling.
+
+
+
+
+
+
+c)
+Add now a model which allows you to make polynomials up to degree \( 15 \). Perform a standard OLS fitting of the training data and compute the MSE and \( R2 \) for the training and test data and plot both test and training data MSE and \( R2 \) as functions of the polynomial degree. Compare what you see with Figure 2.11 of Hastie et al. Comment your results. For which polynomial degree do you find an optimal MSE (smallest value)?
+
+
+
+
+
+
+
+Exercise 4: Adding Ridge Regression
+
+This exercise is a continuation of exercise 2. We will use the same function to
generate our data set, still staying with a simple function \( y(x) \)
which we want to fit using linear regression, but now extending the
-analysis to include the Ridge and the Lasso regression methods.
+analysis to include the Ridge regression method.
We will thus again generate our own dataset for a function \( y(x) \) where
@@ -3489,205 +3861,40 @@ $$
\bar{y} = \frac{1}{n} \sum_{i=0}^{n - 1} y_i.
$$
-
Discuss these quantities as functions of the variable \( \lambda \) in the Ridge and Lasso regression methods.
-Exercise: Linear Regression for a two-dimensional function
+Discuss these quantities as functions of the variable \( \lambda \) in Ridge regression.
-This is a longer exercise and the aim is to study in more detail various
-regression methods, including the Ordinary Least Squares (OLS) method,
-Ridge regression and finally Lasso regression.
-This exercise forms a part of project 1.
+
+
+
+
Exercise 5: Analytical exercises
+
+In this exercise we derive the expressions for various derivatives of
+products of vectors and matrices. Such derivatives are central to the
+optimization of various cost functions. Although we will often use
+automatic differentiation in actual calculations, to be able to have
+analytical expressions is extremely helpful in case we have simpler
+derivatives as well as when we analyze various properties (like second
+derivatives) of the chosen cost functions. Vectors are always written
+as boldfaced lower case letters and matrices as upper case boldfaced
+letters.
-We will study how to fit polynomials to a specific
-two-dimensional function called Franke's
-function. This
-is a function which has been widely used when testing various
-interpolation and fitting algorithms.
-
-
-The Franke function, which is a weighted sum of four exponentials reads as follows
+Show that
$$
-\begin{align*}
-f(x,y) &= \frac{3}{4}\exp{\left(-\frac{(9x-2)^2}{4} - \frac{(9y-2)^2}{4}\right)}+\frac{3}{4}\exp{\left(-\frac{(9x+1)^2}{49}- \frac{(9y+1)}{10}\right)} \\
-&+\frac{1}{2}\exp{\left(-\frac{(9x-7)^2}{4} - \frac{(9y-3)^2}{4}\right)} -\frac{1}{5}\exp{\left(-(9x-4)^2 - (9y-7)^2\right) }.
-\end{align*}
+\frac{\partial (\boldsymbol{b}^T\boldsymbol{a})}{\partial \boldsymbol{a}} = \boldsymbol{b},
$$
-The function will be defined for \( x,y\in [0,1] \). Our first step will
-be to perform an OLS regression analysis of this function, trying out
-a polynomial fit with an \( x \) and \( y \) dependence of the form \( [x, y,
-x^2, y^2, xy, \dots] \). We will fit a
-function (for example a polynomial) of \( x \) and \( y \). Thereafter we
-will repeat much of the same procedure using the Ridge and Lasso
-regression methods, introducing thus a dependence on the bias
-(penalty) \( \lambda \).
-
-
-The Python fucntion for the Franke function is included here (it performs also a three-dimensional plot of it)
-
-
-
-
-We will generate our own dataset for a function
-\( \mathrm{FrankeFunction}(x,y) \) with \( x,y \in [0,1] \). The function
-\( f(x,y) \) is the Franke function. You should explore also the addition
-an added stochastic noise to this function using the normal
-distribution \( \cal{N}(0,1) \).
-
-
-Write your own code (using either a matrix inversion or a singular
-value decomposition from e.g., numpy ) or use your code and perform a standard least square regression
-analysis using polynomials in \( x \) and \( y \) up to fifth order. You can use scikit-learn as well.
-
-
-Evaluate the Mean Squared error (MSE)
-
-$$ MSE(\hat{y},\hat{\tilde{y}}) = \frac{1}{n}
-\sum_{i=0}^{n-1}(y_i-\tilde{y}_i)^2,
+and
+$$
+\frac{\partial (\boldsymbol{a}^T\boldsymbol{A}\boldsymbol{a})}{\partial \boldsymbol{a}} = (\boldsymbol{A}+\boldsymbol{A}^T)\boldsymbol{a},
$$
-and the \( R^2 \) score function. If \( \tilde{\hat{y}}_i \) is the predicted
-value of the \( i-th \) sample and \( y_i \) is the corresponding true value,
-then the score \( R^2 \) is defined as
-
-
+and
$$
-R^2(\hat{y}, \tilde{\hat{y}}) = 1 - \frac{\sum_{i=0}^{n - 1} (y_i - \tilde{y}_i)^2}{\sum_{i=0}^{n - 1} (y_i - \bar{y})^2},
+\frac{\partial \left(\boldsymbol{x}-\boldsymbol{A}\boldsymbol{s}\right)^T\left(\boldsymbol{x}-\boldsymbol{A}\boldsymbol{s}\right)}{\partial \boldsymbol{s}} = -2\left(\boldsymbol{x}-\boldsymbol{A}\boldsymbol{s}\right)^T\boldsymbol{A},
$$
-where we have defined the mean value of \( \hat{y} \) as
-
-$$
-\bar{y} = \frac{1}{n} \sum_{i=0}^{n - 1} y_i.
-$$
-
-You should split your data in train and test and also consider scaling the data.
-
-To set up the design matrix, the following code can be used
-
-
-
-
-Write then your own code for the Ridge method or use Scikit-Learn.
-Perform the same analysis as you did for ordinary Least Squares (for the same polynomials) but now for different values of \( \lambda \). Compare and
-analyze your results with those obtained with ordinary Least Squares. Study the
-dependence on \( \lambda \).
-
-
-This part is essentially a repeat of the previous ones, but now
-with Lasso regression. Write either your own code or
-use the functionalities of Scikit-Learn (recommended).
-Give a
-critical discussion of the three methods and a judgement of which
-model fits the data best.
-
+and finally find the second derivative of this function with respect to the vector \( \boldsymbol{s} \).
diff --git a/doc/pub/week35/html/week35.html b/doc/pub/week35/html/week35.html
index 3390ec908..ccf5ad32f 100644
--- a/doc/pub/week35/html/week35.html
+++ b/doc/pub/week35/html/week35.html
@@ -349,18 +349,27 @@ div.toc p,a {
2,
None,
'deriving-the-lasso-regression-equations'),
- ('Exercises for week 36, September 6-10',
+ ('Exercises for week 35', 2, None, 'exercises-for-week-35'),
+ ('Exercise 1: Setting up various Python environments',
2,
None,
- 'exercises-for-week-36-september-6-10'),
- ('Exercise 1: Adding Ridge and Lasso Regression',
+ 'exercise-1-setting-up-various-python-environments'),
+ ('Exercise 2: making your own data and exploring scikit-learn',
2,
None,
- 'exercise-1-adding-ridge-and-lasso-regression'),
- ('Exercise: Linear Regression for a two-dimensional function',
- 3,
+ 'exercise-2-making-your-own-data-and-exploring-scikit-learn'),
+ ('Exercise 3: Normalizing our data',
+ 2,
None,
- 'exercise-linear-regression-for-a-two-dimensional-function')]}
+ 'exercise-3-normalizing-our-data'),
+ ('Exercise 4: Adding Ridge Regression',
+ 2,
+ None,
+ 'exercise-4-adding-ridge-regression'),
+ ('Exercise 5: Analytical exercises',
+ 2,
+ None,
+ 'exercise-5-analytical-exercises')]}
end of tocinfo -->
@@ -406,7 +415,7 @@ MathJax.Hub.Config({
Plans for week 35
-- Lab Wednesday: Work on exercises 1-5 for week 35
+- Lab Wednesday: Work on exercises 1-5 for week 35, see end of these slides for the exercises
- Thursday: Review of ordinary Least Squares with applications, reminder on statistics and start discussion of Ridge Regression and Singular Value Decom\
position
@@ -3400,18 +3409,381 @@ $$
This equation does not lead to a nice analytical equation as in either Ridge regression or ordinary least squares. This equation can however be solved by using standard convex optimization algorithms using for example the Python package CVXOPT. We will discuss this later.
-Exercises for week 36, September 6-10
+Exercises for week 35
The exercises here are meant to prepare you for work with project 1. The first exercise is a follow-up of exercise 2 from week 35 August 30-September 3).
-Exercise 1: Adding Ridge and Lasso Regression
+Exercise 1: Setting up various Python environments
-This exercise is a continuation of exercise 2 from exercise set 1
-(week 35, August 30-September 3). We will use the same function to
+
The first exercise here is of a mere technical art. We want you to have
+
+- 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 GitHub facilities.
+- Install various Python packages
+
+We will make extensive use of Python as programming language and its
+myriad of available libraries. You will find
+IPython/Jupyter notebooks invaluable in your work. You can run R
+codes in the Jupyter/IPython notebooks, with the immediate benefit of
+visualizing your data. You can also use compiled languages like C++,
+Rust, Fortran etc if you prefer. The focus in these lectures will be
+on Python.
+
+
+If you have Python installed (we recommend Python3) and you feel
+pretty familiar with installing different packages, we recommend that
+you install the following Python packages via pip as
+
+
+
+- pip install numpy scipy matplotlib ipython scikit-learn sympy pandas pillow
+
+For Tensorflow, we recommend following the instructions in the text of
+Aurelien Geron, Hands‑On Machine Learning with Scikit‑Learn and TensorFlow, O'Reilly
+
+
+We will come back to tensorflow later.
+
+For Python3, replace pip with pip3.
+
+For OSX users we recommend, after having installed Xcode, to
+install brew. Brew allows for a seamless installation of additional
+software via for example
+
+
+
+- brew install python3
+
+For Linux users, with its variety of distributions like for example the widely popular Ubuntu distribution,
+you can use pip as well and simply install Python as
+
+
+
+- sudo apt-get install python3 (or python for Python2.7)
+
+If you don't want to perform these operations separately and venture
+into the hassle of exploring how to set up dependencies and paths, we
+recommend two widely used distrubutions which set up all relevant
+dependencies for Python, namely
+
+
+
+which 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 conda.
+
+
+
+is a Python
+distribution for scientific and analytic computing distribution and
+analysis environment, available for free and under a commercial
+license.
+
+
+We recommend using Anaconda if you are not too familiar with setting paths in a terminal environment.
+
+
+
+
+Exercise 2: making your own data and exploring scikit-learn
+
+We will generate our own dataset for a function \( y(x) \) where \( x \in [0,1] \) and defined by random numbers computed with the uniform distribution. The function \( y \) is a quadratic polynomial in \( x \) with added stochastic noise according to the normal distribution \( \cal {N}(0,1) \).
+The following simple Python instructions define our \( x \) and \( y \) values (with 100 data points).
+
+
+
+
+
+
+
+- Write your own code (following the examples under the regression notes) for computing the parametrization of the data set fitting a second-order polynomial.
+- Use thereafter scikit-learn (see again the examples in the regression slides) and compare with your own code.
+- Using scikit-learn, compute also the mean square error, a risk metric corresponding to the expected value of the squared (quadratic) error defined as
+
+$$ MSE(\boldsymbol{y},\boldsymbol{\tilde{y}}) = \frac{1}{n}
+\sum_{i=0}^{n-1}(y_i-\tilde{y}_i)^2,
+$$
+
+and the \( R^2 \) score function.
+If \( \tilde{\boldsymbol{y}}_i \) is the predicted value of the \( i-th \) sample and \( y_i \) is the corresponding true value, then the score \( R^2 \) is defined as
+
+$$
+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},
+$$
+
+where we have defined the mean value of \( \boldsymbol{y} \) as
+$$
+\bar{y} = \frac{1}{n} \sum_{i=0}^{n - 1} y_i.
+$$
+
+You can use the functionality included in scikit-learn. If you feel for it, you can use your own program and define functions which compute the above two functions.
+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.
+
+
+
+
+Solution.
+The code here is an example of where we define our own design matrix and fit parameters \( \beta \).
+
+
+
+
+
+
+
+
+
+
+
+Exercise 3: Normalizing our data
+
+A much used approach before starting to train the data is to preprocess our
+data. Normally the data may need a rescaling and/or may be sensitive
+to extreme values. Scaling the data renders our inputs much more
+suitable for the algorithms we want to employ.
+
+
+Scikit-Learn has several functions which allow us to rescale the
+data, normally resulting in much better results in terms of various
+accuracy scores. The StandardScaler function in Scikit-Learn
+ensures that for each feature/predictor we study the mean value is
+zero and the variance is one (every column in the design/feature
+matrix). This scaling has the drawback that it does not ensure that
+we have a particular maximum or minimum in our data set. Another
+function included in Scikit-Learn is the MinMaxScaler which
+ensures that all features are exactly between \( 0 \) and \( 1 \). The
+
+
+The Normalizer scales each data
+point such that the feature vector has a euclidean length of one. In other words, it
+projects a data point on the circle (or sphere in the case of higher dimensions) with a
+radius of 1. This means every data point is scaled by a different number (by the
+inverse of it’s length).
+This normalization is often used when only the direction (or angle) of the data matters,
+not the length of the feature vector.
+
+
+The RobustScaler works similarly to the StandardScaler in that it
+ensures statistical properties for each feature that guarantee that
+they are on the same scale. However, the RobustScaler uses the median
+and quartiles, instead of mean and variance. This makes the
+RobustScaler ignore data points that are very different from the rest
+(like measurement errors). These odd data points are also called
+outliers, and might often lead to trouble for other scaling
+techniques.
+
+
+It also common to split the data in a training set and a testing set. A typical split is to use \( 80\% \) of the data for training and the rest
+for testing. This can be done as follows with our design matrix \( \boldsymbol{X} \) and data \( \boldsymbol{y} \) (remember to import scikit-learn)
+
+
+
+
+
+Then we can use the standard scaler to scale our data as
+
+
+
+
+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. We want you also to compute the \( R2 \) score as function of the complexity of the model for both training data and test data. You should also run the calculation with and without scaling.
+
+
+One of
+the aims is to reproduce Figure 2.11 of Hastie et al.
+
+
+Our data is defined by \( x\in [-3,3] \) with a total of for example \( 100 \) data points.
+
+
+
+
+where \( y \) is the function we want to fit with a given polynomial.
+
+
+
+a)
+Write a first code which sets up a design matrix \( X \) defined by a fifth-order polynomial. Scale your data and split it in training and test data.
+
+
+
+
+
+
+b)
+Perform an ordinary least squares and compute the means squared error and the \( R2 \) factor for the training data and the test data, with and without scaling.
+
+
+
+
+
+
+c)
+Add now a model which allows you to make polynomials up to degree \( 15 \). Perform a standard OLS fitting of the training data and compute the MSE and \( R2 \) for the training and test data and plot both test and training data MSE and \( R2 \) as functions of the polynomial degree. Compare what you see with Figure 2.11 of Hastie et al. Comment your results. For which polynomial degree do you find an optimal MSE (smallest value)?
+
+
+
+
+
+
+
+Exercise 4: Adding Ridge Regression
+
+This exercise is a continuation of exercise 2. We will use the same function to
generate our data set, still staying with a simple function \( y(x) \)
which we want to fit using linear regression, but now extending the
-analysis to include the Ridge and the Lasso regression methods.
+analysis to include the Ridge regression method.
We will thus again generate our own dataset for a function \( y(x) \) where
@@ -3566,205 +3938,40 @@ $$
\bar{y} = \frac{1}{n} \sum_{i=0}^{n - 1} y_i.
$$
-
Discuss these quantities as functions of the variable \( \lambda \) in the Ridge and Lasso regression methods.
-Exercise: Linear Regression for a two-dimensional function
+Discuss these quantities as functions of the variable \( \lambda \) in Ridge regression.
-This is a longer exercise and the aim is to study in more detail various
-regression methods, including the Ordinary Least Squares (OLS) method,
-Ridge regression and finally Lasso regression.
-This exercise forms a part of project 1.
+
+
+
+
Exercise 5: Analytical exercises
+
+In this exercise we derive the expressions for various derivatives of
+products of vectors and matrices. Such derivatives are central to the
+optimization of various cost functions. Although we will often use
+automatic differentiation in actual calculations, to be able to have
+analytical expressions is extremely helpful in case we have simpler
+derivatives as well as when we analyze various properties (like second
+derivatives) of the chosen cost functions. Vectors are always written
+as boldfaced lower case letters and matrices as upper case boldfaced
+letters.
-We will study how to fit polynomials to a specific
-two-dimensional function called Franke's
-function. This
-is a function which has been widely used when testing various
-interpolation and fitting algorithms.
-
-
-The Franke function, which is a weighted sum of four exponentials reads as follows
+Show that
$$
-\begin{align*}
-f(x,y) &= \frac{3}{4}\exp{\left(-\frac{(9x-2)^2}{4} - \frac{(9y-2)^2}{4}\right)}+\frac{3}{4}\exp{\left(-\frac{(9x+1)^2}{49}- \frac{(9y+1)}{10}\right)} \\
-&+\frac{1}{2}\exp{\left(-\frac{(9x-7)^2}{4} - \frac{(9y-3)^2}{4}\right)} -\frac{1}{5}\exp{\left(-(9x-4)^2 - (9y-7)^2\right) }.
-\end{align*}
+\frac{\partial (\boldsymbol{b}^T\boldsymbol{a})}{\partial \boldsymbol{a}} = \boldsymbol{b},
$$
-The function will be defined for \( x,y\in [0,1] \). Our first step will
-be to perform an OLS regression analysis of this function, trying out
-a polynomial fit with an \( x \) and \( y \) dependence of the form \( [x, y,
-x^2, y^2, xy, \dots] \). We will fit a
-function (for example a polynomial) of \( x \) and \( y \). Thereafter we
-will repeat much of the same procedure using the Ridge and Lasso
-regression methods, introducing thus a dependence on the bias
-(penalty) \( \lambda \).
-
-
-The Python fucntion for the Franke function is included here (it performs also a three-dimensional plot of it)
-
-
-
-
-We will generate our own dataset for a function
-\( \mathrm{FrankeFunction}(x,y) \) with \( x,y \in [0,1] \). The function
-\( f(x,y) \) is the Franke function. You should explore also the addition
-an added stochastic noise to this function using the normal
-distribution \( \cal{N}(0,1) \).
-
-
-Write your own code (using either a matrix inversion or a singular
-value decomposition from e.g., numpy ) or use your code and perform a standard least square regression
-analysis using polynomials in \( x \) and \( y \) up to fifth order. You can use scikit-learn as well.
-
-
-Evaluate the Mean Squared error (MSE)
-
-$$ MSE(\hat{y},\hat{\tilde{y}}) = \frac{1}{n}
-\sum_{i=0}^{n-1}(y_i-\tilde{y}_i)^2,
+and
+$$
+\frac{\partial (\boldsymbol{a}^T\boldsymbol{A}\boldsymbol{a})}{\partial \boldsymbol{a}} = (\boldsymbol{A}+\boldsymbol{A}^T)\boldsymbol{a},
$$
-and the \( R^2 \) score function. If \( \tilde{\hat{y}}_i \) is the predicted
-value of the \( i-th \) sample and \( y_i \) is the corresponding true value,
-then the score \( R^2 \) is defined as
-
-
+and
$$
-R^2(\hat{y}, \tilde{\hat{y}}) = 1 - \frac{\sum_{i=0}^{n - 1} (y_i - \tilde{y}_i)^2}{\sum_{i=0}^{n - 1} (y_i - \bar{y})^2},
+\frac{\partial \left(\boldsymbol{x}-\boldsymbol{A}\boldsymbol{s}\right)^T\left(\boldsymbol{x}-\boldsymbol{A}\boldsymbol{s}\right)}{\partial \boldsymbol{s}} = -2\left(\boldsymbol{x}-\boldsymbol{A}\boldsymbol{s}\right)^T\boldsymbol{A},
$$
-where we have defined the mean value of \( \hat{y} \) as
-
-$$
-\bar{y} = \frac{1}{n} \sum_{i=0}^{n - 1} y_i.
-$$
-
-You should split your data in train and test and also consider scaling the data.
-
-To set up the design matrix, the following code can be used
-
-
-
-
-Write then your own code for the Ridge method or use Scikit-Learn.
-Perform the same analysis as you did for ordinary Least Squares (for the same polynomials) but now for different values of \( \lambda \). Compare and
-analyze your results with those obtained with ordinary Least Squares. Study the
-dependence on \( \lambda \).
-
-
-This part is essentially a repeat of the previous ones, but now
-with Lasso regression. Write either your own code or
-use the functionalities of Scikit-Learn (recommended).
-Give a
-critical discussion of the three methods and a judgement of which
-model fits the data best.
-
+and finally find the second derivative of this function with respect to the vector \( \boldsymbol{s} \).
diff --git a/doc/pub/week35/ipynb/ipynb-week35-src.tar.gz b/doc/pub/week35/ipynb/ipynb-week35-src.tar.gz
index 83b805374b0dc5cffd68880c8f1a713c0171a63b..8cea8c6a9bee86dcb8a5e735580b14b55e5617aa 100644
GIT binary patch
delta 169
zcmV;a09OCN0l)zzABzY8g47FR00ZsM%?iRW3!+IGn~>?XH*u|ySZVkEI;g-
zUx8=-iDM-#Z1=sZv;w6a=33WqL#$a6$+lNH6dLW=0)y918U&$w5Je%K)Jj~!*65QF
Xjg7)zKjV3x=Y8z~7f8)K00;m8S}sg{
diff --git a/doc/pub/week35/ipynb/week35.ipynb b/doc/pub/week35/ipynb/week35.ipynb
index 590bead5f..4b9392f47 100644
--- a/doc/pub/week35/ipynb/week35.ipynb
+++ b/doc/pub/week35/ipynb/week35.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
- "id": "1a9b614f",
+ "id": "bad5086b",
"metadata": {
"editable": true
},
@@ -14,7 +14,7 @@
},
{
"cell_type": "markdown",
- "id": "cbf1c62c",
+ "id": "da612318",
"metadata": {
"editable": true
},
@@ -29,14 +29,14 @@
},
{
"cell_type": "markdown",
- "id": "cc45af03",
+ "id": "3b401442",
"metadata": {
"editable": true
},
"source": [
"## Plans for week 35\n",
"\n",
- "* Lab Wednesday: Work on exercises 1-5 for week 35\n",
+ "* Lab Wednesday: Work on exercises 1-5 for week 35, see end of these slides for the exercises\n",
"\n",
"* Thursday: Review of ordinary Least Squares with applications, reminder on statistics and start discussion of Ridge Regression and Singular Value Decom\\\n",
"\n",
@@ -46,7 +46,7 @@
},
{
"cell_type": "markdown",
- "id": "8170fbde",
+ "id": "570823d7",
"metadata": {
"editable": true
},
@@ -66,7 +66,7 @@
},
{
"cell_type": "markdown",
- "id": "f438d531",
+ "id": "9359c170",
"metadata": {
"editable": true
},
@@ -87,7 +87,7 @@
},
{
"cell_type": "markdown",
- "id": "03a6b4a7",
+ "id": "67f13333",
"metadata": {
"editable": true
},
@@ -121,7 +121,7 @@
},
{
"cell_type": "markdown",
- "id": "2a112e30",
+ "id": "8a97c78f",
"metadata": {
"editable": true
},
@@ -143,7 +143,7 @@
},
{
"cell_type": "markdown",
- "id": "179e1144",
+ "id": "1d07fe1e",
"metadata": {
"editable": true
},
@@ -171,7 +171,7 @@
},
{
"cell_type": "markdown",
- "id": "794bec68",
+ "id": "d346ac2c",
"metadata": {
"editable": true
},
@@ -186,7 +186,7 @@
},
{
"cell_type": "markdown",
- "id": "2fde9cac",
+ "id": "b4ae794b",
"metadata": {
"editable": true
},
@@ -198,7 +198,7 @@
},
{
"cell_type": "markdown",
- "id": "41c4d063",
+ "id": "a4730088",
"metadata": {
"editable": true
},
@@ -213,7 +213,7 @@
},
{
"cell_type": "markdown",
- "id": "6ae110f6",
+ "id": "d35af362",
"metadata": {
"editable": true
},
@@ -226,7 +226,7 @@
},
{
"cell_type": "markdown",
- "id": "402880e7",
+ "id": "6dade031",
"metadata": {
"editable": true
},
@@ -238,7 +238,7 @@
},
{
"cell_type": "markdown",
- "id": "26081206",
+ "id": "ad0c85fb",
"metadata": {
"editable": true
},
@@ -248,7 +248,7 @@
},
{
"cell_type": "markdown",
- "id": "38258da3",
+ "id": "b8d03ec4",
"metadata": {
"editable": true
},
@@ -259,7 +259,7 @@
},
{
"cell_type": "markdown",
- "id": "dfaed111",
+ "id": "01c94c25",
"metadata": {
"editable": true
},
@@ -277,7 +277,7 @@
},
{
"cell_type": "markdown",
- "id": "fe1d9da2",
+ "id": "61e724e9",
"metadata": {
"editable": true
},
@@ -288,7 +288,7 @@
},
{
"cell_type": "markdown",
- "id": "5bc9aa45",
+ "id": "3265a973",
"metadata": {
"editable": true
},
@@ -300,7 +300,7 @@
},
{
"cell_type": "markdown",
- "id": "f0ae4d02",
+ "id": "b4136611",
"metadata": {
"editable": true
},
@@ -310,7 +310,7 @@
},
{
"cell_type": "markdown",
- "id": "65701184",
+ "id": "1f21f9f1",
"metadata": {
"editable": true
},
@@ -322,7 +322,7 @@
},
{
"cell_type": "markdown",
- "id": "21b59127",
+ "id": "d0ddb042",
"metadata": {
"editable": true
},
@@ -332,7 +332,7 @@
},
{
"cell_type": "markdown",
- "id": "ef8383ff",
+ "id": "1948b126",
"metadata": {
"editable": true
},
@@ -344,7 +344,7 @@
},
{
"cell_type": "markdown",
- "id": "53fd95bf",
+ "id": "14b9da53",
"metadata": {
"editable": true
},
@@ -354,7 +354,7 @@
},
{
"cell_type": "markdown",
- "id": "b7f80ffa",
+ "id": "4ac259f7",
"metadata": {
"editable": true
},
@@ -373,7 +373,7 @@
},
{
"cell_type": "markdown",
- "id": "f1100b2a",
+ "id": "e23f2080",
"metadata": {
"editable": true
},
@@ -383,7 +383,7 @@
},
{
"cell_type": "markdown",
- "id": "5d9c810b",
+ "id": "2a0b63fa",
"metadata": {
"editable": true
},
@@ -395,7 +395,7 @@
},
{
"cell_type": "markdown",
- "id": "d6db69bc",
+ "id": "99151150",
"metadata": {
"editable": true
},
@@ -405,7 +405,7 @@
},
{
"cell_type": "markdown",
- "id": "5fbd15a5",
+ "id": "6c7f926a",
"metadata": {
"editable": true
},
@@ -421,7 +421,7 @@
},
{
"cell_type": "markdown",
- "id": "302993bc",
+ "id": "6ef4cf83",
"metadata": {
"editable": true
},
@@ -441,7 +441,7 @@
},
{
"cell_type": "markdown",
- "id": "e000ce4c",
+ "id": "4dbf3b84",
"metadata": {
"editable": true
},
@@ -451,7 +451,7 @@
},
{
"cell_type": "markdown",
- "id": "a6008fb8",
+ "id": "16f2087b",
"metadata": {
"editable": true
},
@@ -462,7 +462,7 @@
},
{
"cell_type": "markdown",
- "id": "300ea972",
+ "id": "04614985",
"metadata": {
"editable": true
},
@@ -481,7 +481,7 @@
},
{
"cell_type": "markdown",
- "id": "1ceedabf",
+ "id": "5f45422a",
"metadata": {
"editable": true
},
@@ -491,7 +491,7 @@
},
{
"cell_type": "markdown",
- "id": "db66178c",
+ "id": "84834fc7",
"metadata": {
"editable": true
},
@@ -503,7 +503,7 @@
},
{
"cell_type": "markdown",
- "id": "190de135",
+ "id": "187fee7e",
"metadata": {
"editable": true
},
@@ -513,7 +513,7 @@
},
{
"cell_type": "markdown",
- "id": "6615aeb5",
+ "id": "95432bf4",
"metadata": {
"editable": true
},
@@ -524,7 +524,7 @@
},
{
"cell_type": "markdown",
- "id": "ac1f8532",
+ "id": "1a37217a",
"metadata": {
"editable": true
},
@@ -544,7 +544,7 @@
},
{
"cell_type": "markdown",
- "id": "870fab51",
+ "id": "896d9fa8",
"metadata": {
"editable": true
},
@@ -556,7 +556,7 @@
},
{
"cell_type": "markdown",
- "id": "ba61ca80",
+ "id": "a5f3e32f",
"metadata": {
"editable": true
},
@@ -571,7 +571,7 @@
{
"cell_type": "code",
"execution_count": 1,
- "id": "d5874954",
+ "id": "55904cf5",
"metadata": {
"collapsed": false,
"editable": true
@@ -653,7 +653,7 @@
},
{
"cell_type": "markdown",
- "id": "bf2d9ada",
+ "id": "5252df87",
"metadata": {
"editable": true
},
@@ -663,7 +663,7 @@
},
{
"cell_type": "markdown",
- "id": "49883a88",
+ "id": "eb4b9707",
"metadata": {
"editable": true
},
@@ -675,7 +675,7 @@
},
{
"cell_type": "markdown",
- "id": "84997004",
+ "id": "5e56951e",
"metadata": {
"editable": true
},
@@ -685,7 +685,7 @@
},
{
"cell_type": "markdown",
- "id": "cd95f027",
+ "id": "7fccbdce",
"metadata": {
"editable": true
},
@@ -696,7 +696,7 @@
},
{
"cell_type": "markdown",
- "id": "939c7872",
+ "id": "efce1b4c",
"metadata": {
"editable": true
},
@@ -708,7 +708,7 @@
},
{
"cell_type": "markdown",
- "id": "3d87415d",
+ "id": "9a5ace30",
"metadata": {
"editable": true
},
@@ -718,7 +718,7 @@
},
{
"cell_type": "markdown",
- "id": "ac6ac658",
+ "id": "0da8dbc6",
"metadata": {
"editable": true
},
@@ -730,7 +730,7 @@
},
{
"cell_type": "markdown",
- "id": "185868b3",
+ "id": "8bfcd402",
"metadata": {
"editable": true
},
@@ -740,7 +740,7 @@
},
{
"cell_type": "markdown",
- "id": "e17add8b",
+ "id": "3f9a11f4",
"metadata": {
"editable": true
},
@@ -752,7 +752,7 @@
},
{
"cell_type": "markdown",
- "id": "a00ae7f6",
+ "id": "87705462",
"metadata": {
"editable": true
},
@@ -765,7 +765,7 @@
},
{
"cell_type": "markdown",
- "id": "0fa8fb67",
+ "id": "935eb96c",
"metadata": {
"editable": true
},
@@ -777,7 +777,7 @@
},
{
"cell_type": "markdown",
- "id": "f2ce77e6",
+ "id": "e70454d6",
"metadata": {
"editable": true
},
@@ -787,7 +787,7 @@
},
{
"cell_type": "markdown",
- "id": "0774a5ba",
+ "id": "f95284d1",
"metadata": {
"editable": true
},
@@ -799,7 +799,7 @@
},
{
"cell_type": "markdown",
- "id": "86ee0bcd",
+ "id": "4c87c0c0",
"metadata": {
"editable": true
},
@@ -811,7 +811,7 @@
},
{
"cell_type": "markdown",
- "id": "2899bec7",
+ "id": "9b531bad",
"metadata": {
"editable": true
},
@@ -822,7 +822,7 @@
},
{
"cell_type": "markdown",
- "id": "31d2696c",
+ "id": "8b3b47c7",
"metadata": {
"editable": true
},
@@ -834,7 +834,7 @@
},
{
"cell_type": "markdown",
- "id": "c3d35d28",
+ "id": "3106d4c4",
"metadata": {
"editable": true
},
@@ -853,7 +853,7 @@
},
{
"cell_type": "markdown",
- "id": "e5053f6c",
+ "id": "c2c211e1",
"metadata": {
"editable": true
},
@@ -866,7 +866,7 @@
},
{
"cell_type": "markdown",
- "id": "bef66e42",
+ "id": "54243432",
"metadata": {
"editable": true
},
@@ -876,7 +876,7 @@
},
{
"cell_type": "markdown",
- "id": "59a47fa3",
+ "id": "5068fa84",
"metadata": {
"editable": true
},
@@ -888,7 +888,7 @@
},
{
"cell_type": "markdown",
- "id": "40a7f806",
+ "id": "d29dc662",
"metadata": {
"editable": true
},
@@ -898,7 +898,7 @@
},
{
"cell_type": "markdown",
- "id": "34c72c5a",
+ "id": "352e0673",
"metadata": {
"editable": true
},
@@ -910,7 +910,7 @@
},
{
"cell_type": "markdown",
- "id": "d4c6a7ce",
+ "id": "7eab1b8e",
"metadata": {
"editable": true
},
@@ -920,7 +920,7 @@
},
{
"cell_type": "markdown",
- "id": "72d45555",
+ "id": "549aa29e",
"metadata": {
"editable": true
},
@@ -932,7 +932,7 @@
},
{
"cell_type": "markdown",
- "id": "c3339ca5",
+ "id": "1c56f77c",
"metadata": {
"editable": true
},
@@ -943,7 +943,7 @@
},
{
"cell_type": "markdown",
- "id": "37b906ec",
+ "id": "361eb6dc",
"metadata": {
"editable": true
},
@@ -955,7 +955,7 @@
},
{
"cell_type": "markdown",
- "id": "8154d653",
+ "id": "aa752586",
"metadata": {
"editable": true
},
@@ -965,7 +965,7 @@
},
{
"cell_type": "markdown",
- "id": "a55ba250",
+ "id": "3516e16b",
"metadata": {
"editable": true
},
@@ -977,7 +977,7 @@
},
{
"cell_type": "markdown",
- "id": "bc296d8f",
+ "id": "33409913",
"metadata": {
"editable": true
},
@@ -987,7 +987,7 @@
},
{
"cell_type": "markdown",
- "id": "eb3bfd2f",
+ "id": "f5b75324",
"metadata": {
"editable": true
},
@@ -999,7 +999,7 @@
},
{
"cell_type": "markdown",
- "id": "5f836b2c",
+ "id": "ba086954",
"metadata": {
"editable": true
},
@@ -1020,7 +1020,7 @@
},
{
"cell_type": "markdown",
- "id": "9dc46f80",
+ "id": "4aba1e12",
"metadata": {
"editable": true
},
@@ -1033,7 +1033,7 @@
},
{
"cell_type": "markdown",
- "id": "79f55733",
+ "id": "858fc135",
"metadata": {
"editable": true
},
@@ -1045,7 +1045,7 @@
},
{
"cell_type": "markdown",
- "id": "d2731bed",
+ "id": "8875d4ef",
"metadata": {
"editable": true
},
@@ -1057,7 +1057,7 @@
},
{
"cell_type": "markdown",
- "id": "d38524e2",
+ "id": "415c38f5",
"metadata": {
"editable": true
},
@@ -1069,7 +1069,7 @@
},
{
"cell_type": "markdown",
- "id": "b8ef59a1",
+ "id": "56cf4060",
"metadata": {
"editable": true
},
@@ -1081,7 +1081,7 @@
},
{
"cell_type": "markdown",
- "id": "b8b7eb1e",
+ "id": "768ebe28",
"metadata": {
"editable": true
},
@@ -1097,7 +1097,7 @@
},
{
"cell_type": "markdown",
- "id": "59333986",
+ "id": "0d405347",
"metadata": {
"editable": true
},
@@ -1109,7 +1109,7 @@
},
{
"cell_type": "markdown",
- "id": "d96b9d83",
+ "id": "fc8171ad",
"metadata": {
"editable": true
},
@@ -1119,7 +1119,7 @@
},
{
"cell_type": "markdown",
- "id": "522dec73",
+ "id": "b8149a3c",
"metadata": {
"editable": true
},
@@ -1131,7 +1131,7 @@
},
{
"cell_type": "markdown",
- "id": "68ca3df1",
+ "id": "6c53d045",
"metadata": {
"editable": true
},
@@ -1149,7 +1149,7 @@
},
{
"cell_type": "markdown",
- "id": "94e2e4a6",
+ "id": "66f45e19",
"metadata": {
"editable": true
},
@@ -1160,7 +1160,7 @@
},
{
"cell_type": "markdown",
- "id": "ec04aa49",
+ "id": "56b46bff",
"metadata": {
"editable": true
},
@@ -1172,7 +1172,7 @@
},
{
"cell_type": "markdown",
- "id": "3f5588d8",
+ "id": "42f00411",
"metadata": {
"editable": true
},
@@ -1182,7 +1182,7 @@
},
{
"cell_type": "markdown",
- "id": "87fb60d6",
+ "id": "ba5973bc",
"metadata": {
"editable": true
},
@@ -1194,7 +1194,7 @@
},
{
"cell_type": "markdown",
- "id": "d0b9777a",
+ "id": "f8697b8e",
"metadata": {
"editable": true
},
@@ -1204,7 +1204,7 @@
},
{
"cell_type": "markdown",
- "id": "05200bbc",
+ "id": "6b4d3592",
"metadata": {
"editable": true
},
@@ -1216,7 +1216,7 @@
},
{
"cell_type": "markdown",
- "id": "8f2418e0",
+ "id": "55fba98e",
"metadata": {
"editable": true
},
@@ -1226,7 +1226,7 @@
},
{
"cell_type": "markdown",
- "id": "8234cfe1",
+ "id": "1e23253b",
"metadata": {
"editable": true
},
@@ -1240,7 +1240,7 @@
{
"cell_type": "code",
"execution_count": 2,
- "id": "0050bfab",
+ "id": "3a93962f",
"metadata": {
"collapsed": false,
"editable": true
@@ -1255,7 +1255,7 @@
},
{
"cell_type": "markdown",
- "id": "4e46746a",
+ "id": "719b6020",
"metadata": {
"editable": true
},
@@ -1266,7 +1266,7 @@
{
"cell_type": "code",
"execution_count": 3,
- "id": "9e5451bd",
+ "id": "ea1696b8",
"metadata": {
"collapsed": false,
"editable": true
@@ -1279,7 +1279,7 @@
},
{
"cell_type": "markdown",
- "id": "a9444b05",
+ "id": "778838c3",
"metadata": {
"editable": true
},
@@ -1290,7 +1290,7 @@
{
"cell_type": "code",
"execution_count": 4,
- "id": "8471f1fa",
+ "id": "2801334b",
"metadata": {
"collapsed": false,
"editable": true
@@ -1313,7 +1313,7 @@
},
{
"cell_type": "markdown",
- "id": "b5408b3f",
+ "id": "878a48f1",
"metadata": {
"editable": true
},
@@ -1327,7 +1327,7 @@
{
"cell_type": "code",
"execution_count": 5,
- "id": "be8f7d73",
+ "id": "21f0fd03",
"metadata": {
"collapsed": false,
"editable": true
@@ -1340,7 +1340,7 @@
},
{
"cell_type": "markdown",
- "id": "bc79228d",
+ "id": "696488db",
"metadata": {
"editable": true
},
@@ -1351,7 +1351,7 @@
{
"cell_type": "code",
"execution_count": 6,
- "id": "66a134a1",
+ "id": "a6c5be1d",
"metadata": {
"collapsed": false,
"editable": true
@@ -1363,7 +1363,7 @@
},
{
"cell_type": "markdown",
- "id": "9c7124b6",
+ "id": "35e12ebe",
"metadata": {
"editable": true
},
@@ -1374,7 +1374,7 @@
{
"cell_type": "code",
"execution_count": 7,
- "id": "9a29b669",
+ "id": "643a563d",
"metadata": {
"collapsed": false,
"editable": true
@@ -1390,7 +1390,7 @@
},
{
"cell_type": "markdown",
- "id": "73a3bec8",
+ "id": "cdab5446",
"metadata": {
"editable": true
},
@@ -1401,7 +1401,7 @@
{
"cell_type": "code",
"execution_count": 8,
- "id": "8e884f28",
+ "id": "b7465d73",
"metadata": {
"collapsed": false,
"editable": true
@@ -1415,7 +1415,7 @@
},
{
"cell_type": "markdown",
- "id": "9fcebaad",
+ "id": "25900d74",
"metadata": {
"editable": true
},
@@ -1436,7 +1436,7 @@
},
{
"cell_type": "markdown",
- "id": "df0f9e2b",
+ "id": "8c0c32ce",
"metadata": {
"editable": true
},
@@ -1447,7 +1447,7 @@
{
"cell_type": "code",
"execution_count": 9,
- "id": "f4e5d013",
+ "id": "7ff1cb2f",
"metadata": {
"collapsed": false,
"editable": true
@@ -1496,7 +1496,7 @@
},
{
"cell_type": "markdown",
- "id": "842a7373",
+ "id": "af838de7",
"metadata": {
"editable": true
},
@@ -1507,7 +1507,7 @@
{
"cell_type": "code",
"execution_count": 10,
- "id": "6019dba5",
+ "id": "88ac8c20",
"metadata": {
"collapsed": false,
"editable": true
@@ -1532,7 +1532,7 @@
},
{
"cell_type": "markdown",
- "id": "1d7ea89e",
+ "id": "767b3a8d",
"metadata": {
"editable": true
},
@@ -1544,7 +1544,7 @@
},
{
"cell_type": "markdown",
- "id": "56c42030",
+ "id": "992efa60",
"metadata": {
"editable": true
},
@@ -1588,7 +1588,7 @@
},
{
"cell_type": "markdown",
- "id": "5f573079",
+ "id": "f746e61c",
"metadata": {
"editable": true
},
@@ -1600,7 +1600,7 @@
{
"cell_type": "code",
"execution_count": 11,
- "id": "84146b19",
+ "id": "f0ce8d53",
"metadata": {
"collapsed": false,
"editable": true
@@ -1616,7 +1616,7 @@
},
{
"cell_type": "markdown",
- "id": "7745a642",
+ "id": "22d77102",
"metadata": {
"editable": true
},
@@ -1627,7 +1627,7 @@
{
"cell_type": "code",
"execution_count": 12,
- "id": "e87fb8d5",
+ "id": "b76e8b98",
"metadata": {
"collapsed": false,
"editable": true
@@ -1645,7 +1645,7 @@
},
{
"cell_type": "markdown",
- "id": "4c972842",
+ "id": "4cfc2bb2",
"metadata": {
"editable": true
},
@@ -1656,7 +1656,7 @@
{
"cell_type": "code",
"execution_count": 13,
- "id": "34a0936a",
+ "id": "ab25d2e0",
"metadata": {
"collapsed": false,
"editable": true
@@ -1670,7 +1670,7 @@
},
{
"cell_type": "markdown",
- "id": "bdb0be69",
+ "id": "f0640df2",
"metadata": {
"editable": true
},
@@ -1681,7 +1681,7 @@
{
"cell_type": "code",
"execution_count": 14,
- "id": "594a9492",
+ "id": "9548fe77",
"metadata": {
"collapsed": false,
"editable": true
@@ -1694,7 +1694,7 @@
},
{
"cell_type": "markdown",
- "id": "4cafa7a5",
+ "id": "17bac023",
"metadata": {
"editable": true
},
@@ -1705,7 +1705,7 @@
{
"cell_type": "code",
"execution_count": 15,
- "id": "b8e224cf",
+ "id": "493cdb1e",
"metadata": {
"collapsed": false,
"editable": true
@@ -1722,7 +1722,7 @@
},
{
"cell_type": "markdown",
- "id": "a76b695f",
+ "id": "98ad858c",
"metadata": {
"editable": true
},
@@ -1733,7 +1733,7 @@
{
"cell_type": "code",
"execution_count": 16,
- "id": "e05d0d28",
+ "id": "d1f44ca5",
"metadata": {
"collapsed": false,
"editable": true
@@ -1749,7 +1749,7 @@
},
{
"cell_type": "markdown",
- "id": "43f3b9fa",
+ "id": "6ab804d9",
"metadata": {
"editable": true
},
@@ -1760,7 +1760,7 @@
{
"cell_type": "code",
"execution_count": 17,
- "id": "1253c27b",
+ "id": "b5ea81e5",
"metadata": {
"collapsed": false,
"editable": true
@@ -1784,7 +1784,7 @@
},
{
"cell_type": "markdown",
- "id": "db5e672d",
+ "id": "d769e688",
"metadata": {
"editable": true
},
@@ -1795,7 +1795,7 @@
{
"cell_type": "code",
"execution_count": 18,
- "id": "041c6272",
+ "id": "f06851d0",
"metadata": {
"collapsed": false,
"editable": true
@@ -1808,7 +1808,7 @@
},
{
"cell_type": "markdown",
- "id": "225f9ec1",
+ "id": "5261abdf",
"metadata": {
"editable": true
},
@@ -1819,7 +1819,7 @@
{
"cell_type": "code",
"execution_count": 19,
- "id": "5c658def",
+ "id": "68f03ed6",
"metadata": {
"collapsed": false,
"editable": true
@@ -1839,7 +1839,7 @@
},
{
"cell_type": "markdown",
- "id": "af57f5e8",
+ "id": "2cc632b7",
"metadata": {
"editable": true
},
@@ -1850,7 +1850,7 @@
{
"cell_type": "code",
"execution_count": 20,
- "id": "76ad9bc5",
+ "id": "b2ddba59",
"metadata": {
"collapsed": false,
"editable": true
@@ -1893,7 +1893,7 @@
{
"cell_type": "code",
"execution_count": 21,
- "id": "b34bec33",
+ "id": "ac6e2dc2",
"metadata": {
"collapsed": false,
"editable": true
@@ -1908,7 +1908,7 @@
},
{
"cell_type": "markdown",
- "id": "baf44657",
+ "id": "e3aca9e3",
"metadata": {
"editable": true
},
@@ -1937,7 +1937,7 @@
},
{
"cell_type": "markdown",
- "id": "b43190c6",
+ "id": "ab409699",
"metadata": {
"editable": true
},
@@ -1962,7 +1962,7 @@
},
{
"cell_type": "markdown",
- "id": "8ced1cda",
+ "id": "a20e0f18",
"metadata": {
"editable": true
},
@@ -1982,7 +1982,7 @@
},
{
"cell_type": "markdown",
- "id": "f2f31aaa",
+ "id": "5e3546b2",
"metadata": {
"editable": true
},
@@ -2009,7 +2009,7 @@
},
{
"cell_type": "markdown",
- "id": "7eea1546",
+ "id": "64311118",
"metadata": {
"editable": true
},
@@ -2022,7 +2022,7 @@
},
{
"cell_type": "markdown",
- "id": "bd52295e",
+ "id": "0bfc316d",
"metadata": {
"editable": true
},
@@ -2034,7 +2034,7 @@
},
{
"cell_type": "markdown",
- "id": "67c3130a",
+ "id": "aeb7adfa",
"metadata": {
"editable": true
},
@@ -2045,7 +2045,7 @@
},
{
"cell_type": "markdown",
- "id": "ca2f4d92",
+ "id": "aa187867",
"metadata": {
"editable": true
},
@@ -2061,7 +2061,7 @@
{
"cell_type": "code",
"execution_count": 22,
- "id": "efd11143",
+ "id": "e8dd92b9",
"metadata": {
"collapsed": false,
"editable": true
@@ -2095,7 +2095,7 @@
},
{
"cell_type": "markdown",
- "id": "f386601c",
+ "id": "e09a2c1e",
"metadata": {
"editable": true
},
@@ -2105,7 +2105,7 @@
},
{
"cell_type": "markdown",
- "id": "33d0c13c",
+ "id": "511af1d8",
"metadata": {
"editable": true
},
@@ -2120,7 +2120,7 @@
},
{
"cell_type": "markdown",
- "id": "6a0f24eb",
+ "id": "590481fb",
"metadata": {
"editable": true
},
@@ -2132,7 +2132,7 @@
},
{
"cell_type": "markdown",
- "id": "a25a6ab2",
+ "id": "17572a9d",
"metadata": {
"editable": true
},
@@ -2142,7 +2142,7 @@
},
{
"cell_type": "markdown",
- "id": "abbec782",
+ "id": "bfebc214",
"metadata": {
"editable": true
},
@@ -2158,7 +2158,7 @@
{
"cell_type": "code",
"execution_count": 23,
- "id": "c611c03c",
+ "id": "a682cc7a",
"metadata": {
"collapsed": false,
"editable": true
@@ -2175,7 +2175,7 @@
},
{
"cell_type": "markdown",
- "id": "fbf812a6",
+ "id": "56d8c5f7",
"metadata": {
"editable": true
},
@@ -2188,7 +2188,7 @@
{
"cell_type": "code",
"execution_count": 24,
- "id": "12374c54",
+ "id": "90012c98",
"metadata": {
"collapsed": false,
"editable": true
@@ -2235,7 +2235,7 @@
},
{
"cell_type": "markdown",
- "id": "0d0e1879",
+ "id": "b376ef9a",
"metadata": {
"editable": true
},
@@ -2246,7 +2246,7 @@
{
"cell_type": "code",
"execution_count": 25,
- "id": "50722591",
+ "id": "5357043f",
"metadata": {
"collapsed": false,
"editable": true
@@ -2349,7 +2349,7 @@
},
{
"cell_type": "markdown",
- "id": "6a9c8fa4",
+ "id": "329988ac",
"metadata": {
"editable": true
},
@@ -2363,7 +2363,7 @@
},
{
"cell_type": "markdown",
- "id": "23e1ccd3",
+ "id": "30225ff7",
"metadata": {
"editable": true
},
@@ -2375,7 +2375,7 @@
},
{
"cell_type": "markdown",
- "id": "86109a4f",
+ "id": "f0b33508",
"metadata": {
"editable": true
},
@@ -2387,7 +2387,7 @@
},
{
"cell_type": "markdown",
- "id": "a3dd5808",
+ "id": "adcd8b20",
"metadata": {
"editable": true
},
@@ -2399,7 +2399,7 @@
},
{
"cell_type": "markdown",
- "id": "da275e40",
+ "id": "0d001951",
"metadata": {
"editable": true
},
@@ -2409,7 +2409,7 @@
},
{
"cell_type": "markdown",
- "id": "e7e34404",
+ "id": "e6c90dd3",
"metadata": {
"editable": true
},
@@ -2421,7 +2421,7 @@
},
{
"cell_type": "markdown",
- "id": "50492310",
+ "id": "bdbebd09",
"metadata": {
"editable": true
},
@@ -2431,7 +2431,7 @@
},
{
"cell_type": "markdown",
- "id": "32372aeb",
+ "id": "559ce6b6",
"metadata": {
"editable": true
},
@@ -2443,7 +2443,7 @@
},
{
"cell_type": "markdown",
- "id": "bac1f34b",
+ "id": "64d3eea1",
"metadata": {
"editable": true
},
@@ -2454,7 +2454,7 @@
},
{
"cell_type": "markdown",
- "id": "bb6d1bc0",
+ "id": "263222fc",
"metadata": {
"editable": true
},
@@ -2466,7 +2466,7 @@
},
{
"cell_type": "markdown",
- "id": "0a097e2b",
+ "id": "dd70cf11",
"metadata": {
"editable": true
},
@@ -2478,7 +2478,7 @@
},
{
"cell_type": "markdown",
- "id": "99d0884e",
+ "id": "9022c7b1",
"metadata": {
"editable": true
},
@@ -2488,7 +2488,7 @@
},
{
"cell_type": "markdown",
- "id": "7240d2c0",
+ "id": "77564310",
"metadata": {
"editable": true
},
@@ -2500,7 +2500,7 @@
},
{
"cell_type": "markdown",
- "id": "8397baa7",
+ "id": "686e07ea",
"metadata": {
"editable": true
},
@@ -2512,7 +2512,7 @@
},
{
"cell_type": "markdown",
- "id": "41476227",
+ "id": "a293b59c",
"metadata": {
"editable": true
},
@@ -2522,7 +2522,7 @@
},
{
"cell_type": "markdown",
- "id": "7eeaa2db",
+ "id": "36c2c77a",
"metadata": {
"editable": true
},
@@ -2534,7 +2534,7 @@
},
{
"cell_type": "markdown",
- "id": "f4dd7a3c",
+ "id": "8962fab7",
"metadata": {
"editable": true
},
@@ -2544,7 +2544,7 @@
},
{
"cell_type": "markdown",
- "id": "be77461d",
+ "id": "adbf25f8",
"metadata": {
"editable": true
},
@@ -2556,7 +2556,7 @@
},
{
"cell_type": "markdown",
- "id": "ef66b61d",
+ "id": "07ad20ac",
"metadata": {
"editable": true
},
@@ -2566,7 +2566,7 @@
},
{
"cell_type": "markdown",
- "id": "ddedcffb",
+ "id": "4a001ba4",
"metadata": {
"editable": true
},
@@ -2606,7 +2606,7 @@
},
{
"cell_type": "markdown",
- "id": "61793f6c",
+ "id": "b07ba62e",
"metadata": {
"editable": true
},
@@ -2623,7 +2623,7 @@
},
{
"cell_type": "markdown",
- "id": "2c29dde2",
+ "id": "4e191fe1",
"metadata": {
"editable": true
},
@@ -2646,7 +2646,7 @@
},
{
"cell_type": "markdown",
- "id": "1fafc1ba",
+ "id": "3baf794a",
"metadata": {
"editable": true
},
@@ -2663,7 +2663,7 @@
},
{
"cell_type": "markdown",
- "id": "2292bfde",
+ "id": "6dfddf1e",
"metadata": {
"editable": true
},
@@ -2682,7 +2682,7 @@
},
{
"cell_type": "markdown",
- "id": "7264f830",
+ "id": "3129021b",
"metadata": {
"editable": true
},
@@ -2693,7 +2693,7 @@
},
{
"cell_type": "markdown",
- "id": "5920cad5",
+ "id": "3164dcbb",
"metadata": {
"editable": true
},
@@ -2705,7 +2705,7 @@
},
{
"cell_type": "markdown",
- "id": "637e9eb0",
+ "id": "ff089075",
"metadata": {
"editable": true
},
@@ -2723,7 +2723,7 @@
},
{
"cell_type": "markdown",
- "id": "28d9d116",
+ "id": "389b35c8",
"metadata": {
"editable": true
},
@@ -2739,7 +2739,7 @@
},
{
"cell_type": "markdown",
- "id": "008248ee",
+ "id": "a8d8079f",
"metadata": {
"editable": true
},
@@ -2751,7 +2751,7 @@
},
{
"cell_type": "markdown",
- "id": "30d484d2",
+ "id": "2292c6a5",
"metadata": {
"editable": true
},
@@ -2761,7 +2761,7 @@
},
{
"cell_type": "markdown",
- "id": "d7bf7656",
+ "id": "c211d516",
"metadata": {
"editable": true
},
@@ -2776,7 +2776,7 @@
},
{
"cell_type": "markdown",
- "id": "f8b608a1",
+ "id": "a568ad4b",
"metadata": {
"editable": true
},
@@ -2788,7 +2788,7 @@
},
{
"cell_type": "markdown",
- "id": "b73ca340",
+ "id": "6963ed7a",
"metadata": {
"editable": true
},
@@ -2798,7 +2798,7 @@
},
{
"cell_type": "markdown",
- "id": "9b65771f",
+ "id": "d9397a2d",
"metadata": {
"editable": true
},
@@ -2810,7 +2810,7 @@
},
{
"cell_type": "markdown",
- "id": "5e0f7851",
+ "id": "f71f1dbe",
"metadata": {
"editable": true
},
@@ -2820,7 +2820,7 @@
},
{
"cell_type": "markdown",
- "id": "d7030cb1",
+ "id": "5ec3f595",
"metadata": {
"editable": true
},
@@ -2832,7 +2832,7 @@
},
{
"cell_type": "markdown",
- "id": "bee54b67",
+ "id": "d0cbf5e2",
"metadata": {
"editable": true
},
@@ -2844,7 +2844,7 @@
},
{
"cell_type": "markdown",
- "id": "77a8a599",
+ "id": "eb24039c",
"metadata": {
"editable": true
},
@@ -2859,7 +2859,7 @@
},
{
"cell_type": "markdown",
- "id": "34199af6",
+ "id": "ed87822c",
"metadata": {
"editable": true
},
@@ -2870,7 +2870,7 @@
},
{
"cell_type": "markdown",
- "id": "ca2cf781",
+ "id": "560f570c",
"metadata": {
"editable": true
},
@@ -2890,7 +2890,7 @@
},
{
"cell_type": "markdown",
- "id": "8dd1923f",
+ "id": "d33d5d73",
"metadata": {
"editable": true
},
@@ -2902,7 +2902,7 @@
},
{
"cell_type": "markdown",
- "id": "01477199",
+ "id": "e59c6c7d",
"metadata": {
"editable": true
},
@@ -2912,7 +2912,7 @@
},
{
"cell_type": "markdown",
- "id": "daeb6b3f",
+ "id": "e6187f51",
"metadata": {
"editable": true
},
@@ -2924,7 +2924,7 @@
},
{
"cell_type": "markdown",
- "id": "2139195e",
+ "id": "45802924",
"metadata": {
"editable": true
},
@@ -2953,7 +2953,7 @@
},
{
"cell_type": "markdown",
- "id": "87d546c6",
+ "id": "40966f15",
"metadata": {
"editable": true
},
@@ -2980,7 +2980,7 @@
},
{
"cell_type": "markdown",
- "id": "bc9c89a9",
+ "id": "1850be64",
"metadata": {
"editable": true
},
@@ -2991,7 +2991,7 @@
{
"cell_type": "code",
"execution_count": 26,
- "id": "975cfb27",
+ "id": "b7e29dfc",
"metadata": {
"collapsed": false,
"editable": true
@@ -3031,7 +3031,7 @@
},
{
"cell_type": "markdown",
- "id": "2266fcaf",
+ "id": "c7e280b5",
"metadata": {
"editable": true
},
@@ -3048,7 +3048,7 @@
},
{
"cell_type": "markdown",
- "id": "de45b874",
+ "id": "f7022512",
"metadata": {
"editable": true
},
@@ -3071,7 +3071,7 @@
},
{
"cell_type": "markdown",
- "id": "f211d11d",
+ "id": "55ae67f3",
"metadata": {
"editable": true
},
@@ -3081,7 +3081,7 @@
},
{
"cell_type": "markdown",
- "id": "8d4b06a6",
+ "id": "95998854",
"metadata": {
"editable": true
},
@@ -3095,7 +3095,7 @@
},
{
"cell_type": "markdown",
- "id": "f1402758",
+ "id": "49b56f02",
"metadata": {
"editable": true
},
@@ -3114,7 +3114,7 @@
},
{
"cell_type": "markdown",
- "id": "619dc7a0",
+ "id": "24c6215d",
"metadata": {
"editable": true
},
@@ -3124,7 +3124,7 @@
},
{
"cell_type": "markdown",
- "id": "3bbdc075",
+ "id": "67609f1e",
"metadata": {
"editable": true
},
@@ -3136,7 +3136,7 @@
},
{
"cell_type": "markdown",
- "id": "8e89da88",
+ "id": "c55e4038",
"metadata": {
"editable": true
},
@@ -3150,7 +3150,7 @@
},
{
"cell_type": "markdown",
- "id": "46643e6f",
+ "id": "a0041819",
"metadata": {
"editable": true
},
@@ -3162,7 +3162,7 @@
},
{
"cell_type": "markdown",
- "id": "f8fa1702",
+ "id": "e9cee6e9",
"metadata": {
"editable": true
},
@@ -3172,7 +3172,7 @@
},
{
"cell_type": "markdown",
- "id": "053c533c",
+ "id": "7c6556ae",
"metadata": {
"editable": true
},
@@ -3184,7 +3184,7 @@
},
{
"cell_type": "markdown",
- "id": "f5239d94",
+ "id": "d2ebaa9c",
"metadata": {
"editable": true
},
@@ -3201,7 +3201,7 @@
},
{
"cell_type": "markdown",
- "id": "deff651e",
+ "id": "9992f525",
"metadata": {
"editable": true
},
@@ -3211,7 +3211,7 @@
},
{
"cell_type": "markdown",
- "id": "ad4f667a",
+ "id": "4cc6f08d",
"metadata": {
"editable": true
},
@@ -3227,7 +3227,7 @@
},
{
"cell_type": "markdown",
- "id": "14909a65",
+ "id": "1d5e91dd",
"metadata": {
"editable": true
},
@@ -3237,7 +3237,7 @@
},
{
"cell_type": "markdown",
- "id": "9c444a74",
+ "id": "72b8cba4",
"metadata": {
"editable": true
},
@@ -3253,7 +3253,7 @@
},
{
"cell_type": "markdown",
- "id": "756363a3",
+ "id": "fc533c73",
"metadata": {
"editable": true
},
@@ -3263,7 +3263,7 @@
},
{
"cell_type": "markdown",
- "id": "baec1e02",
+ "id": "a747672b",
"metadata": {
"editable": true
},
@@ -3279,7 +3279,7 @@
},
{
"cell_type": "markdown",
- "id": "ed0dc442",
+ "id": "7ffc43cb",
"metadata": {
"editable": true
},
@@ -3289,7 +3289,7 @@
},
{
"cell_type": "markdown",
- "id": "ebc0abc2",
+ "id": "0f9128a8",
"metadata": {
"editable": true
},
@@ -3306,7 +3306,7 @@
},
{
"cell_type": "markdown",
- "id": "591da950",
+ "id": "e0048b1d",
"metadata": {
"editable": true
},
@@ -3318,7 +3318,7 @@
},
{
"cell_type": "markdown",
- "id": "22f5e68d",
+ "id": "14e57017",
"metadata": {
"editable": true
},
@@ -3330,7 +3330,7 @@
},
{
"cell_type": "markdown",
- "id": "57065d31",
+ "id": "891e120d",
"metadata": {
"editable": true
},
@@ -3342,7 +3342,7 @@
},
{
"cell_type": "markdown",
- "id": "55aa5704",
+ "id": "3fc11062",
"metadata": {
"editable": true
},
@@ -3352,7 +3352,7 @@
},
{
"cell_type": "markdown",
- "id": "abc457d4",
+ "id": "4f854622",
"metadata": {
"editable": true
},
@@ -3364,7 +3364,7 @@
},
{
"cell_type": "markdown",
- "id": "c883059e",
+ "id": "a9aacb96",
"metadata": {
"editable": true
},
@@ -3376,7 +3376,7 @@
},
{
"cell_type": "markdown",
- "id": "0aec46d6",
+ "id": "1ba20966",
"metadata": {
"editable": true
},
@@ -3388,7 +3388,7 @@
},
{
"cell_type": "markdown",
- "id": "bc472088",
+ "id": "515123f9",
"metadata": {
"editable": true
},
@@ -3398,7 +3398,7 @@
},
{
"cell_type": "markdown",
- "id": "a78e81dc",
+ "id": "1b7f27cb",
"metadata": {
"editable": true
},
@@ -3410,7 +3410,7 @@
},
{
"cell_type": "markdown",
- "id": "6e1f6f38",
+ "id": "890b92a8",
"metadata": {
"editable": true
},
@@ -3420,7 +3420,7 @@
},
{
"cell_type": "markdown",
- "id": "3bc77351",
+ "id": "498cc525",
"metadata": {
"editable": true
},
@@ -3432,7 +3432,7 @@
},
{
"cell_type": "markdown",
- "id": "ad57f8d7",
+ "id": "8207cf98",
"metadata": {
"editable": true
},
@@ -3442,7 +3442,7 @@
},
{
"cell_type": "markdown",
- "id": "6f9eeed0",
+ "id": "1c224e29",
"metadata": {
"editable": true
},
@@ -3454,7 +3454,7 @@
},
{
"cell_type": "markdown",
- "id": "3a2e9c2f",
+ "id": "906c6f93",
"metadata": {
"editable": true
},
@@ -3464,7 +3464,7 @@
},
{
"cell_type": "markdown",
- "id": "af9729e1",
+ "id": "24164ea7",
"metadata": {
"editable": true
},
@@ -3476,7 +3476,7 @@
},
{
"cell_type": "markdown",
- "id": "733dd4b9",
+ "id": "102ea35b",
"metadata": {
"editable": true
},
@@ -3488,7 +3488,7 @@
},
{
"cell_type": "markdown",
- "id": "b4557705",
+ "id": "de362018",
"metadata": {
"editable": true
},
@@ -3500,7 +3500,7 @@
},
{
"cell_type": "markdown",
- "id": "3641ec13",
+ "id": "7e61ced1",
"metadata": {
"editable": true
},
@@ -3512,7 +3512,7 @@
},
{
"cell_type": "markdown",
- "id": "1a717f6d",
+ "id": "21eda74d",
"metadata": {
"editable": true
},
@@ -3522,7 +3522,7 @@
},
{
"cell_type": "markdown",
- "id": "637c3f41",
+ "id": "58ceefa9",
"metadata": {
"editable": true
},
@@ -3534,7 +3534,7 @@
},
{
"cell_type": "markdown",
- "id": "cf0cd5eb",
+ "id": "c47f885d",
"metadata": {
"editable": true
},
@@ -3545,7 +3545,7 @@
},
{
"cell_type": "markdown",
- "id": "2304be4f",
+ "id": "1a4a77e9",
"metadata": {
"editable": true
},
@@ -3557,7 +3557,7 @@
},
{
"cell_type": "markdown",
- "id": "380ec67a",
+ "id": "dec36c38",
"metadata": {
"editable": true
},
@@ -3567,7 +3567,7 @@
},
{
"cell_type": "markdown",
- "id": "03f59248",
+ "id": "669a28aa",
"metadata": {
"editable": true
},
@@ -3579,7 +3579,7 @@
},
{
"cell_type": "markdown",
- "id": "4a2526c8",
+ "id": "ed574eee",
"metadata": {
"editable": true
},
@@ -3589,7 +3589,7 @@
},
{
"cell_type": "markdown",
- "id": "5002a79a",
+ "id": "2139e3d5",
"metadata": {
"editable": true
},
@@ -3601,7 +3601,7 @@
},
{
"cell_type": "markdown",
- "id": "620d1184",
+ "id": "b86e4922",
"metadata": {
"editable": true
},
@@ -3612,7 +3612,7 @@
},
{
"cell_type": "markdown",
- "id": "1c3976ee",
+ "id": "f8504ca3",
"metadata": {
"editable": true
},
@@ -3624,7 +3624,7 @@
},
{
"cell_type": "markdown",
- "id": "e2a0d19f",
+ "id": "d2729173",
"metadata": {
"editable": true
},
@@ -3642,7 +3642,7 @@
},
{
"cell_type": "markdown",
- "id": "e7e7ee91",
+ "id": "5b4d8660",
"metadata": {
"editable": true
},
@@ -3658,7 +3658,7 @@
},
{
"cell_type": "markdown",
- "id": "5d86b026",
+ "id": "791ab84c",
"metadata": {
"editable": true
},
@@ -3670,7 +3670,7 @@
},
{
"cell_type": "markdown",
- "id": "aea55202",
+ "id": "962019a3",
"metadata": {
"editable": true
},
@@ -3682,7 +3682,7 @@
},
{
"cell_type": "markdown",
- "id": "186165b2",
+ "id": "46a92683",
"metadata": {
"editable": true
},
@@ -3694,7 +3694,7 @@
},
{
"cell_type": "markdown",
- "id": "7b7c96ec",
+ "id": "19066167",
"metadata": {
"editable": true
},
@@ -3707,7 +3707,7 @@
},
{
"cell_type": "markdown",
- "id": "d6f036e7",
+ "id": "b273b238",
"metadata": {
"editable": true
},
@@ -3723,7 +3723,7 @@
},
{
"cell_type": "markdown",
- "id": "19eff6f9",
+ "id": "c3a4a28a",
"metadata": {
"editable": true
},
@@ -3737,7 +3737,7 @@
},
{
"cell_type": "markdown",
- "id": "0039fe14",
+ "id": "aeabd341",
"metadata": {
"editable": true
},
@@ -3747,7 +3747,7 @@
},
{
"cell_type": "markdown",
- "id": "a689ff92",
+ "id": "5190e4ea",
"metadata": {
"editable": true
},
@@ -3759,7 +3759,7 @@
},
{
"cell_type": "markdown",
- "id": "e709cf26",
+ "id": "cb6fa66f",
"metadata": {
"editable": true
},
@@ -3769,7 +3769,7 @@
},
{
"cell_type": "markdown",
- "id": "59bf61c9",
+ "id": "0a3e3f79",
"metadata": {
"editable": true
},
@@ -3781,7 +3781,7 @@
},
{
"cell_type": "markdown",
- "id": "ce3364ee",
+ "id": "ee6d6fd8",
"metadata": {
"editable": true
},
@@ -3791,7 +3791,7 @@
},
{
"cell_type": "markdown",
- "id": "e257b300",
+ "id": "e755ba71",
"metadata": {
"editable": true
},
@@ -3805,7 +3805,7 @@
},
{
"cell_type": "markdown",
- "id": "82f71dd0",
+ "id": "fa099ad4",
"metadata": {
"editable": true
},
@@ -3822,7 +3822,7 @@
},
{
"cell_type": "markdown",
- "id": "beddf6b6",
+ "id": "93fed2f9",
"metadata": {
"editable": true
},
@@ -3838,7 +3838,7 @@
},
{
"cell_type": "markdown",
- "id": "a413c9cf",
+ "id": "cdb74a6c",
"metadata": {
"editable": true
},
@@ -3850,7 +3850,7 @@
},
{
"cell_type": "markdown",
- "id": "1cae0787",
+ "id": "bcbde64c",
"metadata": {
"editable": true
},
@@ -3863,7 +3863,7 @@
},
{
"cell_type": "markdown",
- "id": "0020c7a8",
+ "id": "9ff11372",
"metadata": {
"editable": true
},
@@ -3877,7 +3877,7 @@
},
{
"cell_type": "markdown",
- "id": "3e94eb26",
+ "id": "97d72ff8",
"metadata": {
"editable": true
},
@@ -3887,7 +3887,7 @@
},
{
"cell_type": "markdown",
- "id": "90b3d550",
+ "id": "331124d6",
"metadata": {
"editable": true
},
@@ -3900,7 +3900,7 @@
},
{
"cell_type": "markdown",
- "id": "3ab77df9",
+ "id": "e1d94c6a",
"metadata": {
"editable": true
},
@@ -3919,7 +3919,7 @@
},
{
"cell_type": "markdown",
- "id": "1e7ab256",
+ "id": "42bac97c",
"metadata": {
"editable": true
},
@@ -3931,7 +3931,7 @@
},
{
"cell_type": "markdown",
- "id": "e7c17042",
+ "id": "ccf43414",
"metadata": {
"editable": true
},
@@ -3943,7 +3943,7 @@
},
{
"cell_type": "markdown",
- "id": "2d93ce31",
+ "id": "3289b845",
"metadata": {
"editable": true
},
@@ -3953,7 +3953,7 @@
},
{
"cell_type": "markdown",
- "id": "1e73eed1",
+ "id": "3bfd8005",
"metadata": {
"editable": true
},
@@ -3965,7 +3965,7 @@
},
{
"cell_type": "markdown",
- "id": "e005510a",
+ "id": "806e4657",
"metadata": {
"editable": true
},
@@ -3978,7 +3978,7 @@
},
{
"cell_type": "markdown",
- "id": "cc65a179",
+ "id": "cd188ebf",
"metadata": {
"editable": true
},
@@ -3997,7 +3997,7 @@
},
{
"cell_type": "markdown",
- "id": "18337cc0",
+ "id": "ef3f35c9",
"metadata": {
"editable": true
},
@@ -4007,7 +4007,7 @@
},
{
"cell_type": "markdown",
- "id": "71709007",
+ "id": "7995adbe",
"metadata": {
"editable": true
},
@@ -4026,7 +4026,7 @@
},
{
"cell_type": "markdown",
- "id": "6fba9aed",
+ "id": "95394c95",
"metadata": {
"editable": true
},
@@ -4044,7 +4044,7 @@
},
{
"cell_type": "markdown",
- "id": "d3b9e5ee",
+ "id": "70d58cd4",
"metadata": {
"editable": true
},
@@ -4058,7 +4058,7 @@
},
{
"cell_type": "markdown",
- "id": "f6b760cc",
+ "id": "63612dcd",
"metadata": {
"editable": true
},
@@ -4073,7 +4073,7 @@
{
"cell_type": "code",
"execution_count": 27,
- "id": "bc89fc85",
+ "id": "2d1f93c0",
"metadata": {
"collapsed": false,
"editable": true
@@ -4094,7 +4094,7 @@
},
{
"cell_type": "markdown",
- "id": "0019b48c",
+ "id": "7699a96f",
"metadata": {
"editable": true
},
@@ -4111,7 +4111,7 @@
{
"cell_type": "code",
"execution_count": 28,
- "id": "5a5ada84",
+ "id": "ffc22e17",
"metadata": {
"collapsed": false,
"editable": true
@@ -4143,7 +4143,7 @@
},
{
"cell_type": "markdown",
- "id": "cbefc831",
+ "id": "31382ed7",
"metadata": {
"editable": true
},
@@ -4157,7 +4157,7 @@
},
{
"cell_type": "markdown",
- "id": "0a8933e2",
+ "id": "d5e88871",
"metadata": {
"editable": true
},
@@ -4170,7 +4170,7 @@
{
"cell_type": "code",
"execution_count": 29,
- "id": "9dacf72d",
+ "id": "eaaee140",
"metadata": {
"collapsed": false,
"editable": true
@@ -4195,7 +4195,7 @@
},
{
"cell_type": "markdown",
- "id": "e4afa47f",
+ "id": "21e310e2",
"metadata": {
"editable": true
},
@@ -4205,7 +4205,7 @@
},
{
"cell_type": "markdown",
- "id": "acae21f9",
+ "id": "699edb1b",
"metadata": {
"editable": true
},
@@ -4216,7 +4216,7 @@
{
"cell_type": "code",
"execution_count": 30,
- "id": "46ea8d82",
+ "id": "cd83a40e",
"metadata": {
"collapsed": false,
"editable": true
@@ -4270,7 +4270,7 @@
},
{
"cell_type": "markdown",
- "id": "6ac602f8",
+ "id": "605bc135",
"metadata": {
"editable": true
},
@@ -4287,7 +4287,7 @@
},
{
"cell_type": "markdown",
- "id": "a5d883c3",
+ "id": "a3a775cf",
"metadata": {
"editable": true
},
@@ -4299,7 +4299,7 @@
},
{
"cell_type": "markdown",
- "id": "3fe8dccd",
+ "id": "3e235d8d",
"metadata": {
"editable": true
},
@@ -4311,7 +4311,7 @@
},
{
"cell_type": "markdown",
- "id": "d83eb83f",
+ "id": "b8ca496a",
"metadata": {
"editable": true
},
@@ -4321,7 +4321,7 @@
},
{
"cell_type": "markdown",
- "id": "6a6d96f1",
+ "id": "49cde9f9",
"metadata": {
"editable": true
},
@@ -4338,7 +4338,7 @@
},
{
"cell_type": "markdown",
- "id": "c7214071",
+ "id": "3210e3ff",
"metadata": {
"editable": true
},
@@ -4348,7 +4348,7 @@
},
{
"cell_type": "markdown",
- "id": "52f6840b",
+ "id": "92d2d4f6",
"metadata": {
"editable": true
},
@@ -4363,7 +4363,7 @@
},
{
"cell_type": "markdown",
- "id": "967fa34c",
+ "id": "d79fd2fc",
"metadata": {
"editable": true
},
@@ -4373,7 +4373,7 @@
},
{
"cell_type": "markdown",
- "id": "acd86f3c",
+ "id": "2f0cd0e9",
"metadata": {
"editable": true
},
@@ -4387,7 +4387,7 @@
},
{
"cell_type": "markdown",
- "id": "aaefdb7d",
+ "id": "b1fb347c",
"metadata": {
"editable": true
},
@@ -4399,7 +4399,7 @@
},
{
"cell_type": "markdown",
- "id": "bfe8f3fd",
+ "id": "f1369e59",
"metadata": {
"editable": true
},
@@ -4411,7 +4411,7 @@
},
{
"cell_type": "markdown",
- "id": "ea539603",
+ "id": "236ff770",
"metadata": {
"editable": true
},
@@ -4423,7 +4423,7 @@
},
{
"cell_type": "markdown",
- "id": "40b2588d",
+ "id": "da925509",
"metadata": {
"editable": true
},
@@ -4433,7 +4433,7 @@
},
{
"cell_type": "markdown",
- "id": "4f05be7b",
+ "id": "6dbf51e6",
"metadata": {
"editable": true
},
@@ -4445,7 +4445,7 @@
},
{
"cell_type": "markdown",
- "id": "aa6964b6",
+ "id": "4e662f70",
"metadata": {
"editable": true
},
@@ -4455,7 +4455,7 @@
},
{
"cell_type": "markdown",
- "id": "f3340071",
+ "id": "50c8c21c",
"metadata": {
"editable": true
},
@@ -4472,7 +4472,7 @@
},
{
"cell_type": "markdown",
- "id": "b8f07586",
+ "id": "e15e15b3",
"metadata": {
"editable": true
},
@@ -4482,7 +4482,7 @@
},
{
"cell_type": "markdown",
- "id": "97e3fc60",
+ "id": "cda72000",
"metadata": {
"editable": true
},
@@ -4494,7 +4494,7 @@
},
{
"cell_type": "markdown",
- "id": "6f2a4583",
+ "id": "b58f911d",
"metadata": {
"editable": true
},
@@ -4504,7 +4504,7 @@
},
{
"cell_type": "markdown",
- "id": "49507731",
+ "id": "c43363c5",
"metadata": {
"editable": true
},
@@ -4516,7 +4516,7 @@
},
{
"cell_type": "markdown",
- "id": "abe536a9",
+ "id": "10322fe6",
"metadata": {
"editable": true
},
@@ -4530,7 +4530,7 @@
},
{
"cell_type": "markdown",
- "id": "337d414d",
+ "id": "f1ce7a6d",
"metadata": {
"editable": true
},
@@ -4542,7 +4542,7 @@
},
{
"cell_type": "markdown",
- "id": "af829015",
+ "id": "ac1098e7",
"metadata": {
"editable": true
},
@@ -4564,7 +4564,7 @@
},
{
"cell_type": "markdown",
- "id": "e4176520",
+ "id": "7e8399ff",
"metadata": {
"editable": true
},
@@ -4576,7 +4576,7 @@
},
{
"cell_type": "markdown",
- "id": "25ce9b35",
+ "id": "12b9071e",
"metadata": {
"editable": true
},
@@ -4591,7 +4591,7 @@
},
{
"cell_type": "markdown",
- "id": "fc4d859f",
+ "id": "5a36054e",
"metadata": {
"editable": true
},
@@ -4603,7 +4603,7 @@
},
{
"cell_type": "markdown",
- "id": "3a47e898",
+ "id": "87ea4573",
"metadata": {
"editable": true
},
@@ -4615,7 +4615,7 @@
},
{
"cell_type": "markdown",
- "id": "ffa73f26",
+ "id": "082e9545",
"metadata": {
"editable": true
},
@@ -4625,7 +4625,7 @@
},
{
"cell_type": "markdown",
- "id": "22d7edc0",
+ "id": "1133f644",
"metadata": {
"editable": true
},
@@ -4637,7 +4637,7 @@
},
{
"cell_type": "markdown",
- "id": "795a16cf",
+ "id": "839744c2",
"metadata": {
"editable": true
},
@@ -4647,7 +4647,7 @@
},
{
"cell_type": "markdown",
- "id": "85b8a164",
+ "id": "e49293a1",
"metadata": {
"editable": true
},
@@ -4659,7 +4659,7 @@
},
{
"cell_type": "markdown",
- "id": "f153a82b",
+ "id": "80a17dd4",
"metadata": {
"editable": true
},
@@ -4669,7 +4669,7 @@
},
{
"cell_type": "markdown",
- "id": "e4b8b40e",
+ "id": "d5190f4d",
"metadata": {
"editable": true
},
@@ -4681,7 +4681,7 @@
},
{
"cell_type": "markdown",
- "id": "db5cdc9a",
+ "id": "9dfeb9bd",
"metadata": {
"editable": true
},
@@ -4698,7 +4698,7 @@
},
{
"cell_type": "markdown",
- "id": "80594b0d",
+ "id": "23bbbf62",
"metadata": {
"editable": true
},
@@ -4711,7 +4711,7 @@
},
{
"cell_type": "markdown",
- "id": "c62fc159",
+ "id": "92f1a6e2",
"metadata": {
"editable": true
},
@@ -4723,7 +4723,7 @@
},
{
"cell_type": "markdown",
- "id": "2a2fd192",
+ "id": "d4ebff27",
"metadata": {
"editable": true
},
@@ -4733,7 +4733,7 @@
},
{
"cell_type": "markdown",
- "id": "d8868365",
+ "id": "86d04c59",
"metadata": {
"editable": true
},
@@ -4746,7 +4746,7 @@
},
{
"cell_type": "markdown",
- "id": "5809295a",
+ "id": "6ac15dff",
"metadata": {
"editable": true
},
@@ -4756,7 +4756,7 @@
},
{
"cell_type": "markdown",
- "id": "510297eb",
+ "id": "393237db",
"metadata": {
"editable": true
},
@@ -4768,7 +4768,7 @@
},
{
"cell_type": "markdown",
- "id": "85351250",
+ "id": "8f2b647b",
"metadata": {
"editable": true
},
@@ -4781,7 +4781,7 @@
},
{
"cell_type": "markdown",
- "id": "b27da21f",
+ "id": "1dc79454",
"metadata": {
"editable": true
},
@@ -4794,7 +4794,7 @@
},
{
"cell_type": "markdown",
- "id": "f87a8f26",
+ "id": "2e61589f",
"metadata": {
"editable": true
},
@@ -4806,7 +4806,7 @@
},
{
"cell_type": "markdown",
- "id": "dd67e038",
+ "id": "84966734",
"metadata": {
"editable": true
},
@@ -4818,7 +4818,7 @@
},
{
"cell_type": "markdown",
- "id": "5ffeb0d6",
+ "id": "bd34365d",
"metadata": {
"editable": true
},
@@ -4828,7 +4828,7 @@
},
{
"cell_type": "markdown",
- "id": "a4f0d99d",
+ "id": "30488684",
"metadata": {
"editable": true
},
@@ -4841,7 +4841,7 @@
},
{
"cell_type": "markdown",
- "id": "f9cd62c9",
+ "id": "83e8b0cc",
"metadata": {
"editable": true
},
@@ -4853,7 +4853,7 @@
},
{
"cell_type": "markdown",
- "id": "4bbeb4a2",
+ "id": "7844d0a1",
"metadata": {
"editable": true
},
@@ -4865,7 +4865,7 @@
},
{
"cell_type": "markdown",
- "id": "7f7c986a",
+ "id": "c36445b0",
"metadata": {
"editable": true
},
@@ -4877,7 +4877,7 @@
},
{
"cell_type": "markdown",
- "id": "ec488ba9",
+ "id": "8734f96a",
"metadata": {
"editable": true
},
@@ -4889,7 +4889,7 @@
},
{
"cell_type": "markdown",
- "id": "234b6c86",
+ "id": "abd49bcd",
"metadata": {
"editable": true
},
@@ -4903,7 +4903,7 @@
},
{
"cell_type": "markdown",
- "id": "92bbd77f",
+ "id": "33b85ee0",
"metadata": {
"editable": true
},
@@ -4915,7 +4915,7 @@
},
{
"cell_type": "markdown",
- "id": "69b37e4f",
+ "id": "79c2e01e",
"metadata": {
"editable": true
},
@@ -4925,7 +4925,7 @@
},
{
"cell_type": "markdown",
- "id": "caec2e9b",
+ "id": "41381d1e",
"metadata": {
"editable": true
},
@@ -4937,7 +4937,7 @@
},
{
"cell_type": "markdown",
- "id": "92d0a493",
+ "id": "bf06ddca",
"metadata": {
"editable": true
},
@@ -4949,7 +4949,7 @@
},
{
"cell_type": "markdown",
- "id": "e9785088",
+ "id": "f84cf8e3",
"metadata": {
"editable": true
},
@@ -4961,7 +4961,7 @@
},
{
"cell_type": "markdown",
- "id": "82ce4d5f",
+ "id": "b5dbf635",
"metadata": {
"editable": true
},
@@ -4973,7 +4973,7 @@
},
{
"cell_type": "markdown",
- "id": "9921ee5b",
+ "id": "8ef22c2d",
"metadata": {
"editable": true
},
@@ -4985,7 +4985,7 @@
},
{
"cell_type": "markdown",
- "id": "403909d4",
+ "id": "34a0b099",
"metadata": {
"editable": true
},
@@ -5004,7 +5004,7 @@
},
{
"cell_type": "markdown",
- "id": "fa1171d4",
+ "id": "d920de82",
"metadata": {
"editable": true
},
@@ -5016,7 +5016,7 @@
},
{
"cell_type": "markdown",
- "id": "13dc194d",
+ "id": "5e512f0f",
"metadata": {
"editable": true
},
@@ -5026,7 +5026,7 @@
},
{
"cell_type": "markdown",
- "id": "d80ab895",
+ "id": "d59c6911",
"metadata": {
"editable": true
},
@@ -5038,7 +5038,7 @@
},
{
"cell_type": "markdown",
- "id": "72b25bb1",
+ "id": "d3be5794",
"metadata": {
"editable": true
},
@@ -5048,7 +5048,7 @@
},
{
"cell_type": "markdown",
- "id": "635bb575",
+ "id": "ed2913af",
"metadata": {
"editable": true
},
@@ -5060,7 +5060,7 @@
},
{
"cell_type": "markdown",
- "id": "e12204c7",
+ "id": "89c8ff0b",
"metadata": {
"editable": true
},
@@ -5072,7 +5072,7 @@
},
{
"cell_type": "markdown",
- "id": "f522152d",
+ "id": "11358cf8",
"metadata": {
"editable": true
},
@@ -5088,7 +5088,7 @@
},
{
"cell_type": "markdown",
- "id": "40f959b7",
+ "id": "7ca08315",
"metadata": {
"editable": true
},
@@ -5100,7 +5100,7 @@
},
{
"cell_type": "markdown",
- "id": "06eea8bb",
+ "id": "94e587e5",
"metadata": {
"editable": true
},
@@ -5112,7 +5112,7 @@
},
{
"cell_type": "markdown",
- "id": "62bc2466",
+ "id": "5ab3c4bf",
"metadata": {
"editable": true
},
@@ -5122,7 +5122,7 @@
},
{
"cell_type": "markdown",
- "id": "e20a1f89",
+ "id": "7b0931d2",
"metadata": {
"editable": true
},
@@ -5134,7 +5134,7 @@
},
{
"cell_type": "markdown",
- "id": "34ffd27c",
+ "id": "a20be4cc",
"metadata": {
"editable": true
},
@@ -5144,7 +5144,7 @@
},
{
"cell_type": "markdown",
- "id": "6b958376",
+ "id": "fd55e4b2",
"metadata": {
"editable": true
},
@@ -5156,7 +5156,7 @@
},
{
"cell_type": "markdown",
- "id": "d0120a13",
+ "id": "4e3aed61",
"metadata": {
"editable": true
},
@@ -5173,7 +5173,7 @@
},
{
"cell_type": "markdown",
- "id": "1b9dfdc6",
+ "id": "a429e9ee",
"metadata": {
"editable": true
},
@@ -5185,7 +5185,7 @@
},
{
"cell_type": "markdown",
- "id": "ae3d685a",
+ "id": "5ec00be7",
"metadata": {
"editable": true
},
@@ -5197,7 +5197,7 @@
},
{
"cell_type": "markdown",
- "id": "c44edd96",
+ "id": "983e421f",
"metadata": {
"editable": true
},
@@ -5207,7 +5207,7 @@
},
{
"cell_type": "markdown",
- "id": "ce322731",
+ "id": "753edf46",
"metadata": {
"editable": true
},
@@ -5219,7 +5219,7 @@
},
{
"cell_type": "markdown",
- "id": "11ea1aea",
+ "id": "fb4caea7",
"metadata": {
"editable": true
},
@@ -5229,7 +5229,7 @@
},
{
"cell_type": "markdown",
- "id": "69dde5bf",
+ "id": "7d774d2f",
"metadata": {
"editable": true
},
@@ -5241,7 +5241,7 @@
},
{
"cell_type": "markdown",
- "id": "7531baab",
+ "id": "a1fab066",
"metadata": {
"editable": true
},
@@ -5251,7 +5251,7 @@
},
{
"cell_type": "markdown",
- "id": "3a3b8b23",
+ "id": "27406b14",
"metadata": {
"editable": true
},
@@ -5263,7 +5263,7 @@
},
{
"cell_type": "markdown",
- "id": "af092337",
+ "id": "fe817dc9",
"metadata": {
"editable": true
},
@@ -5273,30 +5273,437 @@
},
{
"cell_type": "markdown",
- "id": "d87e34ed",
+ "id": "8209f6ac",
"metadata": {
"editable": true
},
"source": [
- "## Exercises for week 36, September 6-10\n",
+ "## Exercises for week 35\n",
"\n",
"The exercises here are meant to prepare you for work with project 1. The first exercise is a follow-up of exercise 2 from week 35 August 30-September 3)."
]
},
{
"cell_type": "markdown",
- "id": "049c79a1",
+ "id": "98490b18",
"metadata": {
"editable": true
},
"source": [
- "## Exercise 1: Adding Ridge and Lasso Regression\n",
+ "## Exercise 1: Setting up various Python environments\n",
"\n",
- "This exercise is a continuation of exercise 2 from exercise set 1\n",
- "(week 35, August 30-September 3). We will use the same function to\n",
+ "The first exercise here is of a mere technical art. We want you to have \n",
+ "* 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 [GitHub facilities](https://www.uio.no/tjenester/it/maskin/filer/versjonskontroll/github.html). \n",
+ "\n",
+ "* Install various Python packages\n",
+ "\n",
+ "We will make extensive use of Python as programming language and its\n",
+ "myriad of available libraries. You will find\n",
+ "IPython/Jupyter notebooks invaluable in your work. You can run **R**\n",
+ "codes in the Jupyter/IPython notebooks, with the immediate benefit of\n",
+ "visualizing your data. You can also use compiled languages like C++,\n",
+ "Rust, Fortran etc if you prefer. The focus in these lectures will be\n",
+ "on Python.\n",
+ "\n",
+ "If you have Python installed (we recommend Python3) and you feel\n",
+ "pretty familiar with installing different packages, we recommend that\n",
+ "you install the following Python packages via **pip** as \n",
+ "\n",
+ "1. pip install numpy scipy matplotlib ipython scikit-learn sympy pandas pillow \n",
+ "\n",
+ "For **Tensorflow**, we recommend following the instructions in the text of \n",
+ "[Aurelien Geron, Hands‑On Machine Learning with Scikit‑Learn and TensorFlow, O'Reilly](http://shop.oreilly.com/product/0636920052289.do)\n",
+ "\n",
+ "We will come back to **tensorflow** later. \n",
+ "\n",
+ "For Python3, replace **pip** with **pip3**.\n",
+ "\n",
+ "For OSX users we recommend, after having installed Xcode, to\n",
+ "install **brew**. Brew allows for a seamless installation of additional\n",
+ "software via for example \n",
+ "\n",
+ "1. brew install python3\n",
+ "\n",
+ "For Linux users, with its variety of distributions like for example the widely popular Ubuntu distribution,\n",
+ "you can use **pip** as well and simply install Python as \n",
+ "\n",
+ "1. sudo apt-get install python3 (or python for Python2.7)\n",
+ "\n",
+ "If you don't want to perform these operations separately and venture\n",
+ "into the hassle of exploring how to set up dependencies and paths, we\n",
+ "recommend two widely used distrubutions which set up all relevant\n",
+ "dependencies for Python, namely \n",
+ "\n",
+ "* [Anaconda](https://docs.anaconda.com/), \n",
+ "\n",
+ "which is an open source\n",
+ "distribution of the Python and R programming languages for large-scale\n",
+ "data processing, predictive analytics, and scientific computing, that\n",
+ "aims to simplify package management and deployment. Package versions\n",
+ "are managed by the package management system **conda**. \n",
+ "\n",
+ "* [Enthought canopy](https://www.enthought.com/product/canopy/) \n",
+ "\n",
+ "is a Python\n",
+ "distribution for scientific and analytic computing distribution and\n",
+ "analysis environment, available for free and under a commercial\n",
+ "license.\n",
+ "\n",
+ "We recommend using **Anaconda** if you are not too familiar with setting paths in a terminal environment."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "acca5d36",
+ "metadata": {
+ "editable": true
+ },
+ "source": [
+ "## Exercise 2: making your own data and exploring scikit-learn\n",
+ "\n",
+ "We will generate our own dataset for a function $y(x)$ where $x \\in [0,1]$ and defined by random numbers computed with the uniform distribution. The function $y$ is a quadratic polynomial in $x$ with added stochastic noise according to the normal distribution $\\cal {N}(0,1)$.\n",
+ "The following simple Python instructions define our $x$ and $y$ values (with 100 data points)."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "id": "2889a29f",
+ "metadata": {
+ "collapsed": false,
+ "editable": true
+ },
+ "outputs": [],
+ "source": [
+ "x = np.random.rand(100,1)\n",
+ "y = 2.0+5*x*x+0.1*np.random.randn(100,1)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "0e0827bf",
+ "metadata": {
+ "editable": true
+ },
+ "source": [
+ "1. Write your own code (following the examples under the [regression notes](https://compphysics.github.io/MachineLearning/doc/LectureNotes/_build/html/chapter1.html)) for computing the parametrization of the data set fitting a second-order polynomial. \n",
+ "\n",
+ "2. Use thereafter **scikit-learn** (see again the examples in the regression slides) and compare with your own code. \n",
+ "\n",
+ "3. Using scikit-learn, compute also the mean square error, a risk metric corresponding to the expected value of the squared (quadratic) error defined as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "1e058a77",
+ "metadata": {
+ "editable": true
+ },
+ "source": [
+ "$$\n",
+ "MSE(\\boldsymbol{y},\\boldsymbol{\\tilde{y}}) = \\frac{1}{n}\n",
+ "\\sum_{i=0}^{n-1}(y_i-\\tilde{y}_i)^2,\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "03636e48",
+ "metadata": {
+ "editable": true
+ },
+ "source": [
+ "and the $R^2$ score function.\n",
+ "If $\\tilde{\\boldsymbol{y}}_i$ is the predicted value of the $i-th$ sample and $y_i$ is the corresponding true value, then the score $R^2$ is defined as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "7d0e8a71",
+ "metadata": {
+ "editable": true
+ },
+ "source": [
+ "$$\n",
+ "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},\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "c34f14cd",
+ "metadata": {
+ "editable": true
+ },
+ "source": [
+ "where we have defined the mean value of $\\boldsymbol{y}$ as"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "a7e5b45f",
+ "metadata": {
+ "editable": true
+ },
+ "source": [
+ "$$\n",
+ "\\bar{y} = \\frac{1}{n} \\sum_{i=0}^{n - 1} y_i.\n",
+ "$$"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "3f089253",
+ "metadata": {
+ "editable": true
+ },
+ "source": [
+ "You can use the functionality included in scikit-learn. If you feel for it, you can use your own program and define functions which compute the above two functions. \n",
+ "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.\n",
+ "\n",
+ "\n",
+ "**Solution.**\n",
+ "The code here is an example of where we define our own design matrix and fit parameters $\\beta$."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "id": "827fb7a3",
+ "metadata": {
+ "collapsed": false,
+ "editable": true
+ },
+ "outputs": [],
+ "source": [
+ "import os\n",
+ "import numpy as np\n",
+ "import pandas as pd\n",
+ "import matplotlib.pyplot as plt\n",
+ "from sklearn.model_selection import train_test_split\n",
+ "\n",
+ "def save_fig(fig_id):\n",
+ " plt.savefig(image_path(fig_id) + \".png\", format='png')\n",
+ "\n",
+ "def R2(y_data, y_model):\n",
+ " return 1 - np.sum((y_data - y_model) ** 2) / np.sum((y_data - np.mean(y_data)) ** 2)\n",
+ "def MSE(y_data,y_model):\n",
+ " n = np.size(y_model)\n",
+ " return np.sum((y_data-y_model)**2)/n\n",
+ "\n",
+ "x = np.random.rand(100)\n",
+ "y = 2.0+5*x*x+0.1*np.random.randn(100)\n",
+ "\n",
+ "\n",
+ "# The design matrix now as function of a given polynomial\n",
+ "X = np.zeros((len(x),3))\n",
+ "X[:,0] = 1.0\n",
+ "X[:,1] = x\n",
+ "X[:,2] = x**2\n",
+ "# We split the data in test and training data\n",
+ "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)\n",
+ "# matrix inversion to find beta\n",
+ "beta = np.linalg.inv(X_train.T @ X_train) @ X_train.T @ y_train\n",
+ "print(beta)\n",
+ "# and then make the prediction\n",
+ "ytilde = X_train @ beta\n",
+ "print(\"Training R2\")\n",
+ "print(R2(y_train,ytilde))\n",
+ "print(\"Training MSE\")\n",
+ "print(MSE(y_train,ytilde))\n",
+ "ypredict = X_test @ beta\n",
+ "print(\"Test R2\")\n",
+ "print(R2(y_test,ypredict))\n",
+ "print(\"Test MSE\")\n",
+ "print(MSE(y_test,ypredict))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "84df122f",
+ "metadata": {
+ "editable": true
+ },
+ "source": [
+ ""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "03589c66",
+ "metadata": {
+ "editable": true
+ },
+ "source": [
+ "## Exercise 3: Normalizing our data\n",
+ "\n",
+ "A much used approach before starting to train the data is to preprocess our\n",
+ "data. Normally the data may need a rescaling and/or may be sensitive\n",
+ "to extreme values. Scaling the data renders our inputs much more\n",
+ "suitable for the algorithms we want to employ.\n",
+ "\n",
+ "**Scikit-Learn** has several functions which allow us to rescale the\n",
+ "data, normally resulting in much better results in terms of various\n",
+ "accuracy scores. The **StandardScaler** function in **Scikit-Learn**\n",
+ "ensures that for each feature/predictor we study the mean value is\n",
+ "zero and the variance is one (every column in the design/feature\n",
+ "matrix). This scaling has the drawback that it does not ensure that\n",
+ "we have a particular maximum or minimum in our data set. Another\n",
+ "function included in **Scikit-Learn** is the **MinMaxScaler** which\n",
+ "ensures that all features are exactly between $0$ and $1$. The\n",
+ "\n",
+ "The **Normalizer** scales each data\n",
+ "point such that the feature vector has a euclidean length of one. In other words, it\n",
+ "projects a data point on the circle (or sphere in the case of higher dimensions) with a\n",
+ "radius of 1. This means every data point is scaled by a different number (by the\n",
+ "inverse of it’s length).\n",
+ "This normalization is often used when only the direction (or angle) of the data matters,\n",
+ "not the length of the feature vector.\n",
+ "\n",
+ "The **RobustScaler** works similarly to the StandardScaler in that it\n",
+ "ensures statistical properties for each feature that guarantee that\n",
+ "they are on the same scale. However, the RobustScaler uses the median\n",
+ "and quartiles, instead of mean and variance. This makes the\n",
+ "RobustScaler ignore data points that are very different from the rest\n",
+ "(like measurement errors). These odd data points are also called\n",
+ "outliers, and might often lead to trouble for other scaling\n",
+ "techniques.\n",
+ "\n",
+ "It also common to split the data in a **training** set and a **testing** set. A typical split is to use $80\\%$ of the data for training and the rest\n",
+ "for testing. This can be done as follows with our design matrix $\\boldsymbol{X}$ and data $\\boldsymbol{y}$ (remember to import **scikit-learn**)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 33,
+ "id": "fea646fd",
+ "metadata": {
+ "collapsed": false,
+ "editable": true
+ },
+ "outputs": [],
+ "source": [
+ "# split in training and test data\n",
+ "X_train, X_test, y_train, y_test = train_test_split(X,y,test_size=0.2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "cc9f1596",
+ "metadata": {
+ "editable": true
+ },
+ "source": [
+ "Then we can use the standard scaler to scale our data as"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 34,
+ "id": "37e49918",
+ "metadata": {
+ "collapsed": false,
+ "editable": true
+ },
+ "outputs": [],
+ "source": [
+ "scaler = StandardScaler()\n",
+ "scaler.fit(X_train)\n",
+ "X_train_scaled = scaler.transform(X_train)\n",
+ "X_test_scaled = scaler.transform(X_test)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "96244dc6",
+ "metadata": {
+ "editable": true
+ },
+ "source": [
+ "In this exercise we want you to to compute the MSE for the training\n",
+ "data and the test data as function of the complexity of a polynomial,\n",
+ "that is the degree of a given polynomial. We want you also to compute the $R2$ score as function of the complexity of the model for both training data and test data. You should also run the calculation with and without scaling. \n",
+ "\n",
+ "One of \n",
+ "the aims is to reproduce Figure 2.11 of [Hastie et al](https://github.com/CompPhysics/MLErasmus/blob/master/doc/Textbooks/elementsstat.pdf).\n",
+ "\n",
+ "Our data is defined by $x\\in [-3,3]$ with a total of for example $100$ data points."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 35,
+ "id": "e5a1f707",
+ "metadata": {
+ "collapsed": false,
+ "editable": true
+ },
+ "outputs": [],
+ "source": [
+ "np.random.seed()\n",
+ "n = 100\n",
+ "maxdegree = 14\n",
+ "# Make data set.\n",
+ "x = np.linspace(-3, 3, n).reshape(-1, 1)\n",
+ "y = np.exp(-x**2) + 1.5 * np.exp(-(x-2)**2)+ np.random.normal(0, 0.1, x.shape)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "50cf1b03",
+ "metadata": {
+ "editable": true
+ },
+ "source": [
+ "where $y$ is the function we want to fit with a given polynomial."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "6e8d74b3",
+ "metadata": {
+ "editable": true
+ },
+ "source": [
+ "**a)**\n",
+ "Write a first code which sets up a design matrix $X$ defined by a fifth-order polynomial. Scale your data and split it in training and test data."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "6d4baafc",
+ "metadata": {
+ "editable": true
+ },
+ "source": [
+ "**b)**\n",
+ "Perform an ordinary least squares and compute the means squared error and the $R2$ factor for the training data and the test data, with and without scaling."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "09ddba0d",
+ "metadata": {
+ "editable": true
+ },
+ "source": [
+ "**c)**\n",
+ "Add now a model which allows you to make polynomials up to degree $15$. Perform a standard OLS fitting of the training data and compute the MSE and $R2$ for the training and test data and plot both test and training data MSE and $R2$ as functions of the polynomial degree. Compare what you see with Figure 2.11 of Hastie et al. Comment your results. For which polynomial degree do you find an optimal MSE (smallest value)?"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "528882f7",
+ "metadata": {
+ "editable": true
+ },
+ "source": [
+ "## Exercise 4: Adding Ridge Regression\n",
+ "\n",
+ "This exercise is a continuation of exercise 2. We will use the same function to\n",
"generate our data set, still staying with a simple function $y(x)$\n",
"which we want to fit using linear regression, but now extending the\n",
- "analysis to include the Ridge and the Lasso regression methods.\n",
+ "analysis to include the Ridge regression method.\n",
"\n",
"We will thus again generate our own dataset for a function $y(x)$ where \n",
"$x \\in [0,1]$ and defined by random numbers computed with the uniform\n",
@@ -5308,8 +5715,8 @@
},
{
"cell_type": "code",
- "execution_count": 31,
- "id": "b4de4e65",
+ "execution_count": 36,
+ "id": "60a13cd9",
"metadata": {
"collapsed": false,
"editable": true
@@ -5322,7 +5729,7 @@
},
{
"cell_type": "markdown",
- "id": "32911141",
+ "id": "fec138dc",
"metadata": {
"editable": true
},
@@ -5336,8 +5743,8 @@
},
{
"cell_type": "code",
- "execution_count": 32,
- "id": "328b40ec",
+ "execution_count": 37,
+ "id": "450314dd",
"metadata": {
"collapsed": false,
"editable": true
@@ -5417,7 +5824,7 @@
},
{
"cell_type": "markdown",
- "id": "7fda7b42",
+ "id": "57b27a0d",
"metadata": {
"editable": true
},
@@ -5432,7 +5839,7 @@
},
{
"cell_type": "markdown",
- "id": "130aef70",
+ "id": "844f60b2",
"metadata": {
"editable": true
},
@@ -5445,7 +5852,7 @@
},
{
"cell_type": "markdown",
- "id": "2b1e07c6",
+ "id": "f9ff6d68",
"metadata": {
"editable": true
},
@@ -5456,7 +5863,7 @@
},
{
"cell_type": "markdown",
- "id": "1323e8aa",
+ "id": "b45d321c",
"metadata": {
"editable": true
},
@@ -5468,7 +5875,7 @@
},
{
"cell_type": "markdown",
- "id": "948dd1be",
+ "id": "2f8c6ddb",
"metadata": {
"editable": true
},
@@ -5478,7 +5885,7 @@
},
{
"cell_type": "markdown",
- "id": "5156277f",
+ "id": "b583593c",
"metadata": {
"editable": true
},
@@ -5490,275 +5897,100 @@
},
{
"cell_type": "markdown",
- "id": "f00ebb6f",
+ "id": "69e04a99",
"metadata": {
"editable": true
},
"source": [
- "Discuss these quantities as functions of the variable $\\lambda$ in the Ridge and Lasso regression methods."
+ "Discuss these quantities as functions of the variable $\\lambda$ in Ridge regression."
]
},
{
"cell_type": "markdown",
- "id": "648e4784",
+ "id": "d3ce0e67",
"metadata": {
"editable": true
},
"source": [
- "### Exercise: Linear Regression for a two-dimensional function\n",
+ "## Exercise 5: Analytical exercises\n",
"\n",
- "This is a longer exercise and the aim is to study in more detail various\n",
- "regression methods, including the Ordinary Least Squares (OLS) method,\n",
- "Ridge regression and finally Lasso regression.\n",
- "This exercise forms a part of project 1.\n",
+ "In this exercise we derive the expressions for various derivatives of\n",
+ "products of vectors and matrices. Such derivatives are central to the\n",
+ "optimization of various cost functions. Although we will often use\n",
+ "automatic differentiation in actual calculations, to be able to have\n",
+ "analytical expressions is extremely helpful in case we have simpler\n",
+ "derivatives as well as when we analyze various properties (like second\n",
+ "derivatives) of the chosen cost functions. Vectors are always written\n",
+ "as boldfaced lower case letters and matrices as upper case boldfaced\n",
+ "letters.\n",
"\n",
- "We will study how to fit polynomials to a specific\n",
- "two-dimensional function called [Franke's\n",
- "function](http://www.dtic.mil/dtic/tr/fulltext/u2/a081688.pdf). This\n",
- "is a function which has been widely used when testing various\n",
- "interpolation and fitting algorithms. \n",
- "\n",
- "The Franke function, which is a weighted sum of four exponentials reads as follows"
+ "Show that"
]
},
{
"cell_type": "markdown",
- "id": "016a35b2",
+ "id": "2145dba3",
"metadata": {
"editable": true
},
"source": [
"$$\n",
- "\\begin{align*}\n",
- "f(x,y) &= \\frac{3}{4}\\exp{\\left(-\\frac{(9x-2)^2}{4} - \\frac{(9y-2)^2}{4}\\right)}+\\frac{3}{4}\\exp{\\left(-\\frac{(9x+1)^2}{49}- \\frac{(9y+1)}{10}\\right)} \\\\\n",
- "&+\\frac{1}{2}\\exp{\\left(-\\frac{(9x-7)^2}{4} - \\frac{(9y-3)^2}{4}\\right)} -\\frac{1}{5}\\exp{\\left(-(9x-4)^2 - (9y-7)^2\\right) }.\n",
- "\\end{align*}\n",
+ "\\frac{\\partial (\\boldsymbol{b}^T\\boldsymbol{a})}{\\partial \\boldsymbol{a}} = \\boldsymbol{b},\n",
"$$"
]
},
{
"cell_type": "markdown",
- "id": "8cc55d7e",
+ "id": "4fe118b0",
"metadata": {
"editable": true
},
"source": [
- "The function will be defined for $x,y\\in [0,1]$. Our first step will\n",
- "be to perform an OLS regression analysis of this function, trying out\n",
- "a polynomial fit with an $x$ and $y$ dependence of the form $[x, y,\n",
- "x^2, y^2, xy, \\dots]$. We will fit a\n",
- "function (for example a polynomial) of $x$ and $y$. Thereafter we\n",
- "will repeat much of the same procedure using the Ridge and Lasso\n",
- "regression methods, introducing thus a dependence on the bias\n",
- "(penalty) $\\lambda$.\n",
- "\n",
- "The Python fucntion for the Franke function is included here (it performs also a three-dimensional plot of it)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 33,
- "id": "d4586550",
- "metadata": {
- "collapsed": false,
- "editable": true
- },
- "outputs": [],
- "source": [
- "from mpl_toolkits.mplot3d import Axes3D\n",
- "import matplotlib.pyplot as plt\n",
- "from matplotlib import cm\n",
- "from matplotlib.ticker import LinearLocator, FormatStrFormatter\n",
- "import numpy as np\n",
- "from random import random, seed\n",
- "\n",
- "fig = plt.figure()\n",
- "ax = fig.gca(projection='3d')\n",
- "\n",
- "# Make data.\n",
- "x = np.arange(0, 1, 0.05)\n",
- "y = np.arange(0, 1, 0.05)\n",
- "x, y = np.meshgrid(x,y)\n",
- "\n",
- "\n",
- "def FrankeFunction(x,y):\n",
- " term1 = 0.75*np.exp(-(0.25*(9*x-2)**2) - 0.25*((9*y-2)**2))\n",
- " term2 = 0.75*np.exp(-((9*x+1)**2)/49.0 - 0.1*(9*y+1))\n",
- " term3 = 0.5*np.exp(-(9*x-7)**2/4.0 - 0.25*((9*y-3)**2))\n",
- " term4 = -0.2*np.exp(-(9*x-4)**2 - (9*y-7)**2)\n",
- " return term1 + term2 + term3 + term4\n",
- "\n",
- "\n",
- "z = FrankeFunction(x, y)\n",
- "\n",
- "# Plot the surface.\n",
- "surf = ax.plot_surface(x, y, z, cmap=cm.coolwarm,\n",
- " linewidth=0, antialiased=False)\n",
- "\n",
- "# Customize the z axis.\n",
- "ax.set_zlim(-0.10, 1.40)\n",
- "ax.zaxis.set_major_locator(LinearLocator(10))\n",
- "ax.zaxis.set_major_formatter(FormatStrFormatter('%.02f'))\n",
- "\n",
- "# Add a color bar which maps values to colors.\n",
- "fig.colorbar(surf, shrink=0.5, aspect=5)\n",
- "\n",
- "plt.show()"
+ "and"
]
},
{
"cell_type": "markdown",
- "id": "ca637494",
- "metadata": {
- "editable": true
- },
- "source": [
- "We will generate our own dataset for a function\n",
- "$\\mathrm{FrankeFunction}(x,y)$ with $x,y \\in [0,1]$. The function\n",
- "$f(x,y)$ is the Franke function. You should explore also the addition\n",
- "an added stochastic noise to this function using the normal\n",
- "distribution $\\cal{N}(0,1)$.\n",
- "\n",
- "Write your own code (using either a matrix inversion or a singular\n",
- "value decomposition from e.g., **numpy** ) or use your code and perform a standard least square regression\n",
- "analysis using polynomials in $x$ and $y$ up to fifth order. You can use **scikit-learn** as well.\n",
- "\n",
- "Evaluate the Mean Squared error (MSE)"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "613dc88d",
+ "id": "1b53f42c",
"metadata": {
"editable": true
},
"source": [
"$$\n",
- "MSE(\\hat{y},\\hat{\\tilde{y}}) = \\frac{1}{n}\n",
- "\\sum_{i=0}^{n-1}(y_i-\\tilde{y}_i)^2,\n",
+ "\\frac{\\partial (\\boldsymbol{a}^T\\boldsymbol{A}\\boldsymbol{a})}{\\partial \\boldsymbol{a}} = (\\boldsymbol{A}+\\boldsymbol{A}^T)\\boldsymbol{a},\n",
"$$"
]
},
{
"cell_type": "markdown",
- "id": "ee825cff",
+ "id": "92bcb37f",
"metadata": {
"editable": true
},
"source": [
- "and the $R^2$ score function. If $\\tilde{\\hat{y}}_i$ is the predicted\n",
- "value of the $i-th$ sample and $y_i$ is the corresponding true value,\n",
- "then the score $R^2$ is defined as"
+ "and"
]
},
{
"cell_type": "markdown",
- "id": "624175bc",
+ "id": "a056cbb6",
"metadata": {
"editable": true
},
"source": [
"$$\n",
- "R^2(\\hat{y}, \\tilde{\\hat{y}}) = 1 - \\frac{\\sum_{i=0}^{n - 1} (y_i - \\tilde{y}_i)^2}{\\sum_{i=0}^{n - 1} (y_i - \\bar{y})^2},\n",
+ "\\frac{\\partial \\left(\\boldsymbol{x}-\\boldsymbol{A}\\boldsymbol{s}\\right)^T\\left(\\boldsymbol{x}-\\boldsymbol{A}\\boldsymbol{s}\\right)}{\\partial \\boldsymbol{s}} = -2\\left(\\boldsymbol{x}-\\boldsymbol{A}\\boldsymbol{s}\\right)^T\\boldsymbol{A},\n",
"$$"
]
},
{
"cell_type": "markdown",
- "id": "3ec0f6d7",
+ "id": "dd0edd15",
"metadata": {
"editable": true
},
"source": [
- "where we have defined the mean value of $\\hat{y}$ as"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "56362263",
- "metadata": {
- "editable": true
- },
- "source": [
- "$$\n",
- "\\bar{y} = \\frac{1}{n} \\sum_{i=0}^{n - 1} y_i.\n",
- "$$"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "357ca326",
- "metadata": {
- "editable": true
- },
- "source": [
- "You should split your data in train and test and also consider scaling the data.\n",
- "\n",
- "To set up the design matrix, the following code can be used"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 34,
- "id": "1584ccf6",
- "metadata": {
- "collapsed": false,
- "editable": true
- },
- "outputs": [],
- "source": [
- "def FrankeFunction(x,y):\n",
- "\tterm1 = 0.75*np.exp(-(0.25*(9*x-2)**2) - 0.25*((9*y-2)**2))\n",
- "\tterm2 = 0.75*np.exp(-((9*x+1)**2)/49.0 - 0.1*(9*y+1))\n",
- "\tterm3 = 0.5*np.exp(-(9*x-7)**2/4.0 - 0.25*((9*y-3)**2))\n",
- "\tterm4 = -0.2*np.exp(-(9*x-4)**2 - (9*y-7)**2)\n",
- "\treturn term1 + term2 + term3 + term4\n",
- "\n",
- "\n",
- "def create_X(x, y, n ):\n",
- "\tif len(x.shape) > 1:\n",
- "\t\tx = np.ravel(x)\n",
- "\t\ty = np.ravel(y)\n",
- "\n",
- "\tN = len(x)\n",
- "\tl = int((n+1)*(n+2)/2)\t\t# Number of elements in beta\n",
- "\tX = np.ones((N,l))\n",
- "\n",
- "\tfor i in range(1,n+1):\n",
- "\t\tq = int((i)*(i+1)/2)\n",
- "\t\tfor k in range(i+1):\n",
- "\t\t\tX[:,q+k] = (x**(i-k))*(y**k)\n",
- "\n",
- "\treturn X\n",
- "\n",
- "\n",
- "# Making meshgrid of datapoints and compute Franke's function\n",
- "n = 5\n",
- "N = 1000\n",
- "x = np.sort(np.random.uniform(0, 1, N))\n",
- "y = np.sort(np.random.uniform(0, 1, N))\n",
- "z = FrankeFunction(x, y)\n",
- "X = create_X(x, y, n=n)"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "ca5b0af2",
- "metadata": {
- "editable": true
- },
- "source": [
- "Write then your own code for the Ridge method or use **Scikit-Learn**.\n",
- "Perform the same analysis as you did for ordinary Least Squares (for the same polynomials) but now for different values of $\\lambda$. Compare and\n",
- "analyze your results with those obtained with ordinary Least Squares. Study the\n",
- "dependence on $\\lambda$.\n",
- "\n",
- "This part is essentially a repeat of the previous ones, but now\n",
- "with Lasso regression. Write either your own code or\n",
- "use the functionalities of **Scikit-Learn** (recommended). \n",
- "Give a\n",
- "critical discussion of the three methods and a judgement of which\n",
- "model fits the data best."
+ "and finally find the second derivative of this function with respect to the vector $\\boldsymbol{s}$."
]
}
],
diff --git a/doc/src/week35/week35.do.txt b/doc/src/week35/week35.do.txt
index e3be227ce..841d83689 100644
--- a/doc/src/week35/week35.do.txt
+++ b/doc/src/week35/week35.do.txt
@@ -6,7 +6,7 @@ DATE: today
!split
===== Plans for week 35 =====
-* Lab Wednesday: Work on exercises 1-5 for week 35
+* Lab Wednesday: Work on exercises 1-5 for week 35, see end of these slides for the exercises
* Thursday: Review of ordinary Least Squares with applications, reminder on statistics and start discussion of Ridge Regression and Singular Value Decom\
position
* Friday: Discussion of Ridge and Lasso Regression and links with Singular Value Decomposition
@@ -2521,19 +2521,252 @@ and reordering we have
This equation does not lead to a nice analytical equation as in either Ridge regression or ordinary least squares. This equation can however be solved by using standard convex optimization algorithms using for example the Python package "CVXOPT":"https://cvxopt.org/". We will discuss this later.
!split
-===== Exercises for week 36, September 6-10 =====
+===== Exercises for week 35 =====
The exercises here are meant to prepare you for work with project 1. The first exercise is a follow-up of exercise 2 from week 35 August 30-September 3).
+===== Exercise: Setting up various Python environments =====
-===== Exercise: Adding Ridge and Lasso Regression =====
+The first exercise here is of a mere technical art. We want you to have
+* 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 "GitHub facilities":"https://www.uio.no/tjenester/it/maskin/filer/versjonskontroll/github.html".
+* Install various Python packages
+
+We will make extensive use of Python as programming language and its
+myriad of available libraries. You will find
+IPython/Jupyter notebooks invaluable in your work. You can run _R_
+codes in the Jupyter/IPython notebooks, with the immediate benefit of
+visualizing your data. You can also use compiled languages like C++,
+Rust, Fortran etc if you prefer. The focus in these lectures will be
+on Python.
+
+If you have Python installed (we recommend Python3) and you feel
+pretty familiar with installing different packages, we recommend that
+you install the following Python packages via _pip_ as
+
+o pip install numpy scipy matplotlib ipython scikit-learn sympy pandas pillow
+
+For _Tensorflow_, we recommend following the instructions in the text of
+"Aurelien Geron, Hands‑On Machine Learning with Scikit‑Learn and TensorFlow, O'Reilly":"http://shop.oreilly.com/product/0636920052289.do"
+
+We will come back to _tensorflow_ later.
+
+For Python3, replace _pip_ with _pip3_.
+
+For OSX users we recommend, after having installed Xcode, to
+install _brew_. Brew allows for a seamless installation of additional
+software via for example
+
+o brew install python3
+
+For Linux users, with its variety of distributions like for example the widely popular Ubuntu distribution,
+you can use _pip_ as well and simply install Python as
+
+o sudo apt-get install python3 (or python for Python2.7)
+
+If you don't want to perform these operations separately and venture
+into the hassle of exploring how to set up dependencies and paths, we
+recommend two widely used distrubutions which set up all relevant
+dependencies for Python, namely
+
+* "Anaconda":"https://docs.anaconda.com/",
+
+which 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 _conda_.
+
+* "Enthought canopy":"https://www.enthought.com/product/canopy/"
+
+is a Python
+distribution for scientific and analytic computing distribution and
+analysis environment, available for free and under a commercial
+license.
+
+We recommend using _Anaconda_ if you are not too familiar with setting paths in a terminal environment.
-This exercise is a continuation of exercise 2 from exercise set 1
-(week 35, August 30-September 3). We will use the same function to
+
+
+===== Exercise: making your own data and exploring scikit-learn =====
+
+
+We will generate our own dataset for a function $y(x)$ where $x \in [0,1]$ and defined by random numbers computed with the uniform distribution. The function $y$ is a quadratic polynomial in $x$ with added stochastic noise according to the normal distribution $\cal {N}(0,1)$.
+The following simple Python instructions define our $x$ and $y$ values (with 100 data points).
+!bc pycod
+x = np.random.rand(100,1)
+y = 2.0+5*x*x+0.1*np.random.randn(100,1)
+!ec
+
+o Write your own code (following the examples under the "regression notes":"https://compphysics.github.io/MachineLearning/doc/LectureNotes/_build/html/chapter1.html") for computing the parametrization of the data set fitting a second-order polynomial.
+o Use thereafter _scikit-learn_ (see again the examples in the regression slides) and compare with your own code.
+o Using scikit-learn, compute also the mean square error, a risk metric corresponding to the expected value of the squared (quadratic) error defined as
+!bt
+\[ MSE(\bm{y},\bm{\tilde{y}}) = \frac{1}{n}
+\sum_{i=0}^{n-1}(y_i-\tilde{y}_i)^2,
+\]
+!et
+and the $R^2$ score function.
+If $\tilde{\bm{y}}_i$ is the predicted value of the $i-th$ sample and $y_i$ is the corresponding true value, then the score $R^2$ is defined as
+!bt
+\[
+R^2(\bm{y}, \tilde{\bm{y}}) = 1 - \frac{\sum_{i=0}^{n - 1} (y_i - \tilde{y}_i)^2}{\sum_{i=0}^{n - 1} (y_i - \bar{y})^2},
+\]
+!et
+where we have defined the mean value of $\bm{y}$ as
+!bt
+\[
+\bar{y} = \frac{1}{n} \sum_{i=0}^{n - 1} y_i.
+\]
+!et
+You can use the functionality included in scikit-learn. If you feel for it, you can use your own program and define functions which compute the above two functions.
+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.
+
+!bsol
+The code here is an example of where we define our own design matrix and fit parameters $\beta$.
+!bc pycod
+import os
+import numpy as np
+import pandas as pd
+import matplotlib.pyplot as plt
+from sklearn.model_selection import train_test_split
+
+def save_fig(fig_id):
+ plt.savefig(image_path(fig_id) + ".png", format='png')
+
+def R2(y_data, y_model):
+ return 1 - np.sum((y_data - y_model) ** 2) / np.sum((y_data - np.mean(y_data)) ** 2)
+def MSE(y_data,y_model):
+ n = np.size(y_model)
+ return np.sum((y_data-y_model)**2)/n
+
+x = np.random.rand(100)
+y = 2.0+5*x*x+0.1*np.random.randn(100)
+
+
+# The design matrix now as function of a given polynomial
+X = np.zeros((len(x),3))
+X[:,0] = 1.0
+X[:,1] = x
+X[:,2] = x**2
+# We split the data in test and training data
+X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)
+# matrix inversion to find beta
+beta = np.linalg.inv(X_train.T @ X_train) @ X_train.T @ y_train
+print(beta)
+# and then make the prediction
+ytilde = X_train @ beta
+print("Training R2")
+print(R2(y_train,ytilde))
+print("Training MSE")
+print(MSE(y_train,ytilde))
+ypredict = X_test @ beta
+print("Test R2")
+print(R2(y_test,ypredict))
+print("Test MSE")
+print(MSE(y_test,ypredict))
+!ec
+!esol
+
+
+
+===== Exercise: Normalizing our data =====
+
+
+A much used approach before starting to train the data is to preprocess our
+data. Normally the data may need a rescaling and/or may be sensitive
+to extreme values. Scaling the data renders our inputs much more
+suitable for the algorithms we want to employ.
+
+_Scikit-Learn_ has several functions which allow us to rescale the
+data, normally resulting in much better results in terms of various
+accuracy scores. The _StandardScaler_ function in _Scikit-Learn_
+ensures that for each feature/predictor we study the mean value is
+zero and the variance is one (every column in the design/feature
+matrix). This scaling has the drawback that it does not ensure that
+we have a particular maximum or minimum in our data set. Another
+function included in _Scikit-Learn_ is the _MinMaxScaler_ which
+ensures that all features are exactly between $0$ and $1$. The
+
+
+The _Normalizer_ scales each data
+point such that the feature vector has a euclidean length of one. In other words, it
+projects a data point on the circle (or sphere in the case of higher dimensions) with a
+radius of 1. This means every data point is scaled by a different number (by the
+inverse of it’s length).
+This normalization is often used when only the direction (or angle) of the data matters,
+not the length of the feature vector.
+
+The _RobustScaler_ works similarly to the StandardScaler in that it
+ensures statistical properties for each feature that guarantee that
+they are on the same scale. However, the RobustScaler uses the median
+and quartiles, instead of mean and variance. This makes the
+RobustScaler ignore data points that are very different from the rest
+(like measurement errors). These odd data points are also called
+outliers, and might often lead to trouble for other scaling
+techniques.
+
+
+It also common to split the data in a _training_ set and a _testing_ set. A typical split is to use $80\%$ of the data for training and the rest
+for testing. This can be done as follows with our design matrix $\bm{X}$ and data $\bm{y}$ (remember to import _scikit-learn_)
+!bc pycod
+# split in training and test data
+X_train, X_test, y_train, y_test = train_test_split(X,y,test_size=0.2)
+!ec
+Then we can use the standard scaler to scale our data as
+!bc pycod
+scaler = StandardScaler()
+scaler.fit(X_train)
+X_train_scaled = scaler.transform(X_train)
+X_test_scaled = scaler.transform(X_test)
+!ec
+
+
+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. We want you also to compute the $R2$ score as function of the complexity of the model for both training data and test data. You should also run the calculation with and without scaling.
+
+One of
+the aims is to reproduce Figure 2.11 of "Hastie et al":"https://github.com/CompPhysics/MLErasmus/blob/master/doc/Textbooks/elementsstat.pdf".
+
+
+
+Our data is defined by $x\in [-3,3]$ with a total of for example $100$ data points.
+!bc pycod
+np.random.seed()
+n = 100
+maxdegree = 14
+# Make data set.
+x = np.linspace(-3, 3, n).reshape(-1, 1)
+y = np.exp(-x**2) + 1.5 * np.exp(-(x-2)**2)+ np.random.normal(0, 0.1, x.shape)
+!ec
+where $y$ is the function we want to fit with a given polynomial.
+!bsubex
+Write a first code which sets up a design matrix $X$ defined by a fifth-order polynomial. Scale your data and split it in training and test data.
+!esubex
+
+!bsubex
+Perform an ordinary least squares and compute the means squared error and the $R2$ factor for the training data and the test data, with and without scaling.
+!esubex
+
+!bsubex
+Add now a model which allows you to make polynomials up to degree $15$. Perform a standard OLS fitting of the training data and compute the MSE and $R2$ for the training and test data and plot both test and training data MSE and $R2$ as functions of the polynomial degree. Compare what you see with Figure 2.11 of Hastie et al. Comment your results. For which polynomial degree do you find an optimal MSE (smallest value)?
+
+!esubex
+
+
+
+
+
+
+
+===== Exercise: Adding Ridge Regression =====
+
+
+This exercise is a continuation of exercise 2. We will use the same function to
generate our data set, still staying with a simple function $y(x)$
which we want to fit using linear regression, but now extending the
-analysis to include the Ridge and the Lasso regression methods.
+analysis to include the Ridge regression method.
We will thus again generate our own dataset for a function $y(x)$ where
$x \in [0,1]$ and defined by random numbers computed with the uniform
@@ -2654,191 +2887,38 @@ where we have defined the mean value of $\hat{y}$ as
\bar{y} = \frac{1}{n} \sum_{i=0}^{n - 1} y_i.
\]
!et
-Discuss these quantities as functions of the variable $\lambda$ in the Ridge and Lasso regression methods.
+Discuss these quantities as functions of the variable $\lambda$ in Ridge regression.
+===== Exercise: Analytical exercises =====
+In this exercise we derive the expressions for various derivatives of
+products of vectors and matrices. Such derivatives are central to the
+optimization of various cost functions. Although we will often use
+automatic differentiation in actual calculations, to be able to have
+analytical expressions is extremely helpful in case we have simpler
+derivatives as well as when we analyze various properties (like second
+derivatives) of the chosen cost functions. Vectors are always written
+as boldfaced lower case letters and matrices as upper case boldfaced
+letters.
-
-
-=== Exercise: Linear Regression for a two-dimensional function ===
-
-This is a longer exercise and the aim is to study in more detail various
-regression methods, including the Ordinary Least Squares (OLS) method,
-Ridge regression and finally Lasso regression.
-This exercise forms a part of project 1.
-
-We will study how to fit polynomials to a specific
-two-dimensional function called "Franke's
-function":"http://www.dtic.mil/dtic/tr/fulltext/u2/a081688.pdf". This
-is a function which has been widely used when testing various
-interpolation and fitting algorithms.
-
-The Franke function, which is a weighted sum of four exponentials reads as follows
-!bt
-\begin{align*}
-f(x,y) &= \frac{3}{4}\exp{\left(-\frac{(9x-2)^2}{4} - \frac{(9y-2)^2}{4}\right)}+\frac{3}{4}\exp{\left(-\frac{(9x+1)^2}{49}- \frac{(9y+1)}{10}\right)} \\
-&+\frac{1}{2}\exp{\left(-\frac{(9x-7)^2}{4} - \frac{(9y-3)^2}{4}\right)} -\frac{1}{5}\exp{\left(-(9x-4)^2 - (9y-7)^2\right) }.
-\end{align*}
-!et
-
-The function will be defined for $x,y\in [0,1]$. Our first step will
-be to perform an OLS regression analysis of this function, trying out
-a polynomial fit with an $x$ and $y$ dependence of the form $[x, y,
-x^2, y^2, xy, \dots]$. We will fit a
-function (for example a polynomial) of $x$ and $y$. Thereafter we
-will repeat much of the same procedure using the Ridge and Lasso
-regression methods, introducing thus a dependence on the bias
-(penalty) $\lambda$.
-
-
-The Python fucntion for the Franke function is included here (it performs also a three-dimensional plot of it)
-!bc pycod
-from mpl_toolkits.mplot3d import Axes3D
-import matplotlib.pyplot as plt
-from matplotlib import cm
-from matplotlib.ticker import LinearLocator, FormatStrFormatter
-import numpy as np
-from random import random, seed
-
-fig = plt.figure()
-ax = fig.gca(projection='3d')
-
-# Make data.
-x = np.arange(0, 1, 0.05)
-y = np.arange(0, 1, 0.05)
-x, y = np.meshgrid(x,y)
-
-
-def FrankeFunction(x,y):
- term1 = 0.75*np.exp(-(0.25*(9*x-2)**2) - 0.25*((9*y-2)**2))
- term2 = 0.75*np.exp(-((9*x+1)**2)/49.0 - 0.1*(9*y+1))
- term3 = 0.5*np.exp(-(9*x-7)**2/4.0 - 0.25*((9*y-3)**2))
- term4 = -0.2*np.exp(-(9*x-4)**2 - (9*y-7)**2)
- return term1 + term2 + term3 + term4
-
-
-z = FrankeFunction(x, y)
-
-# Plot the surface.
-surf = ax.plot_surface(x, y, z, cmap=cm.coolwarm,
- linewidth=0, antialiased=False)
-
-# Customize the z axis.
-ax.set_zlim(-0.10, 1.40)
-ax.zaxis.set_major_locator(LinearLocator(10))
-ax.zaxis.set_major_formatter(FormatStrFormatter('%.02f'))
-
-# Add a color bar which maps values to colors.
-fig.colorbar(surf, shrink=0.5, aspect=5)
-
-plt.show()
-
-!ec
-
-
-
-We will generate our own dataset for a function
-$\mathrm{FrankeFunction}(x,y)$ with $x,y \in [0,1]$. The function
-$f(x,y)$ is the Franke function. You should explore also the addition
-an added stochastic noise to this function using the normal
-distribution $\cal{N}(0,1)$.
-
-Write your own code (using either a matrix inversion or a singular
-value decomposition from e.g., _numpy_ ) or use your code and perform a standard least square regression
-analysis using polynomials in $x$ and $y$ up to fifth order. You can use _scikit-learn_ as well.
-
-
-Evaluate the Mean Squared error (MSE)
-
-!bt
-\[ MSE(\hat{y},\hat{\tilde{y}}) = \frac{1}{n}
-\sum_{i=0}^{n-1}(y_i-\tilde{y}_i)^2,
-\]
-!et
-
-and the $R^2$ score function. If $\tilde{\hat{y}}_i$ is the predicted
-value of the $i-th$ sample and $y_i$ is the corresponding true value,
-then the score $R^2$ is defined as
-
+Show that
!bt
\[
-R^2(\hat{y}, \tilde{\hat{y}}) = 1 - \frac{\sum_{i=0}^{n - 1} (y_i - \tilde{y}_i)^2}{\sum_{i=0}^{n - 1} (y_i - \bar{y})^2},
+\frac{\partial (\bm{b}^T\bm{a})}{\partial \bm{a}} = \bm{b},
\]
!et
-
-where we have defined the mean value of $\hat{y}$ as
-
+and
!bt
\[
-\bar{y} = \frac{1}{n} \sum_{i=0}^{n - 1} y_i.
+\frac{\partial (\bm{a}^T\bm{A}\bm{a})}{\partial \bm{a}} = (\bm{A}+\bm{A}^T)\bm{a},
\]
!et
-
-
-You should split your data in train and test and also consider scaling the data.
-
-To set up the design matrix, the following code can be used
-!bc pycod
-def FrankeFunction(x,y):
- term1 = 0.75*np.exp(-(0.25*(9*x-2)**2) - 0.25*((9*y-2)**2))
- term2 = 0.75*np.exp(-((9*x+1)**2)/49.0 - 0.1*(9*y+1))
- term3 = 0.5*np.exp(-(9*x-7)**2/4.0 - 0.25*((9*y-3)**2))
- term4 = -0.2*np.exp(-(9*x-4)**2 - (9*y-7)**2)
- return term1 + term2 + term3 + term4
-
-
-def create_X(x, y, n ):
- if len(x.shape) > 1:
- x = np.ravel(x)
- y = np.ravel(y)
-
- N = len(x)
- l = int((n+1)*(n+2)/2) # Number of elements in beta
- X = np.ones((N,l))
-
- for i in range(1,n+1):
- q = int((i)*(i+1)/2)
- for k in range(i+1):
- X[:,q+k] = (x**(i-k))*(y**k)
-
- return X
-
-
-# Making meshgrid of datapoints and compute Franke's function
-n = 5
-N = 1000
-x = np.sort(np.random.uniform(0, 1, N))
-y = np.sort(np.random.uniform(0, 1, N))
-z = FrankeFunction(x, y)
-X = create_X(x, y, n=n)
-!ec
-
-
-
-Write then your own code for the Ridge method or use _Scikit-Learn_.
-Perform the same analysis as you did for ordinary Least Squares (for the same polynomials) but now for different values of $\lambda$. Compare and
-analyze your results with those obtained with ordinary Least Squares. Study the
-dependence on $\lambda$.
-
-
-This part is essentially a repeat of the previous ones, but now
-with Lasso regression. Write either your own code or
-use the functionalities of _Scikit-Learn_ (recommended).
-Give a
-critical discussion of the three methods and a judgement of which
-model fits the data best.
-
-
-
-
-
-
-
-
-
-
-
-
-
+and
+!bt
+\[
+\frac{\partial \left(\bm{x}-\bm{A}\bm{s}\right)^T\left(\bm{x}-\bm{A}\bm{s}\right)}{\partial \bm{s}} = -2\left(\bm{x}-\bm{A}\bm{s}\right)^T\bm{A},
+\]
+!et
+and finally find the second derivative of this function with respect to the vector $\bm{s}$.