diff --git a/doc/pub/week36/html/._week36-bs000.html b/doc/pub/week36/html/._week36-bs000.html index 34985172f..96cba984d 100644 --- a/doc/pub/week36/html/._week36-bs000.html +++ b/doc/pub/week36/html/._week36-bs000.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs001.html b/doc/pub/week36/html/._week36-bs001.html index b675b670e..db194ad2a 100644 --- a/doc/pub/week36/html/._week36-bs001.html +++ b/doc/pub/week36/html/._week36-bs001.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs002.html b/doc/pub/week36/html/._week36-bs002.html index d8c4a640a..6f98d613f 100644 --- a/doc/pub/week36/html/._week36-bs002.html +++ b/doc/pub/week36/html/._week36-bs002.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs003.html b/doc/pub/week36/html/._week36-bs003.html index d4542544d..a9a67f591 100644 --- a/doc/pub/week36/html/._week36-bs003.html +++ b/doc/pub/week36/html/._week36-bs003.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs004.html b/doc/pub/week36/html/._week36-bs004.html index bd23f604e..23497e067 100644 --- a/doc/pub/week36/html/._week36-bs004.html +++ b/doc/pub/week36/html/._week36-bs004.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs005.html b/doc/pub/week36/html/._week36-bs005.html index 5a5ea8d1b..8d9657a27 100644 --- a/doc/pub/week36/html/._week36-bs005.html +++ b/doc/pub/week36/html/._week36-bs005.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs006.html b/doc/pub/week36/html/._week36-bs006.html index 961a96454..108dd7ab7 100644 --- a/doc/pub/week36/html/._week36-bs006.html +++ b/doc/pub/week36/html/._week36-bs006.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs007.html b/doc/pub/week36/html/._week36-bs007.html index 5aa9a3f8d..87b015dc1 100644 --- a/doc/pub/week36/html/._week36-bs007.html +++ b/doc/pub/week36/html/._week36-bs007.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs008.html b/doc/pub/week36/html/._week36-bs008.html index 14473ea09..6a8cfd5c7 100644 --- a/doc/pub/week36/html/._week36-bs008.html +++ b/doc/pub/week36/html/._week36-bs008.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs009.html b/doc/pub/week36/html/._week36-bs009.html index 7e2a6b402..8d7f22979 100644 --- a/doc/pub/week36/html/._week36-bs009.html +++ b/doc/pub/week36/html/._week36-bs009.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs010.html b/doc/pub/week36/html/._week36-bs010.html index 9ed3531de..e75696e4f 100644 --- a/doc/pub/week36/html/._week36-bs010.html +++ b/doc/pub/week36/html/._week36-bs010.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs011.html b/doc/pub/week36/html/._week36-bs011.html index 251badeb0..55ec931dd 100644 --- a/doc/pub/week36/html/._week36-bs011.html +++ b/doc/pub/week36/html/._week36-bs011.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs012.html b/doc/pub/week36/html/._week36-bs012.html index b0f2021f7..ff03789f6 100644 --- a/doc/pub/week36/html/._week36-bs012.html +++ b/doc/pub/week36/html/._week36-bs012.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs013.html b/doc/pub/week36/html/._week36-bs013.html index 373abb5ee..25d6725c2 100644 --- a/doc/pub/week36/html/._week36-bs013.html +++ b/doc/pub/week36/html/._week36-bs013.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs014.html b/doc/pub/week36/html/._week36-bs014.html index b22b74030..d68c4af11 100644 --- a/doc/pub/week36/html/._week36-bs014.html +++ b/doc/pub/week36/html/._week36-bs014.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs015.html b/doc/pub/week36/html/._week36-bs015.html index 890761b31..73884048c 100644 --- a/doc/pub/week36/html/._week36-bs015.html +++ b/doc/pub/week36/html/._week36-bs015.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs016.html b/doc/pub/week36/html/._week36-bs016.html index 3c6233b62..b50c630c1 100644 --- a/doc/pub/week36/html/._week36-bs016.html +++ b/doc/pub/week36/html/._week36-bs016.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs017.html b/doc/pub/week36/html/._week36-bs017.html index d3ec57308..5a368f808 100644 --- a/doc/pub/week36/html/._week36-bs017.html +++ b/doc/pub/week36/html/._week36-bs017.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs018.html b/doc/pub/week36/html/._week36-bs018.html index d9df7182f..44a5e06a7 100644 --- a/doc/pub/week36/html/._week36-bs018.html +++ b/doc/pub/week36/html/._week36-bs018.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs019.html b/doc/pub/week36/html/._week36-bs019.html index 66ba22be8..6f199bdc1 100644 --- a/doc/pub/week36/html/._week36-bs019.html +++ b/doc/pub/week36/html/._week36-bs019.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs020.html b/doc/pub/week36/html/._week36-bs020.html index 578bab843..faf04be24 100644 --- a/doc/pub/week36/html/._week36-bs020.html +++ b/doc/pub/week36/html/._week36-bs020.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs021.html b/doc/pub/week36/html/._week36-bs021.html index 79a179f04..322171d69 100644 --- a/doc/pub/week36/html/._week36-bs021.html +++ b/doc/pub/week36/html/._week36-bs021.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs022.html b/doc/pub/week36/html/._week36-bs022.html index b5b928a84..92216b441 100644 --- a/doc/pub/week36/html/._week36-bs022.html +++ b/doc/pub/week36/html/._week36-bs022.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs023.html b/doc/pub/week36/html/._week36-bs023.html index 8e0990658..833bf4670 100644 --- a/doc/pub/week36/html/._week36-bs023.html +++ b/doc/pub/week36/html/._week36-bs023.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs024.html b/doc/pub/week36/html/._week36-bs024.html index 76485f693..d51bcfe00 100644 --- a/doc/pub/week36/html/._week36-bs024.html +++ b/doc/pub/week36/html/._week36-bs024.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs025.html b/doc/pub/week36/html/._week36-bs025.html index 4604185d0..28c29e7cd 100644 --- a/doc/pub/week36/html/._week36-bs025.html +++ b/doc/pub/week36/html/._week36-bs025.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs026.html b/doc/pub/week36/html/._week36-bs026.html index b5815e012..b2c9135bf 100644 --- a/doc/pub/week36/html/._week36-bs026.html +++ b/doc/pub/week36/html/._week36-bs026.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs027.html b/doc/pub/week36/html/._week36-bs027.html index 113c7427c..be924e282 100644 --- a/doc/pub/week36/html/._week36-bs027.html +++ b/doc/pub/week36/html/._week36-bs027.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs028.html b/doc/pub/week36/html/._week36-bs028.html index 968035cb2..dcb45e575 100644 --- a/doc/pub/week36/html/._week36-bs028.html +++ b/doc/pub/week36/html/._week36-bs028.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs029.html b/doc/pub/week36/html/._week36-bs029.html index 2763e420a..4c99dcae0 100644 --- a/doc/pub/week36/html/._week36-bs029.html +++ b/doc/pub/week36/html/._week36-bs029.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs030.html b/doc/pub/week36/html/._week36-bs030.html index 4a2820ecb..41b3d4429 100644 --- a/doc/pub/week36/html/._week36-bs030.html +++ b/doc/pub/week36/html/._week36-bs030.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs031.html b/doc/pub/week36/html/._week36-bs031.html index 25ccba843..c423a4141 100644 --- a/doc/pub/week36/html/._week36-bs031.html +++ b/doc/pub/week36/html/._week36-bs031.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs032.html b/doc/pub/week36/html/._week36-bs032.html index 72224d091..c444b15d8 100644 --- a/doc/pub/week36/html/._week36-bs032.html +++ b/doc/pub/week36/html/._week36-bs032.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs033.html b/doc/pub/week36/html/._week36-bs033.html index 2e471515e..132191fd2 100644 --- a/doc/pub/week36/html/._week36-bs033.html +++ b/doc/pub/week36/html/._week36-bs033.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs034.html b/doc/pub/week36/html/._week36-bs034.html index ed4060e96..ece6880bf 100644 --- a/doc/pub/week36/html/._week36-bs034.html +++ b/doc/pub/week36/html/._week36-bs034.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs035.html b/doc/pub/week36/html/._week36-bs035.html index 7a7023412..ef0cee695 100644 --- a/doc/pub/week36/html/._week36-bs035.html +++ b/doc/pub/week36/html/._week36-bs035.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs036.html b/doc/pub/week36/html/._week36-bs036.html index ede4a943a..dc97ccea5 100644 --- a/doc/pub/week36/html/._week36-bs036.html +++ b/doc/pub/week36/html/._week36-bs036.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs037.html b/doc/pub/week36/html/._week36-bs037.html index 3189a2249..8c0f40f4f 100644 --- a/doc/pub/week36/html/._week36-bs037.html +++ b/doc/pub/week36/html/._week36-bs037.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs038.html b/doc/pub/week36/html/._week36-bs038.html index c7fda2237..1bbde7944 100644 --- a/doc/pub/week36/html/._week36-bs038.html +++ b/doc/pub/week36/html/._week36-bs038.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs039.html b/doc/pub/week36/html/._week36-bs039.html index cb693d574..654e135c9 100644 --- a/doc/pub/week36/html/._week36-bs039.html +++ b/doc/pub/week36/html/._week36-bs039.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs040.html b/doc/pub/week36/html/._week36-bs040.html index 4d0818548..581349cf6 100644 --- a/doc/pub/week36/html/._week36-bs040.html +++ b/doc/pub/week36/html/._week36-bs040.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs041.html b/doc/pub/week36/html/._week36-bs041.html index a43493294..eda0847c2 100644 --- a/doc/pub/week36/html/._week36-bs041.html +++ b/doc/pub/week36/html/._week36-bs041.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs042.html b/doc/pub/week36/html/._week36-bs042.html index 2e04439dc..badecd612 100644 --- a/doc/pub/week36/html/._week36-bs042.html +++ b/doc/pub/week36/html/._week36-bs042.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs043.html b/doc/pub/week36/html/._week36-bs043.html index 0a5fb4c3c..04305f004 100644 --- a/doc/pub/week36/html/._week36-bs043.html +++ b/doc/pub/week36/html/._week36-bs043.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs044.html b/doc/pub/week36/html/._week36-bs044.html index be9a9685a..40142227f 100644 --- a/doc/pub/week36/html/._week36-bs044.html +++ b/doc/pub/week36/html/._week36-bs044.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs045.html b/doc/pub/week36/html/._week36-bs045.html index ed0307c42..c0852dbc2 100644 --- a/doc/pub/week36/html/._week36-bs045.html +++ b/doc/pub/week36/html/._week36-bs045.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs046.html b/doc/pub/week36/html/._week36-bs046.html index b5de21513..d83d92efd 100644 --- a/doc/pub/week36/html/._week36-bs046.html +++ b/doc/pub/week36/html/._week36-bs046.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs047.html b/doc/pub/week36/html/._week36-bs047.html index 26ed40457..bd4de925e 100644 --- a/doc/pub/week36/html/._week36-bs047.html +++ b/doc/pub/week36/html/._week36-bs047.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs048.html b/doc/pub/week36/html/._week36-bs048.html index 4f1cb5bec..abfeb6c04 100644 --- a/doc/pub/week36/html/._week36-bs048.html +++ b/doc/pub/week36/html/._week36-bs048.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs049.html b/doc/pub/week36/html/._week36-bs049.html index 78d27fdb2..2220a7c7e 100644 --- a/doc/pub/week36/html/._week36-bs049.html +++ b/doc/pub/week36/html/._week36-bs049.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs050.html b/doc/pub/week36/html/._week36-bs050.html index 2edbed50c..e8d72ebeb 100644 --- a/doc/pub/week36/html/._week36-bs050.html +++ b/doc/pub/week36/html/._week36-bs050.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs051.html b/doc/pub/week36/html/._week36-bs051.html index 53f710ae7..a13d66763 100644 --- a/doc/pub/week36/html/._week36-bs051.html +++ b/doc/pub/week36/html/._week36-bs051.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • diff --git a/doc/pub/week36/html/._week36-bs052.html b/doc/pub/week36/html/._week36-bs052.html index c85859f4f..cdbfdc7d2 100644 --- a/doc/pub/week36/html/._week36-bs052.html +++ b/doc/pub/week36/html/._week36-bs052.html @@ -165,7 +165,15 @@ doconce format html week36.do.txt --html_style=bootstrap --pygments_html_style=d 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -252,6 +260,8 @@ MathJax.Hub.Config({
  • Invoking Bayes' theorem
  • Ridge and Bayes
  • Lasso and Bayes
  • +
  • Exercise 1: mean values and variances in linear regression
  • +
  • Exercise 2: Adding Ridge and Lasso Regression
  • @@ -292,6 +302,143 @@ C(\boldsymbol{\beta}=\frac{\vert\vert (\boldsymbol{y}-\boldsymbol{X}\boldsymbol{ $$

    which is our Lasso cost function!

    + + +

    Exercise 1: mean values and variances in linear regression

    + +

    This exercise deals with various mean values ad variances in linear regression method (here it may be useful to look up chapter 3, equation (3.8) of Trevor Hastie, Robert Tibshirani, Jerome H. Friedman, The Elements of Statistical Learning, Springer).

    + +

    The assumption we have made is +that there exists a function \( f(\boldsymbol{x}) \) and a normal distributed error \( \boldsymbol{\varepsilon}\sim \mathcal{N}(0, \sigma^2) \) +which describes our data +

    +$$ +\boldsymbol{y} = f(\boldsymbol{x})+\boldsymbol{\varepsilon} +$$ + +

    We then approximate this function with our model from the solution of the linear regression equations (ordinary least squares OLS), that is our +function \( f \) is approximated by \( \boldsymbol{\tilde{y}} \) where we minimized \( (\boldsymbol{y}-\boldsymbol{\tilde{y}})^2 \), with +

    +$$ +\boldsymbol{\tilde{y}} = \boldsymbol{X}\boldsymbol{\beta}. +$$ + +

    The matrix \( \boldsymbol{X} \) is the so-called design matrix.

    + + +

    +a) +Show that the expectation value of \( \boldsymbol{y} \) for a given element \( i \) +

    +$$ +\begin{align*} +\mathbb{E}(y_i) & =\mathbf{X}_{i, \ast} \, \beta, +\end{align*} +$$ + +

    and that +its variance is +

    +$$ +\begin{align*} \mbox{Var}(y_i) & = \sigma^2. +\end{align*} +$$ + +

    Hence, \( y_i \sim \mathcal{N}( \mathbf{X}_{i, \ast} \, \boldsymbol{\beta}, \sigma^2) \), that is \( \boldsymbol{y} \) follows a normal distribution with +mean value \( \boldsymbol{X}\boldsymbol{\beta} \) and variance \( \sigma^2 \). +

    + + + + +

    +b) +With the OLS expressions for the parameters \( \boldsymbol{\beta} \) show that +

    +$$ +\mathbb{E}(\boldsymbol{\beta}) = \boldsymbol{\beta}. +$$ + + + + + +

    +c) +Show finally that the variance of \( \boldsymbol{\beta} \) is +

    +$$ +\begin{eqnarray*} +\mbox{Var}(\boldsymbol{\beta}) & = & \sigma^2 \, (\mathbf{X}^{T} \mathbf{X})^{-1}. +\end{eqnarray*} +$$ + + + + + + + +

    Exercise 2: Adding Ridge and Lasso Regression

    + +

    This exercise is a continuation of the exercises from week 35.

    + +

    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. +

    + +

    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 +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).

    + + +
    +
    +
    +
    +
    +
    x = np.random.rand(100)
    +y = 2.0+5*x*x+0.1*np.random.randn(100)
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + +

    +a) +Write your own code for the Ridge method (see chapter 3.4 of Hastie et al., equations (3.43) and (3.44)) and compute the parametrization for different values of \( \lambda \). Study the dependence on \( \lambda \) while also varying the strength of the noise in your expression for \( y(x) \). +

    + + + + +

    +b) +Our next step is to study the variance of the parameters \( \beta_1 \) and \( \beta_2 \) (assuming that we are parameterizing our function with a second-order polynomial). We will use standard linear regression and the Ridge regression. You can now opt for either writing your own function or using Scikit-Learn to find the parameters \( \beta \). From your results calculate the variance of these parameters (recall that this is equal to the diagonal elements of the matrix \( (\hat{X}^T\hat{X})+\lambda\hat{I})^{-1} \)). Discuss the results of these variances as functions of \( \lambda \). In particular, try to link your discussion with the discussion in Hastie et al. and their figures 3.10 and 3.11. Scikit-Learn may not provide the variance of the parameters \( \beta \). This needs to be checked. With your own code you can however do so. +

    + + + +

    diff --git a/doc/pub/week36/html/week36-reveal.html b/doc/pub/week36/html/week36-reveal.html index 12c3f18dc..faee3d1d9 100644 --- a/doc/pub/week36/html/week36-reveal.html +++ b/doc/pub/week36/html/week36-reveal.html @@ -2333,6 +2333,155 @@ $$

     

    which is our Lasso cost function!

    + + +

    Exercise 1: mean values and variances in linear regression

    + +

    This exercise deals with various mean values ad variances in linear regression method (here it may be useful to look up chapter 3, equation (3.8) of Trevor Hastie, Robert Tibshirani, Jerome H. Friedman, The Elements of Statistical Learning, Springer).

    + +

    The assumption we have made is +that there exists a function \( f(\boldsymbol{x}) \) and a normal distributed error \( \boldsymbol{\varepsilon}\sim \mathcal{N}(0, \sigma^2) \) +which describes our data +

    +

     
    +$$ +\boldsymbol{y} = f(\boldsymbol{x})+\boldsymbol{\varepsilon} +$$ +

     
    + +

    We then approximate this function with our model from the solution of the linear regression equations (ordinary least squares OLS), that is our +function \( f \) is approximated by \( \boldsymbol{\tilde{y}} \) where we minimized \( (\boldsymbol{y}-\boldsymbol{\tilde{y}})^2 \), with +

    +

     
    +$$ +\boldsymbol{\tilde{y}} = \boldsymbol{X}\boldsymbol{\beta}. +$$ +

     
    + +

    The matrix \( \boldsymbol{X} \) is the so-called design matrix.

    + + +

    +a) +Show that the expectation value of \( \boldsymbol{y} \) for a given element \( i \) +

    +

     
    +$$ +\begin{align*} +\mathbb{E}(y_i) & =\mathbf{X}_{i, \ast} \, \beta, +\end{align*} +$$ +

     
    + +

    and that +its variance is +

    +

     
    +$$ +\begin{align*} \mbox{Var}(y_i) & = \sigma^2. +\end{align*} +$$ +

     
    + +

    Hence, \( y_i \sim \mathcal{N}( \mathbf{X}_{i, \ast} \, \boldsymbol{\beta}, \sigma^2) \), that is \( \boldsymbol{y} \) follows a normal distribution with +mean value \( \boldsymbol{X}\boldsymbol{\beta} \) and variance \( \sigma^2 \). +

    + + + + +

    +b) +With the OLS expressions for the parameters \( \boldsymbol{\beta} \) show that +

    +

     
    +$$ +\mathbb{E}(\boldsymbol{\beta}) = \boldsymbol{\beta}. +$$ +

     
    + + + + + +

    +c) +Show finally that the variance of \( \boldsymbol{\beta} \) is +

    +

     
    +$$ +\begin{eqnarray*} +\mbox{Var}(\boldsymbol{\beta}) & = & \sigma^2 \, (\mathbf{X}^{T} \mathbf{X})^{-1}. +\end{eqnarray*} +$$ +

     
    + + + + + + + +

    Exercise 2: Adding Ridge and Lasso Regression

    + +

    This exercise is a continuation of the exercises from week 35.

    + +

    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. +

    + +

    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 +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).

    + + +
    +
    +
    +
    +
    +
    x = np.random.rand(100)
    +y = 2.0+5*x*x+0.1*np.random.randn(100)
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + +

    +a) +Write your own code for the Ridge method (see chapter 3.4 of Hastie et al., equations (3.43) and (3.44)) and compute the parametrization for different values of \( \lambda \). Study the dependence on \( \lambda \) while also varying the strength of the noise in your expression for \( y(x) \). +

    + + + + +

    +b) +Our next step is to study the variance of the parameters \( \beta_1 \) and \( \beta_2 \) (assuming that we are parameterizing our function with a second-order polynomial). We will use standard linear regression and the Ridge regression. You can now opt for either writing your own function or using Scikit-Learn to find the parameters \( \beta \). From your results calculate the variance of these parameters (recall that this is equal to the diagonal elements of the matrix \( (\hat{X}^T\hat{X})+\lambda\hat{I})^{-1} \)). Discuss the results of these variances as functions of \( \lambda \). In particular, try to link your discussion with the discussion in Hastie et al. and their figures 3.10 and 3.11. Scikit-Learn may not provide the variance of the parameters \( \beta \). This needs to be checked. With your own code you can however do so. +

    + + + + diff --git a/doc/pub/week36/html/week36-solarized.html b/doc/pub/week36/html/week36-solarized.html index 746005ec3..48b3a1024 100644 --- a/doc/pub/week36/html/week36-solarized.html +++ b/doc/pub/week36/html/week36-solarized.html @@ -192,7 +192,15 @@ div.toc p,a { 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -2136,6 +2144,143 @@ C(\boldsymbol{\beta}=\frac{\vert\vert (\boldsymbol{y}-\boldsymbol{X}\boldsymbol{ $$

    which is our Lasso cost function!

    + + +

    Exercise 1: mean values and variances in linear regression

    + +

    This exercise deals with various mean values ad variances in linear regression method (here it may be useful to look up chapter 3, equation (3.8) of Trevor Hastie, Robert Tibshirani, Jerome H. Friedman, The Elements of Statistical Learning, Springer).

    + +

    The assumption we have made is +that there exists a function \( f(\boldsymbol{x}) \) and a normal distributed error \( \boldsymbol{\varepsilon}\sim \mathcal{N}(0, \sigma^2) \) +which describes our data +

    +$$ +\boldsymbol{y} = f(\boldsymbol{x})+\boldsymbol{\varepsilon} +$$ + +

    We then approximate this function with our model from the solution of the linear regression equations (ordinary least squares OLS), that is our +function \( f \) is approximated by \( \boldsymbol{\tilde{y}} \) where we minimized \( (\boldsymbol{y}-\boldsymbol{\tilde{y}})^2 \), with +

    +$$ +\boldsymbol{\tilde{y}} = \boldsymbol{X}\boldsymbol{\beta}. +$$ + +

    The matrix \( \boldsymbol{X} \) is the so-called design matrix.

    + + +

    +a) +Show that the expectation value of \( \boldsymbol{y} \) for a given element \( i \) +

    +$$ +\begin{align*} +\mathbb{E}(y_i) & =\mathbf{X}_{i, \ast} \, \beta, +\end{align*} +$$ + +

    and that +its variance is +

    +$$ +\begin{align*} \mbox{Var}(y_i) & = \sigma^2. +\end{align*} +$$ + +

    Hence, \( y_i \sim \mathcal{N}( \mathbf{X}_{i, \ast} \, \boldsymbol{\beta}, \sigma^2) \), that is \( \boldsymbol{y} \) follows a normal distribution with +mean value \( \boldsymbol{X}\boldsymbol{\beta} \) and variance \( \sigma^2 \). +

    + + + + +

    +b) +With the OLS expressions for the parameters \( \boldsymbol{\beta} \) show that +

    +$$ +\mathbb{E}(\boldsymbol{\beta}) = \boldsymbol{\beta}. +$$ + + + + + +

    +c) +Show finally that the variance of \( \boldsymbol{\beta} \) is +

    +$$ +\begin{eqnarray*} +\mbox{Var}(\boldsymbol{\beta}) & = & \sigma^2 \, (\mathbf{X}^{T} \mathbf{X})^{-1}. +\end{eqnarray*} +$$ + + + + + + + +

    Exercise 2: Adding Ridge and Lasso Regression

    + +

    This exercise is a continuation of the exercises from week 35.

    + +

    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. +

    + +

    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 +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).

    + + +
    +
    +
    +
    +
    +
    x = np.random.rand(100)
    +y = 2.0+5*x*x+0.1*np.random.randn(100)
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + +

    +a) +Write your own code for the Ridge method (see chapter 3.4 of Hastie et al., equations (3.43) and (3.44)) and compute the parametrization for different values of \( \lambda \). Study the dependence on \( \lambda \) while also varying the strength of the noise in your expression for \( y(x) \). +

    + + + + +

    +b) +Our next step is to study the variance of the parameters \( \beta_1 \) and \( \beta_2 \) (assuming that we are parameterizing our function with a second-order polynomial). We will use standard linear regression and the Ridge regression. You can now opt for either writing your own function or using Scikit-Learn to find the parameters \( \beta \). From your results calculate the variance of these parameters (recall that this is equal to the diagonal elements of the matrix \( (\hat{X}^T\hat{X})+\lambda\hat{I})^{-1} \)). Discuss the results of these variances as functions of \( \lambda \). In particular, try to link your discussion with the discussion in Hastie et al. and their figures 3.10 and 3.11. Scikit-Learn may not provide the variance of the parameters \( \beta \). This needs to be checked. With your own code you can however do so. +

    + + + +
    © 1999-2022, Morten Hjorth-Jensen. Released under CC Attribution-NonCommercial 4.0 license diff --git a/doc/pub/week36/html/week36.html b/doc/pub/week36/html/week36.html index adcd1b761..a163efff5 100644 --- a/doc/pub/week36/html/week36.html +++ b/doc/pub/week36/html/week36.html @@ -269,7 +269,15 @@ div.toc p,a { 'test-function-for-what-happens-with-ols-ridge-and-lasso'), ("Invoking Bayes' theorem", 2, None, 'invoking-bayes-theorem'), ('Ridge and Bayes', 2, None, 'ridge-and-bayes'), - ('Lasso and Bayes', 2, None, 'lasso-and-bayes')]} + ('Lasso and Bayes', 2, None, 'lasso-and-bayes'), + ('Exercise 1: mean values and variances in linear regression', + 2, + None, + 'exercise-1-mean-values-and-variances-in-linear-regression'), + ('Exercise 2: Adding Ridge and Lasso Regression', + 2, + None, + 'exercise-2-adding-ridge-and-lasso-regression')]} end of tocinfo --> @@ -2213,6 +2221,143 @@ C(\boldsymbol{\beta}=\frac{\vert\vert (\boldsymbol{y}-\boldsymbol{X}\boldsymbol{ $$

    which is our Lasso cost function!

    + + +

    Exercise 1: mean values and variances in linear regression

    + +

    This exercise deals with various mean values ad variances in linear regression method (here it may be useful to look up chapter 3, equation (3.8) of Trevor Hastie, Robert Tibshirani, Jerome H. Friedman, The Elements of Statistical Learning, Springer).

    + +

    The assumption we have made is +that there exists a function \( f(\boldsymbol{x}) \) and a normal distributed error \( \boldsymbol{\varepsilon}\sim \mathcal{N}(0, \sigma^2) \) +which describes our data +

    +$$ +\boldsymbol{y} = f(\boldsymbol{x})+\boldsymbol{\varepsilon} +$$ + +

    We then approximate this function with our model from the solution of the linear regression equations (ordinary least squares OLS), that is our +function \( f \) is approximated by \( \boldsymbol{\tilde{y}} \) where we minimized \( (\boldsymbol{y}-\boldsymbol{\tilde{y}})^2 \), with +

    +$$ +\boldsymbol{\tilde{y}} = \boldsymbol{X}\boldsymbol{\beta}. +$$ + +

    The matrix \( \boldsymbol{X} \) is the so-called design matrix.

    + + +

    +a) +Show that the expectation value of \( \boldsymbol{y} \) for a given element \( i \) +

    +$$ +\begin{align*} +\mathbb{E}(y_i) & =\mathbf{X}_{i, \ast} \, \beta, +\end{align*} +$$ + +

    and that +its variance is +

    +$$ +\begin{align*} \mbox{Var}(y_i) & = \sigma^2. +\end{align*} +$$ + +

    Hence, \( y_i \sim \mathcal{N}( \mathbf{X}_{i, \ast} \, \boldsymbol{\beta}, \sigma^2) \), that is \( \boldsymbol{y} \) follows a normal distribution with +mean value \( \boldsymbol{X}\boldsymbol{\beta} \) and variance \( \sigma^2 \). +

    + + + + +

    +b) +With the OLS expressions for the parameters \( \boldsymbol{\beta} \) show that +

    +$$ +\mathbb{E}(\boldsymbol{\beta}) = \boldsymbol{\beta}. +$$ + + + + + +

    +c) +Show finally that the variance of \( \boldsymbol{\beta} \) is +

    +$$ +\begin{eqnarray*} +\mbox{Var}(\boldsymbol{\beta}) & = & \sigma^2 \, (\mathbf{X}^{T} \mathbf{X})^{-1}. +\end{eqnarray*} +$$ + + + + + + + +

    Exercise 2: Adding Ridge and Lasso Regression

    + +

    This exercise is a continuation of the exercises from week 35.

    + +

    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. +

    + +

    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 +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).

    + + +
    +
    +
    +
    +
    +
    x = np.random.rand(100)
    +y = 2.0+5*x*x+0.1*np.random.randn(100)
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + +

    +a) +Write your own code for the Ridge method (see chapter 3.4 of Hastie et al., equations (3.43) and (3.44)) and compute the parametrization for different values of \( \lambda \). Study the dependence on \( \lambda \) while also varying the strength of the noise in your expression for \( y(x) \). +

    + + + + +

    +b) +Our next step is to study the variance of the parameters \( \beta_1 \) and \( \beta_2 \) (assuming that we are parameterizing our function with a second-order polynomial). We will use standard linear regression and the Ridge regression. You can now opt for either writing your own function or using Scikit-Learn to find the parameters \( \beta \). From your results calculate the variance of these parameters (recall that this is equal to the diagonal elements of the matrix \( (\hat{X}^T\hat{X})+\lambda\hat{I})^{-1} \)). Discuss the results of these variances as functions of \( \lambda \). In particular, try to link your discussion with the discussion in Hastie et al. and their figures 3.10 and 3.11. Scikit-Learn may not provide the variance of the parameters \( \beta \). This needs to be checked. With your own code you can however do so. +

    + + + +
    © 1999-2022, Morten Hjorth-Jensen. Released under CC Attribution-NonCommercial 4.0 license diff --git a/doc/pub/week36/ipynb/ipynb-week36-src.tar.gz b/doc/pub/week36/ipynb/ipynb-week36-src.tar.gz index 98f79cdae..5232eedd9 100644 Binary files a/doc/pub/week36/ipynb/ipynb-week36-src.tar.gz and b/doc/pub/week36/ipynb/ipynb-week36-src.tar.gz differ diff --git a/doc/pub/week36/ipynb/week36.ipynb b/doc/pub/week36/ipynb/week36.ipynb index bc0e4ea9e..245ea3ef5 100644 --- a/doc/pub/week36/ipynb/week36.ipynb +++ b/doc/pub/week36/ipynb/week36.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "88de71d7", + "id": "125caf53", "metadata": { "editable": true }, @@ -14,7 +14,7 @@ }, { "cell_type": "markdown", - "id": "46bfab40", + "id": "5cee5bc4", "metadata": { "editable": true }, @@ -29,7 +29,7 @@ }, { "cell_type": "markdown", - "id": "bef0ef90", + "id": "20f453bd", "metadata": { "editable": true }, @@ -50,7 +50,7 @@ }, { "cell_type": "markdown", - "id": "80766845", + "id": "7f9c790c", "metadata": { "editable": true }, @@ -60,7 +60,7 @@ }, { "cell_type": "markdown", - "id": "5fa3b5ec", + "id": "a777fb47", "metadata": { "editable": true }, @@ -70,7 +70,7 @@ }, { "cell_type": "markdown", - "id": "d3d45261", + "id": "8ed6551f", "metadata": { "editable": true }, @@ -82,7 +82,7 @@ }, { "cell_type": "markdown", - "id": "4802fddd", + "id": "0c5bcbaa", "metadata": { "editable": true }, @@ -94,7 +94,7 @@ }, { "cell_type": "markdown", - "id": "d4c380ba", + "id": "358d2973", "metadata": { "editable": true }, @@ -104,7 +104,7 @@ }, { "cell_type": "markdown", - "id": "dc13ef7f", + "id": "0544b273", "metadata": { "editable": true }, @@ -116,7 +116,7 @@ }, { "cell_type": "markdown", - "id": "23fdbdcd", + "id": "fb0d896a", "metadata": { "editable": true }, @@ -126,7 +126,7 @@ }, { "cell_type": "markdown", - "id": "165925e1", + "id": "ffd85330", "metadata": { "editable": true }, @@ -143,7 +143,7 @@ }, { "cell_type": "markdown", - "id": "2d43effe", + "id": "339220bd", "metadata": { "editable": true }, @@ -153,7 +153,7 @@ }, { "cell_type": "markdown", - "id": "cb902c72", + "id": "955291e8", "metadata": { "editable": true }, @@ -165,7 +165,7 @@ }, { "cell_type": "markdown", - "id": "d0c27bc1", + "id": "75dc1b34", "metadata": { "editable": true }, @@ -175,7 +175,7 @@ }, { "cell_type": "markdown", - "id": "c101b54f", + "id": "a806699c", "metadata": { "editable": true }, @@ -187,7 +187,7 @@ }, { "cell_type": "markdown", - "id": "c3a95561", + "id": "a473cbde", "metadata": { "editable": true }, @@ -201,7 +201,7 @@ }, { "cell_type": "markdown", - "id": "9b3e7fcd", + "id": "69643837", "metadata": { "editable": true }, @@ -213,7 +213,7 @@ }, { "cell_type": "markdown", - "id": "9d03d422", + "id": "61ff6d93", "metadata": { "editable": true }, @@ -235,7 +235,7 @@ }, { "cell_type": "markdown", - "id": "00dba62e", + "id": "ff5b59ec", "metadata": { "editable": true }, @@ -247,7 +247,7 @@ }, { "cell_type": "markdown", - "id": "2346e6f9", + "id": "d5b0d9e8", "metadata": { "editable": true }, @@ -262,7 +262,7 @@ }, { "cell_type": "markdown", - "id": "41675af9", + "id": "df796edf", "metadata": { "editable": true }, @@ -274,7 +274,7 @@ }, { "cell_type": "markdown", - "id": "8970a591", + "id": "69e22d85", "metadata": { "editable": true }, @@ -286,7 +286,7 @@ }, { "cell_type": "markdown", - "id": "bc14dcff", + "id": "4bd87608", "metadata": { "editable": true }, @@ -296,7 +296,7 @@ }, { "cell_type": "markdown", - "id": "65685f92", + "id": "7e0e78bc", "metadata": { "editable": true }, @@ -308,7 +308,7 @@ }, { "cell_type": "markdown", - "id": "a291a9ed", + "id": "5ee8bf9c", "metadata": { "editable": true }, @@ -318,7 +318,7 @@ }, { "cell_type": "markdown", - "id": "82c544c1", + "id": "8a22fbe2", "metadata": { "editable": true }, @@ -330,7 +330,7 @@ }, { "cell_type": "markdown", - "id": "6bd4a71b", + "id": "5f088122", "metadata": { "editable": true }, @@ -340,7 +340,7 @@ }, { "cell_type": "markdown", - "id": "4f20aac0", + "id": "3c5bd7b9", "metadata": { "editable": true }, @@ -352,7 +352,7 @@ }, { "cell_type": "markdown", - "id": "ca88ec6a", + "id": "7d1853a3", "metadata": { "editable": true }, @@ -369,7 +369,7 @@ }, { "cell_type": "markdown", - "id": "fac2f9a7", + "id": "20512eba", "metadata": { "editable": true }, @@ -383,7 +383,7 @@ { "cell_type": "code", "execution_count": 1, - "id": "9af97af3", + "id": "72feae50", "metadata": { "collapsed": false, "editable": true @@ -395,7 +395,7 @@ }, { "cell_type": "markdown", - "id": "3d2b9a19", + "id": "8e5ac99b", "metadata": { "editable": true }, @@ -406,7 +406,7 @@ { "cell_type": "code", "execution_count": 2, - "id": "e3d2b9a4", + "id": "78ec0065", "metadata": { "collapsed": false, "editable": true @@ -446,7 +446,7 @@ }, { "cell_type": "markdown", - "id": "b1498890", + "id": "05f29c7f", "metadata": { "editable": true }, @@ -466,7 +466,7 @@ }, { "cell_type": "markdown", - "id": "96b54d64", + "id": "259d1287", "metadata": { "editable": true }, @@ -478,7 +478,7 @@ }, { "cell_type": "markdown", - "id": "d91dccb9", + "id": "c3409c20", "metadata": { "editable": true }, @@ -489,7 +489,7 @@ { "cell_type": "code", "execution_count": 3, - "id": "75bd5b7a", + "id": "beece231", "metadata": { "collapsed": false, "editable": true @@ -523,7 +523,7 @@ }, { "cell_type": "markdown", - "id": "dd7f502a", + "id": "6088623a", "metadata": { "editable": true }, @@ -533,7 +533,7 @@ }, { "cell_type": "markdown", - "id": "818ea6a2", + "id": "eee435dc", "metadata": { "editable": true }, @@ -546,7 +546,7 @@ }, { "cell_type": "markdown", - "id": "3c4dce19", + "id": "5458b9f9", "metadata": { "editable": true }, @@ -558,7 +558,7 @@ }, { "cell_type": "markdown", - "id": "96c5013e", + "id": "97fae67d", "metadata": { "editable": true }, @@ -568,7 +568,7 @@ }, { "cell_type": "markdown", - "id": "a73ffee7", + "id": "97712489", "metadata": { "editable": true }, @@ -581,7 +581,7 @@ }, { "cell_type": "markdown", - "id": "c5cf81d9", + "id": "c236e8e0", "metadata": { "editable": true }, @@ -591,7 +591,7 @@ }, { "cell_type": "markdown", - "id": "922ef708", + "id": "fa1a628f", "metadata": { "editable": true }, @@ -603,7 +603,7 @@ }, { "cell_type": "markdown", - "id": "1999a462", + "id": "14cedb41", "metadata": { "editable": true }, @@ -618,7 +618,7 @@ }, { "cell_type": "markdown", - "id": "27e50469", + "id": "1552dc30", "metadata": { "editable": true }, @@ -631,7 +631,7 @@ }, { "cell_type": "markdown", - "id": "b1af14df", + "id": "198f44dd", "metadata": { "editable": true }, @@ -643,7 +643,7 @@ }, { "cell_type": "markdown", - "id": "46f97037", + "id": "d4ca0a67", "metadata": { "editable": true }, @@ -655,7 +655,7 @@ }, { "cell_type": "markdown", - "id": "8ae9b2cd", + "id": "7bbc1bd8", "metadata": { "editable": true }, @@ -665,7 +665,7 @@ }, { "cell_type": "markdown", - "id": "4581d4dc", + "id": "8ae7a79e", "metadata": { "editable": true }, @@ -678,7 +678,7 @@ }, { "cell_type": "markdown", - "id": "b94dd16d", + "id": "de4f2258", "metadata": { "editable": true }, @@ -690,7 +690,7 @@ }, { "cell_type": "markdown", - "id": "39e8b537", + "id": "052207f5", "metadata": { "editable": true }, @@ -702,7 +702,7 @@ }, { "cell_type": "markdown", - "id": "8c552660", + "id": "0265a2e7", "metadata": { "editable": true }, @@ -714,7 +714,7 @@ }, { "cell_type": "markdown", - "id": "5a3d51c8", + "id": "3cb46ce4", "metadata": { "editable": true }, @@ -726,7 +726,7 @@ }, { "cell_type": "markdown", - "id": "b29e3cf2", + "id": "b8764aaf", "metadata": { "editable": true }, @@ -740,7 +740,7 @@ }, { "cell_type": "markdown", - "id": "43f3a2b9", + "id": "d197db94", "metadata": { "editable": true }, @@ -752,7 +752,7 @@ }, { "cell_type": "markdown", - "id": "d9ff205b", + "id": "493f2dd4", "metadata": { "editable": true }, @@ -762,7 +762,7 @@ }, { "cell_type": "markdown", - "id": "1a89bc5a", + "id": "4dda5e95", "metadata": { "editable": true }, @@ -774,7 +774,7 @@ }, { "cell_type": "markdown", - "id": "99489cb1", + "id": "fa72907d", "metadata": { "editable": true }, @@ -784,7 +784,7 @@ }, { "cell_type": "markdown", - "id": "0018a8a9", + "id": "ad1a62a4", "metadata": { "editable": true }, @@ -796,7 +796,7 @@ }, { "cell_type": "markdown", - "id": "3c9560de", + "id": "660b0b00", "metadata": { "editable": true }, @@ -808,7 +808,7 @@ }, { "cell_type": "markdown", - "id": "c4e846c7", + "id": "39671aa8", "metadata": { "editable": true }, @@ -818,7 +818,7 @@ }, { "cell_type": "markdown", - "id": "b885c7d9", + "id": "ed9d0978", "metadata": { "editable": true }, @@ -829,7 +829,7 @@ }, { "cell_type": "markdown", - "id": "cc34db5e", + "id": "2c24a63d", "metadata": { "editable": true }, @@ -841,7 +841,7 @@ }, { "cell_type": "markdown", - "id": "cfd398c0", + "id": "d0b63d9c", "metadata": { "editable": true }, @@ -857,7 +857,7 @@ }, { "cell_type": "markdown", - "id": "ab7a20df", + "id": "d21179ac", "metadata": { "editable": true }, @@ -870,7 +870,7 @@ }, { "cell_type": "markdown", - "id": "9539332a", + "id": "cdcab448", "metadata": { "editable": true }, @@ -882,7 +882,7 @@ }, { "cell_type": "markdown", - "id": "38836656", + "id": "9836ccce", "metadata": { "editable": true }, @@ -892,7 +892,7 @@ }, { "cell_type": "markdown", - "id": "febb493c", + "id": "e7681acb", "metadata": { "editable": true }, @@ -904,7 +904,7 @@ }, { "cell_type": "markdown", - "id": "b30cee83", + "id": "3eacd690", "metadata": { "editable": true }, @@ -914,7 +914,7 @@ }, { "cell_type": "markdown", - "id": "f6ffe28c", + "id": "d17b45b7", "metadata": { "editable": true }, @@ -926,7 +926,7 @@ }, { "cell_type": "markdown", - "id": "5cfcfc0e", + "id": "87da8f32", "metadata": { "editable": true }, @@ -938,7 +938,7 @@ }, { "cell_type": "markdown", - "id": "d5d3bb29", + "id": "a39c38ca", "metadata": { "editable": true }, @@ -954,7 +954,7 @@ }, { "cell_type": "markdown", - "id": "0964b7de", + "id": "3cd2b66d", "metadata": { "editable": true }, @@ -966,7 +966,7 @@ }, { "cell_type": "markdown", - "id": "1bad8505", + "id": "be1e2950", "metadata": { "editable": true }, @@ -978,7 +978,7 @@ }, { "cell_type": "markdown", - "id": "84694fc4", + "id": "ddd46241", "metadata": { "editable": true }, @@ -988,7 +988,7 @@ }, { "cell_type": "markdown", - "id": "a5ffa6c8", + "id": "bddd02d4", "metadata": { "editable": true }, @@ -1000,7 +1000,7 @@ }, { "cell_type": "markdown", - "id": "21f79a3f", + "id": "86bf3b12", "metadata": { "editable": true }, @@ -1010,7 +1010,7 @@ }, { "cell_type": "markdown", - "id": "0e5fdc40", + "id": "adb2f138", "metadata": { "editable": true }, @@ -1022,7 +1022,7 @@ }, { "cell_type": "markdown", - "id": "e8077272", + "id": "714c951e", "metadata": { "editable": true }, @@ -1039,7 +1039,7 @@ }, { "cell_type": "markdown", - "id": "d964a0ee", + "id": "f14a76d7", "metadata": { "editable": true }, @@ -1051,7 +1051,7 @@ }, { "cell_type": "markdown", - "id": "5a53f9e3", + "id": "707e3af3", "metadata": { "editable": true }, @@ -1063,7 +1063,7 @@ }, { "cell_type": "markdown", - "id": "4d36367b", + "id": "d496968a", "metadata": { "editable": true }, @@ -1073,7 +1073,7 @@ }, { "cell_type": "markdown", - "id": "1f77727c", + "id": "fd5f6956", "metadata": { "editable": true }, @@ -1085,7 +1085,7 @@ }, { "cell_type": "markdown", - "id": "d2933817", + "id": "9b2edb25", "metadata": { "editable": true }, @@ -1095,7 +1095,7 @@ }, { "cell_type": "markdown", - "id": "d3b4d713", + "id": "70a89378", "metadata": { "editable": true }, @@ -1107,7 +1107,7 @@ }, { "cell_type": "markdown", - "id": "b0c235bb", + "id": "9442c709", "metadata": { "editable": true }, @@ -1117,7 +1117,7 @@ }, { "cell_type": "markdown", - "id": "aed4db48", + "id": "5d0d43a7", "metadata": { "editable": true }, @@ -1129,7 +1129,7 @@ }, { "cell_type": "markdown", - "id": "765cc722", + "id": "25c7e47e", "metadata": { "editable": true }, @@ -1139,7 +1139,7 @@ }, { "cell_type": "markdown", - "id": "e2b5fda3", + "id": "71041034", "metadata": { "editable": true }, @@ -1154,7 +1154,7 @@ }, { "cell_type": "markdown", - "id": "05c3f120", + "id": "25910b28", "metadata": { "editable": true }, @@ -1166,7 +1166,7 @@ }, { "cell_type": "markdown", - "id": "4a92ebe1", + "id": "42eb46a4", "metadata": { "editable": true }, @@ -1176,7 +1176,7 @@ }, { "cell_type": "markdown", - "id": "c376c38d", + "id": "00496366", "metadata": { "editable": true }, @@ -1188,7 +1188,7 @@ }, { "cell_type": "markdown", - "id": "d758287a", + "id": "3cbdb923", "metadata": { "editable": true }, @@ -1200,7 +1200,7 @@ }, { "cell_type": "markdown", - "id": "106e861d", + "id": "6aa8188d", "metadata": { "editable": true }, @@ -1212,7 +1212,7 @@ }, { "cell_type": "markdown", - "id": "68d9795a", + "id": "2bea0e10", "metadata": { "editable": true }, @@ -1222,7 +1222,7 @@ }, { "cell_type": "markdown", - "id": "d55b7a01", + "id": "359562df", "metadata": { "editable": true }, @@ -1234,7 +1234,7 @@ }, { "cell_type": "markdown", - "id": "99cc51a1", + "id": "cfa9b51e", "metadata": { "editable": true }, @@ -1246,7 +1246,7 @@ }, { "cell_type": "markdown", - "id": "ee8df5bc", + "id": "9393cce8", "metadata": { "editable": true }, @@ -1258,7 +1258,7 @@ }, { "cell_type": "markdown", - "id": "5293b8ee", + "id": "08133b2b", "metadata": { "editable": true }, @@ -1268,7 +1268,7 @@ }, { "cell_type": "markdown", - "id": "3059996c", + "id": "d181dda9", "metadata": { "editable": true }, @@ -1280,7 +1280,7 @@ }, { "cell_type": "markdown", - "id": "f28309c2", + "id": "3e9e3742", "metadata": { "editable": true }, @@ -1290,7 +1290,7 @@ }, { "cell_type": "markdown", - "id": "5578d701", + "id": "5f089ec7", "metadata": { "editable": true }, @@ -1304,7 +1304,7 @@ }, { "cell_type": "markdown", - "id": "dfe3abe0", + "id": "18fe0f46", "metadata": { "editable": true }, @@ -1314,7 +1314,7 @@ }, { "cell_type": "markdown", - "id": "bede06de", + "id": "2f7d1d72", "metadata": { "editable": true }, @@ -1326,7 +1326,7 @@ }, { "cell_type": "markdown", - "id": "d67decd2", + "id": "8adfcdf5", "metadata": { "editable": true }, @@ -1338,7 +1338,7 @@ }, { "cell_type": "markdown", - "id": "fa7b1156", + "id": "c16842a4", "metadata": { "editable": true }, @@ -1348,7 +1348,7 @@ }, { "cell_type": "markdown", - "id": "78f12390", + "id": "1c07db2c", "metadata": { "editable": true }, @@ -1360,7 +1360,7 @@ }, { "cell_type": "markdown", - "id": "d4b0b073", + "id": "e0279c5d", "metadata": { "editable": true }, @@ -1370,7 +1370,7 @@ }, { "cell_type": "markdown", - "id": "c905f781", + "id": "1133a15e", "metadata": { "editable": true }, @@ -1382,7 +1382,7 @@ }, { "cell_type": "markdown", - "id": "8a8b6750", + "id": "07eab9de", "metadata": { "editable": true }, @@ -1394,7 +1394,7 @@ }, { "cell_type": "markdown", - "id": "e51b1e35", + "id": "821d3ba3", "metadata": { "editable": true }, @@ -1404,7 +1404,7 @@ }, { "cell_type": "markdown", - "id": "f7ea66f9", + "id": "dcfe832d", "metadata": { "editable": true }, @@ -1416,7 +1416,7 @@ }, { "cell_type": "markdown", - "id": "f08c9fd0", + "id": "e3811c23", "metadata": { "editable": true }, @@ -1426,7 +1426,7 @@ }, { "cell_type": "markdown", - "id": "503136c0", + "id": "42f711af", "metadata": { "editable": true }, @@ -1438,7 +1438,7 @@ }, { "cell_type": "markdown", - "id": "f4099269", + "id": "d74a0b47", "metadata": { "editable": true }, @@ -1450,7 +1450,7 @@ }, { "cell_type": "markdown", - "id": "e9fffd49", + "id": "c707098d", "metadata": { "editable": true }, @@ -1460,7 +1460,7 @@ }, { "cell_type": "markdown", - "id": "9fb9c5fe", + "id": "fa78c159", "metadata": { "editable": true }, @@ -1472,7 +1472,7 @@ }, { "cell_type": "markdown", - "id": "75eaff62", + "id": "e9e8e4cd", "metadata": { "editable": true }, @@ -1485,7 +1485,7 @@ }, { "cell_type": "markdown", - "id": "3443d1af", + "id": "eaa9a09d", "metadata": { "editable": true }, @@ -1497,7 +1497,7 @@ }, { "cell_type": "markdown", - "id": "1b243849", + "id": "4f61dd7d", "metadata": { "editable": true }, @@ -1509,7 +1509,7 @@ }, { "cell_type": "markdown", - "id": "f508edf0", + "id": "0c7ededb", "metadata": { "editable": true }, @@ -1521,7 +1521,7 @@ }, { "cell_type": "markdown", - "id": "6a125e67", + "id": "8b72d16f", "metadata": { "editable": true }, @@ -1531,7 +1531,7 @@ }, { "cell_type": "markdown", - "id": "a6470b47", + "id": "b7487564", "metadata": { "editable": true }, @@ -1543,7 +1543,7 @@ }, { "cell_type": "markdown", - "id": "f803f643", + "id": "c867ad41", "metadata": { "editable": true }, @@ -1553,7 +1553,7 @@ }, { "cell_type": "markdown", - "id": "b802e0b8", + "id": "a83dd023", "metadata": { "editable": true }, @@ -1565,7 +1565,7 @@ }, { "cell_type": "markdown", - "id": "5d7b7012", + "id": "2af8f8d8", "metadata": { "editable": true }, @@ -1575,7 +1575,7 @@ }, { "cell_type": "markdown", - "id": "44a385f4", + "id": "ff8fa268", "metadata": { "editable": true }, @@ -1587,7 +1587,7 @@ }, { "cell_type": "markdown", - "id": "089af6de", + "id": "ed677af0", "metadata": { "editable": true }, @@ -1597,7 +1597,7 @@ }, { "cell_type": "markdown", - "id": "ae85cffa", + "id": "ecbdeed0", "metadata": { "editable": true }, @@ -1610,7 +1610,7 @@ }, { "cell_type": "markdown", - "id": "2d993ec0", + "id": "82bf02ae", "metadata": { "editable": true }, @@ -1622,7 +1622,7 @@ }, { "cell_type": "markdown", - "id": "88240ba4", + "id": "14845674", "metadata": { "editable": true }, @@ -1634,7 +1634,7 @@ }, { "cell_type": "markdown", - "id": "a20647ff", + "id": "adba7e10", "metadata": { "editable": true }, @@ -1644,7 +1644,7 @@ }, { "cell_type": "markdown", - "id": "333ec229", + "id": "8a5c542c", "metadata": { "editable": true }, @@ -1656,7 +1656,7 @@ }, { "cell_type": "markdown", - "id": "486bb7b6", + "id": "8cea598a", "metadata": { "editable": true }, @@ -1673,7 +1673,7 @@ }, { "cell_type": "markdown", - "id": "2571d3f6", + "id": "c3e1915d", "metadata": { "editable": true }, @@ -1685,7 +1685,7 @@ }, { "cell_type": "markdown", - "id": "7ea8b8cb", + "id": "1e2b991c", "metadata": { "editable": true }, @@ -1697,7 +1697,7 @@ }, { "cell_type": "markdown", - "id": "2f2e2b35", + "id": "65d7a713", "metadata": { "editable": true }, @@ -1707,7 +1707,7 @@ }, { "cell_type": "markdown", - "id": "f09feb8a", + "id": "ac7774e5", "metadata": { "editable": true }, @@ -1719,7 +1719,7 @@ }, { "cell_type": "markdown", - "id": "2d30caa1", + "id": "700b37b8", "metadata": { "editable": true }, @@ -1729,7 +1729,7 @@ }, { "cell_type": "markdown", - "id": "44d4793e", + "id": "86735982", "metadata": { "editable": true }, @@ -1741,7 +1741,7 @@ }, { "cell_type": "markdown", - "id": "8748a02e", + "id": "d7f6518b", "metadata": { "editable": true }, @@ -1751,7 +1751,7 @@ }, { "cell_type": "markdown", - "id": "6f37fb34", + "id": "76337f54", "metadata": { "editable": true }, @@ -1763,7 +1763,7 @@ }, { "cell_type": "markdown", - "id": "7c75e8f9", + "id": "9da60946", "metadata": { "editable": true }, @@ -1773,7 +1773,7 @@ }, { "cell_type": "markdown", - "id": "b0abbd1b", + "id": "0b5262ae", "metadata": { "editable": true }, @@ -1788,7 +1788,7 @@ { "cell_type": "code", "execution_count": 4, - "id": "cfe7c705", + "id": "440fa47a", "metadata": { "collapsed": false, "editable": true @@ -1850,7 +1850,7 @@ }, { "cell_type": "markdown", - "id": "bff7f074", + "id": "3d4861ef", "metadata": { "editable": true }, @@ -1860,7 +1860,7 @@ }, { "cell_type": "markdown", - "id": "7d60fe8b", + "id": "1c5efc9e", "metadata": { "editable": true }, @@ -1871,7 +1871,7 @@ { "cell_type": "code", "execution_count": 5, - "id": "ff9c08e6", + "id": "ef61db70", "metadata": { "collapsed": false, "editable": true @@ -1938,7 +1938,7 @@ }, { "cell_type": "markdown", - "id": "d7260066", + "id": "f0ab2234", "metadata": { "editable": true }, @@ -1949,7 +1949,7 @@ { "cell_type": "code", "execution_count": 6, - "id": "a0e0cde1", + "id": "55bb9fe6", "metadata": { "collapsed": false, "editable": true @@ -2038,7 +2038,7 @@ }, { "cell_type": "markdown", - "id": "b97408b5", + "id": "badabaff", "metadata": { "editable": true }, @@ -2059,7 +2059,7 @@ { "cell_type": "code", "execution_count": 7, - "id": "2e03f0e4", + "id": "31d44c32", "metadata": { "collapsed": false, "editable": true @@ -2327,7 +2327,7 @@ }, { "cell_type": "markdown", - "id": "31b91b9f", + "id": "fea3be6b", "metadata": { "editable": true }, @@ -2338,7 +2338,7 @@ { "cell_type": "code", "execution_count": 8, - "id": "3888d55e", + "id": "855863d9", "metadata": { "collapsed": false, "editable": true @@ -2354,7 +2354,7 @@ }, { "cell_type": "markdown", - "id": "e77d2cba", + "id": "2dd548db", "metadata": { "editable": true }, @@ -2364,7 +2364,7 @@ }, { "cell_type": "markdown", - "id": "0341e789", + "id": "77929952", "metadata": { "editable": true }, @@ -2393,7 +2393,7 @@ }, { "cell_type": "markdown", - "id": "74fa2058", + "id": "471679ff", "metadata": { "editable": true }, @@ -2409,7 +2409,7 @@ }, { "cell_type": "markdown", - "id": "5b74e845", + "id": "94eff9b9", "metadata": { "editable": true }, @@ -2428,7 +2428,7 @@ }, { "cell_type": "markdown", - "id": "cd1cfee5", + "id": "f671a0ba", "metadata": { "editable": true }, @@ -2442,7 +2442,7 @@ }, { "cell_type": "markdown", - "id": "d60acf54", + "id": "603557ea", "metadata": { "editable": true }, @@ -2454,7 +2454,7 @@ }, { "cell_type": "markdown", - "id": "1b1d63c0", + "id": "9c483c49", "metadata": { "editable": true }, @@ -2465,7 +2465,7 @@ }, { "cell_type": "markdown", - "id": "010bbde3", + "id": "46ca96d7", "metadata": { "editable": true }, @@ -2477,7 +2477,7 @@ }, { "cell_type": "markdown", - "id": "c952d3e5", + "id": "69d1c0cd", "metadata": { "editable": true }, @@ -2489,7 +2489,7 @@ }, { "cell_type": "markdown", - "id": "bbb943ff", + "id": "dab0e187", "metadata": { "editable": true }, @@ -2505,7 +2505,7 @@ }, { "cell_type": "markdown", - "id": "88a148a9", + "id": "47de712e", "metadata": { "editable": true }, @@ -2516,7 +2516,7 @@ }, { "cell_type": "markdown", - "id": "a47bf621", + "id": "262e57ea", "metadata": { "editable": true }, @@ -2539,7 +2539,7 @@ }, { "cell_type": "markdown", - "id": "f7e424df", + "id": "a66affbb", "metadata": { "editable": true }, @@ -2550,7 +2550,7 @@ }, { "cell_type": "markdown", - "id": "9f07cc69", + "id": "780b53a8", "metadata": { "editable": true }, @@ -2562,7 +2562,7 @@ }, { "cell_type": "markdown", - "id": "e0b0c8eb", + "id": "ae92f3db", "metadata": { "editable": true }, @@ -2574,7 +2574,7 @@ }, { "cell_type": "markdown", - "id": "a87eeeac", + "id": "da45c36f", "metadata": { "editable": true }, @@ -2588,7 +2588,7 @@ }, { "cell_type": "markdown", - "id": "1011b007", + "id": "5fbcdddc", "metadata": { "editable": true }, @@ -2619,7 +2619,7 @@ }, { "cell_type": "markdown", - "id": "1b683255", + "id": "6b06d967", "metadata": { "editable": true }, @@ -2641,7 +2641,7 @@ }, { "cell_type": "markdown", - "id": "46c7a0e9", + "id": "ad788e2b", "metadata": { "editable": true }, @@ -2653,7 +2653,7 @@ }, { "cell_type": "markdown", - "id": "08b5124e", + "id": "7cc49398", "metadata": { "editable": true }, @@ -2666,7 +2666,7 @@ }, { "cell_type": "markdown", - "id": "a920de9f", + "id": "5c14a522", "metadata": { "editable": true }, @@ -2678,7 +2678,7 @@ }, { "cell_type": "markdown", - "id": "212e21eb", + "id": "5747630e", "metadata": { "editable": true }, @@ -2690,7 +2690,7 @@ }, { "cell_type": "markdown", - "id": "b9fde177", + "id": "893278ae", "metadata": { "editable": true }, @@ -2702,7 +2702,7 @@ }, { "cell_type": "markdown", - "id": "8a8b8126", + "id": "a2856590", "metadata": { "editable": true }, @@ -2714,7 +2714,7 @@ }, { "cell_type": "markdown", - "id": "fb244ed7", + "id": "351f210e", "metadata": { "editable": true }, @@ -2737,7 +2737,7 @@ }, { "cell_type": "markdown", - "id": "40c84e8c", + "id": "27600f2b", "metadata": { "editable": true }, @@ -2749,7 +2749,7 @@ }, { "cell_type": "markdown", - "id": "f770aaea", + "id": "da82d1bc", "metadata": { "editable": true }, @@ -2762,7 +2762,7 @@ }, { "cell_type": "markdown", - "id": "24caad20", + "id": "f330f183", "metadata": { "editable": true }, @@ -2774,7 +2774,7 @@ }, { "cell_type": "markdown", - "id": "0b13365d", + "id": "8981d076", "metadata": { "editable": true }, @@ -2786,7 +2786,7 @@ }, { "cell_type": "markdown", - "id": "450f4017", + "id": "bf7af5d6", "metadata": { "editable": true }, @@ -2798,7 +2798,7 @@ }, { "cell_type": "markdown", - "id": "0ef7ac60", + "id": "6ca9955e", "metadata": { "editable": true }, @@ -2809,7 +2809,7 @@ }, { "cell_type": "markdown", - "id": "446594b8", + "id": "84170394", "metadata": { "editable": true }, @@ -2821,7 +2821,7 @@ }, { "cell_type": "markdown", - "id": "b4a768ed", + "id": "1230678d", "metadata": { "editable": true }, @@ -2832,7 +2832,7 @@ }, { "cell_type": "markdown", - "id": "f888fd9c", + "id": "135c1db8", "metadata": { "editable": true }, @@ -2844,7 +2844,7 @@ }, { "cell_type": "markdown", - "id": "81e6ce29", + "id": "3fc0c874", "metadata": { "editable": true }, @@ -2854,7 +2854,7 @@ }, { "cell_type": "markdown", - "id": "36d62edd", + "id": "8b67ede6", "metadata": { "editable": true }, @@ -2885,7 +2885,7 @@ }, { "cell_type": "markdown", - "id": "71ca399a", + "id": "2054fe98", "metadata": { "editable": true }, @@ -2897,7 +2897,7 @@ }, { "cell_type": "markdown", - "id": "066b69fa", + "id": "d7c362c8", "metadata": { "editable": true }, @@ -2909,7 +2909,7 @@ }, { "cell_type": "markdown", - "id": "ee8b1c27", + "id": "09571a29", "metadata": { "editable": true }, @@ -2919,7 +2919,7 @@ }, { "cell_type": "markdown", - "id": "6d7f1b33", + "id": "33d54dea", "metadata": { "editable": true }, @@ -2931,7 +2931,7 @@ }, { "cell_type": "markdown", - "id": "1a85eda9", + "id": "353b3814", "metadata": { "editable": true }, @@ -2941,7 +2941,7 @@ }, { "cell_type": "markdown", - "id": "9b37aca3", + "id": "6d7f7564", "metadata": { "editable": true }, @@ -2953,7 +2953,7 @@ }, { "cell_type": "markdown", - "id": "96dcbdba", + "id": "4fca7f5c", "metadata": { "editable": true }, @@ -2963,7 +2963,7 @@ }, { "cell_type": "markdown", - "id": "dc330463", + "id": "85c2be14", "metadata": { "editable": true }, @@ -2975,7 +2975,7 @@ }, { "cell_type": "markdown", - "id": "8e1f892b", + "id": "e68fa3e8", "metadata": { "editable": true }, @@ -2985,7 +2985,7 @@ }, { "cell_type": "markdown", - "id": "8d892179", + "id": "f97d05fd", "metadata": { "editable": true }, @@ -3005,7 +3005,7 @@ }, { "cell_type": "markdown", - "id": "22a0feb9", + "id": "69296683", "metadata": { "editable": true }, @@ -3017,7 +3017,7 @@ }, { "cell_type": "markdown", - "id": "a2d13c7e", + "id": "ba050d2f", "metadata": { "editable": true }, @@ -3027,7 +3027,7 @@ }, { "cell_type": "markdown", - "id": "640c9e4e", + "id": "5bb90d76", "metadata": { "editable": true }, @@ -3039,7 +3039,7 @@ }, { "cell_type": "markdown", - "id": "564dd6e9", + "id": "7ae135dc", "metadata": { "editable": true }, @@ -3051,7 +3051,7 @@ }, { "cell_type": "markdown", - "id": "6072db31", + "id": "bb976dbb", "metadata": { "editable": true }, @@ -3063,7 +3063,7 @@ }, { "cell_type": "markdown", - "id": "458c1f89", + "id": "10c8dad6", "metadata": { "editable": true }, @@ -3075,7 +3075,7 @@ }, { "cell_type": "markdown", - "id": "da359146", + "id": "f17d873b", "metadata": { "editable": true }, @@ -3087,7 +3087,7 @@ }, { "cell_type": "markdown", - "id": "0593e49f", + "id": "74a006a4", "metadata": { "editable": true }, @@ -3099,7 +3099,7 @@ }, { "cell_type": "markdown", - "id": "593db1d5", + "id": "673a95f2", "metadata": { "editable": true }, @@ -3111,7 +3111,7 @@ }, { "cell_type": "markdown", - "id": "31c5ec31", + "id": "ff8d08bb", "metadata": { "editable": true }, @@ -3123,7 +3123,7 @@ }, { "cell_type": "markdown", - "id": "c700feb9", + "id": "01b503fc", "metadata": { "editable": true }, @@ -3133,7 +3133,7 @@ }, { "cell_type": "markdown", - "id": "37f99dcd", + "id": "d178ceac", "metadata": { "editable": true }, @@ -3145,7 +3145,7 @@ }, { "cell_type": "markdown", - "id": "037f602c", + "id": "7717d1bc", "metadata": { "editable": true }, @@ -3155,7 +3155,7 @@ }, { "cell_type": "markdown", - "id": "b935e10d", + "id": "548790d2", "metadata": { "editable": true }, @@ -3174,7 +3174,7 @@ }, { "cell_type": "markdown", - "id": "f05e3a34", + "id": "9995e959", "metadata": { "editable": true }, @@ -3195,7 +3195,7 @@ }, { "cell_type": "markdown", - "id": "f98ebaa9", + "id": "da19a273", "metadata": { "editable": true }, @@ -3207,7 +3207,7 @@ }, { "cell_type": "markdown", - "id": "c8e6edaa", + "id": "f4193063", "metadata": { "editable": true }, @@ -3218,7 +3218,7 @@ }, { "cell_type": "markdown", - "id": "fb8cc3e1", + "id": "8c212858", "metadata": { "editable": true }, @@ -3231,7 +3231,7 @@ }, { "cell_type": "markdown", - "id": "0a0ec0e4", + "id": "58657f5b", "metadata": { "editable": true }, @@ -3243,7 +3243,7 @@ }, { "cell_type": "markdown", - "id": "83ae9d66", + "id": "7b27bbe1", "metadata": { "editable": true }, @@ -3253,7 +3253,7 @@ }, { "cell_type": "markdown", - "id": "cd61a34c", + "id": "806bbd78", "metadata": { "editable": true }, @@ -3265,7 +3265,7 @@ }, { "cell_type": "markdown", - "id": "040b72fc", + "id": "933ec30d", "metadata": { "editable": true }, @@ -3275,7 +3275,7 @@ }, { "cell_type": "markdown", - "id": "02f32f9a", + "id": "df6116cf", "metadata": { "editable": true }, @@ -3287,7 +3287,7 @@ }, { "cell_type": "markdown", - "id": "bfa2302a", + "id": "2d80ac11", "metadata": { "editable": true }, @@ -3297,7 +3297,7 @@ }, { "cell_type": "markdown", - "id": "1595e1a8", + "id": "dfbe1bc3", "metadata": { "editable": true }, @@ -3314,7 +3314,7 @@ }, { "cell_type": "markdown", - "id": "c5d4fb9f", + "id": "0605d5c1", "metadata": { "editable": true }, @@ -3333,7 +3333,7 @@ { "cell_type": "code", "execution_count": 9, - "id": "f8b0c281", + "id": "9d9e20cc", "metadata": { "collapsed": false, "editable": true @@ -3407,7 +3407,7 @@ }, { "cell_type": "markdown", - "id": "8c5a39a5", + "id": "e7f8e723", "metadata": { "editable": true }, @@ -3417,7 +3417,7 @@ }, { "cell_type": "markdown", - "id": "68cd06aa", + "id": "b82785b8", "metadata": { "editable": true }, @@ -3431,7 +3431,7 @@ }, { "cell_type": "markdown", - "id": "ea64fa29", + "id": "8b3aa567", "metadata": { "editable": true }, @@ -3443,7 +3443,7 @@ }, { "cell_type": "markdown", - "id": "a05dec5c", + "id": "ffa09655", "metadata": { "editable": true }, @@ -3453,7 +3453,7 @@ }, { "cell_type": "markdown", - "id": "ede1fa08", + "id": "87cd926b", "metadata": { "editable": true }, @@ -3465,7 +3465,7 @@ }, { "cell_type": "markdown", - "id": "35d0a001", + "id": "d2a36109", "metadata": { "editable": true }, @@ -3475,7 +3475,7 @@ }, { "cell_type": "markdown", - "id": "757901ff", + "id": "267b2b19", "metadata": { "editable": true }, @@ -3487,7 +3487,7 @@ }, { "cell_type": "markdown", - "id": "2a48a238", + "id": "4dbe0526", "metadata": { "editable": true }, @@ -3497,7 +3497,7 @@ }, { "cell_type": "markdown", - "id": "bf4bea15", + "id": "bc565134", "metadata": { "editable": true }, @@ -3509,7 +3509,7 @@ }, { "cell_type": "markdown", - "id": "f2beb56a", + "id": "55889a44", "metadata": { "editable": true }, @@ -3519,7 +3519,7 @@ }, { "cell_type": "markdown", - "id": "6c11235d", + "id": "bbc1ca5a", "metadata": { "editable": true }, @@ -3535,7 +3535,7 @@ }, { "cell_type": "markdown", - "id": "bff29d33", + "id": "a9aad880", "metadata": { "editable": true }, @@ -3547,7 +3547,7 @@ }, { "cell_type": "markdown", - "id": "f8c3eedc", + "id": "6d07a965", "metadata": { "editable": true }, @@ -3557,7 +3557,7 @@ }, { "cell_type": "markdown", - "id": "01541a6d", + "id": "653cb565", "metadata": { "editable": true }, @@ -3569,7 +3569,7 @@ }, { "cell_type": "markdown", - "id": "db85ab12", + "id": "467af475", "metadata": { "editable": true }, @@ -3582,7 +3582,7 @@ }, { "cell_type": "markdown", - "id": "60ac0d91", + "id": "a3aac577", "metadata": { "editable": true }, @@ -3594,7 +3594,7 @@ }, { "cell_type": "markdown", - "id": "09bb6f08", + "id": "5518d7d1", "metadata": { "editable": true }, @@ -3604,7 +3604,7 @@ }, { "cell_type": "markdown", - "id": "66a83fa2", + "id": "9eb57af9", "metadata": { "editable": true }, @@ -3616,7 +3616,7 @@ }, { "cell_type": "markdown", - "id": "7f2dbf65", + "id": "91c6dc64", "metadata": { "editable": true }, @@ -3626,7 +3626,7 @@ }, { "cell_type": "markdown", - "id": "3f051acd", + "id": "6eff97c7", "metadata": { "editable": true }, @@ -3638,7 +3638,7 @@ }, { "cell_type": "markdown", - "id": "21432c37", + "id": "d6091db7", "metadata": { "editable": true }, @@ -3650,7 +3650,7 @@ }, { "cell_type": "markdown", - "id": "a2bdf2b5", + "id": "be2aa7f9", "metadata": { "editable": true }, @@ -3660,7 +3660,7 @@ }, { "cell_type": "markdown", - "id": "6023a586", + "id": "dd132df6", "metadata": { "editable": true }, @@ -3672,7 +3672,7 @@ }, { "cell_type": "markdown", - "id": "99d4bb0d", + "id": "5f171134", "metadata": { "editable": true }, @@ -3684,7 +3684,7 @@ }, { "cell_type": "markdown", - "id": "646d00b5", + "id": "5025459a", "metadata": { "editable": true }, @@ -3696,7 +3696,7 @@ }, { "cell_type": "markdown", - "id": "113e7f7d", + "id": "7e2b32df", "metadata": { "editable": true }, @@ -3706,7 +3706,7 @@ }, { "cell_type": "markdown", - "id": "652bd515", + "id": "a1a6d1f9", "metadata": { "editable": true }, @@ -3718,13 +3718,243 @@ }, { "cell_type": "markdown", - "id": "5ca17fa2", + "id": "2bb05fcf", "metadata": { "editable": true }, "source": [ "which is our Lasso cost function!" ] + }, + { + "cell_type": "markdown", + "id": "bd3f9953", + "metadata": { + "editable": true + }, + "source": [ + "## Exercise 1: mean values and variances in linear regression\n", + "\n", + "This exercise deals with various mean values ad variances in linear regression method (here it may be useful to look up chapter 3, equation (3.8) of [Trevor Hastie, Robert Tibshirani, Jerome H. Friedman, The Elements of Statistical Learning, Springer](https://www.springer.com/gp/book/9780387848570)).\n", + "\n", + "The assumption we have made is \n", + "that there exists a function $f(\\boldsymbol{x})$ and a normal distributed error $\\boldsymbol{\\varepsilon}\\sim \\mathcal{N}(0, \\sigma^2)$\n", + "which describes our data" + ] + }, + { + "cell_type": "markdown", + "id": "bbd582a5", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{y} = f(\\boldsymbol{x})+\\boldsymbol{\\varepsilon}\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "31517ebf", + "metadata": { + "editable": true + }, + "source": [ + "We then approximate this function with our model from the solution of the linear regression equations (ordinary least squares OLS), that is our\n", + "function $f$ is approximated by $\\boldsymbol{\\tilde{y}}$ where we minimized $(\\boldsymbol{y}-\\boldsymbol{\\tilde{y}})^2$, with" + ] + }, + { + "cell_type": "markdown", + "id": "c6d24de1", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\boldsymbol{\\tilde{y}} = \\boldsymbol{X}\\boldsymbol{\\beta}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "f4c1cc36", + "metadata": { + "editable": true + }, + "source": [ + "The matrix $\\boldsymbol{X}$ is the so-called design matrix." + ] + }, + { + "cell_type": "markdown", + "id": "36d355b2", + "metadata": { + "editable": true + }, + "source": [ + "**a)**\n", + "Show that the expectation value of $\\boldsymbol{y}$ for a given element $i$" + ] + }, + { + "cell_type": "markdown", + "id": "289ce268", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\begin{align*} \n", + "\\mathbb{E}(y_i) & =\\mathbf{X}_{i, \\ast} \\, \\beta, \n", + "\\end{align*}\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "50dae1b6", + "metadata": { + "editable": true + }, + "source": [ + "and that\n", + "its variance is" + ] + }, + { + "cell_type": "markdown", + "id": "5154d5d4", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\begin{align*} \\mbox{Var}(y_i) & = \\sigma^2. \n", + "\\end{align*}\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "fc904e3d", + "metadata": { + "editable": true + }, + "source": [ + "Hence, $y_i \\sim \\mathcal{N}( \\mathbf{X}_{i, \\ast} \\, \\boldsymbol{\\beta}, \\sigma^2)$, that is $\\boldsymbol{y}$ follows a normal distribution with \n", + "mean value $\\boldsymbol{X}\\boldsymbol{\\beta}$ and variance $\\sigma^2$." + ] + }, + { + "cell_type": "markdown", + "id": "db73e6e4", + "metadata": { + "editable": true + }, + "source": [ + "**b)**\n", + "With the OLS expressions for the parameters $\\boldsymbol{\\beta}$ show that" + ] + }, + { + "cell_type": "markdown", + "id": "c6625835", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\mathbb{E}(\\boldsymbol{\\beta}) = \\boldsymbol{\\beta}.\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "9b7b07df", + "metadata": { + "editable": true + }, + "source": [ + "**c)**\n", + "Show finally that the variance of $\\boldsymbol{\\beta}$ is" + ] + }, + { + "cell_type": "markdown", + "id": "14ad8a3c", + "metadata": { + "editable": true + }, + "source": [ + "$$\n", + "\\begin{eqnarray*}\n", + "\\mbox{Var}(\\boldsymbol{\\beta}) & = & \\sigma^2 \\, (\\mathbf{X}^{T} \\mathbf{X})^{-1}.\n", + "\\end{eqnarray*}\n", + "$$" + ] + }, + { + "cell_type": "markdown", + "id": "fa122455", + "metadata": { + "editable": true + }, + "source": [ + "## Exercise 2: Adding Ridge and Lasso Regression\n", + "\n", + "This exercise is a continuation of the exercises from week 35.\n", + "\n", + "We will\n", + "use the same function to generate our data set, still staying with a\n", + "simple function $y(x)$ which we want to fit using linear regression,\n", + "but now extending the analysis to include the Ridge and the Lasso\n", + "regression methods. \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", + "distribution. The function $y$ is a quadratic polynomial in $x$ with\n", + "added stochastic noise according to the normal distribution $\\cal{N}(0,1)$.\n", + "\n", + "The following simple Python instructions define our $x$ and $y$ values (with 100 data points)." + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "e34d7dbd", + "metadata": { + "collapsed": false, + "editable": true + }, + "outputs": [], + "source": [ + "x = np.random.rand(100)\n", + "y = 2.0+5*x*x+0.1*np.random.randn(100)" + ] + }, + { + "cell_type": "markdown", + "id": "92383e80", + "metadata": { + "editable": true + }, + "source": [ + "**a)**\n", + "Write your own code for the Ridge method (see chapter 3.4 of Hastie *et al.*, equations (3.43) and (3.44)) and compute the parametrization for different values of $\\lambda$. Study the dependence on $\\lambda$ while also varying the strength of the noise in your expression for $y(x)$." + ] + }, + { + "cell_type": "markdown", + "id": "77ea1a21", + "metadata": { + "editable": true + }, + "source": [ + "**b)**\n", + "Our next step is to study the variance of the parameters $\\beta_1$ and $\\beta_2$ (assuming that we are parameterizing our function with a second-order polynomial). We will use standard linear regression and the Ridge regression. You can now opt for either writing your own function or using **Scikit-Learn** to find the parameters $\\beta$. From your results calculate the variance of these parameters (recall that this is equal to the diagonal elements of the matrix $(\\hat{X}^T\\hat{X})+\\lambda\\hat{I})^{-1}$). Discuss the results of these variances as functions of $\\lambda$. In particular, try to link your discussion with the discussion in Hastie *et al.* and their figures 3.10 and 3.11. **Scikit-Learn** may not provide the variance of the parameters $\\beta$. This needs to be checked. With your own code you can however do so." + ] } ], "metadata": {}, diff --git a/doc/src/week36/week36.do.txt b/doc/src/week36/week36.do.txt index 6b564ff86..b5d99563a 100644 --- a/doc/src/week36/week36.do.txt +++ b/doc/src/week36/week36.do.txt @@ -1853,3 +1853,100 @@ C(\bm{\beta}=\frac{\vert\vert (\bm{y}-\bm{X}\bm{\beta})\vert\vert_2^2}{2\sigma^2 !et which is our Lasso cost function! + + +===== Exercise: mean values and variances in linear regression ===== + + + +This exercise deals with various mean values ad variances in linear regression method (here it may be useful to look up chapter 3, equation (3.8) of "Trevor Hastie, Robert Tibshirani, Jerome H. Friedman, The Elements of Statistical Learning, Springer":"https://www.springer.com/gp/book/9780387848570"). + +The assumption we have made is +that there exists a function $f(\bm{x})$ and a normal distributed error $\bm{\varepsilon}\sim \mathcal{N}(0, \sigma^2)$ +which describes our data +!bt +\[ +\bm{y} = f(\bm{x})+\bm{\varepsilon} +\] +!et + +We then approximate this function with our model from the solution of the linear regression equations (ordinary least squares OLS), that is our +function $f$ is approximated by $\bm{\tilde{y}}$ where we minimized $(\bm{y}-\bm{\tilde{y}})^2$, with +!bt +\[ +\bm{\tilde{y}} = \bm{X}\bm{\beta}. +\] +!et +The matrix $\bm{X}$ is the so-called design matrix. + +!bsubex +Show that the expectation value of $\bm{y}$ for a given element $i$ +!bt +\begin{align*} +\mathbb{E}(y_i) & =\mathbf{X}_{i, \ast} \, \beta, +\end{align*} +!et +and that +its variance is +!bt +\begin{align*} \mbox{Var}(y_i) & = \sigma^2. +\end{align*} +!et +Hence, $y_i \sim \mathcal{N}( \mathbf{X}_{i, \ast} \, \bm{\beta}, \sigma^2)$, that is $\bm{y}$ follows a normal distribution with +mean value $\bm{X}\bm{\beta}$ and variance $\sigma^2$. + +!esubex + +!bsubex +With the OLS expressions for the parameters $\bm{\beta}$ show that +!bt +\[ +\mathbb{E}(\bm{\beta}) = \bm{\beta}. +\] +!et +!esubex + +!bsubex +Show finally that the variance of $\bm{\beta}$ is +!bt +\begin{eqnarray*} +\mbox{Var}(\bm{\beta}) & = & \sigma^2 \, (\mathbf{X}^{T} \mathbf{X})^{-1}. +\end{eqnarray*} +!et + +!esubex + + +===== Exercise: Adding Ridge and Lasso Regression ===== + + +This exercise is a continuation of the exercises from week 35. + +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. + +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 +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) +y = 2.0+5*x*x+0.1*np.random.randn(100) +!ec + +!bsubex +Write your own code for the Ridge method (see chapter 3.4 of Hastie *et al.*, equations (3.43) and (3.44)) and compute the parametrization for different values of $\lambda$. Study the dependence on $\lambda$ while also varying the strength of the noise in your expression for $y(x)$. + +!esubex + +!bsubex +Our next step is to study the variance of the parameters $\beta_1$ and $\beta_2$ (assuming that we are parameterizing our function with a second-order polynomial). We will use standard linear regression and the Ridge regression. You can now opt for either writing your own function or using _Scikit-Learn_ to find the parameters $\beta$. From your results calculate the variance of these parameters (recall that this is equal to the diagonal elements of the matrix $(\hat{X}^T\hat{X})+\lambda\hat{I})^{-1}$). Discuss the results of these variances as functions of $\lambda$. In particular, try to link your discussion with the discussion in Hastie *et al.* and their figures 3.10 and 3.11. _Scikit-Learn_ may not provide the variance of the parameters $\beta$. This needs to be checked. With your own code you can however do so. +!esubex + + +