From 511ea174bfe6d79f9ba11e7e0b33e7301dc186d6 Mon Sep 17 00:00:00 2001 From: Morten Hjorth-Jensen Date: Fri, 23 Sep 2022 08:12:59 +0200 Subject: [PATCH] redundant code lines --- doc/pub/week38/html/._week38-bs000.html | 81 +- doc/pub/week38/html/._week38-bs001.html | 81 +- doc/pub/week38/html/._week38-bs002.html | 81 +- doc/pub/week38/html/._week38-bs003.html | 81 +- doc/pub/week38/html/._week38-bs004.html | 81 +- doc/pub/week38/html/._week38-bs005.html | 81 +- doc/pub/week38/html/._week38-bs006.html | 81 +- doc/pub/week38/html/._week38-bs007.html | 81 +- doc/pub/week38/html/._week38-bs008.html | 81 +- doc/pub/week38/html/._week38-bs009.html | 81 +- doc/pub/week38/html/._week38-bs010.html | 81 +- doc/pub/week38/html/._week38-bs011.html | 81 +- doc/pub/week38/html/._week38-bs012.html | 81 +- doc/pub/week38/html/._week38-bs013.html | 81 +- doc/pub/week38/html/._week38-bs014.html | 81 +- doc/pub/week38/html/._week38-bs015.html | 81 +- doc/pub/week38/html/._week38-bs016.html | 81 +- doc/pub/week38/html/._week38-bs017.html | 81 +- doc/pub/week38/html/._week38-bs018.html | 81 +- doc/pub/week38/html/._week38-bs019.html | 81 +- doc/pub/week38/html/._week38-bs020.html | 81 +- doc/pub/week38/html/._week38-bs021.html | 81 +- doc/pub/week38/html/._week38-bs022.html | 81 +- doc/pub/week38/html/._week38-bs023.html | 81 +- doc/pub/week38/html/._week38-bs024.html | 81 +- doc/pub/week38/html/._week38-bs025.html | 81 +- doc/pub/week38/html/._week38-bs026.html | 81 +- doc/pub/week38/html/._week38-bs027.html | 81 +- doc/pub/week38/html/._week38-bs028.html | 81 +- doc/pub/week38/html/._week38-bs029.html | 81 +- doc/pub/week38/html/._week38-bs030.html | 81 +- doc/pub/week38/html/._week38-bs031.html | 81 +- doc/pub/week38/html/._week38-bs032.html | 84 +- doc/pub/week38/html/._week38-bs033.html | 81 +- doc/pub/week38/html/._week38-bs034.html | 81 +- doc/pub/week38/html/._week38-bs035.html | 81 +- doc/pub/week38/html/._week38-bs036.html | 81 +- doc/pub/week38/html/._week38-bs037.html | 81 +- doc/pub/week38/html/._week38-bs038.html | 81 +- doc/pub/week38/html/._week38-bs039.html | 81 +- doc/pub/week38/html/._week38-bs040.html | 81 +- doc/pub/week38/html/._week38-bs041.html | 81 +- doc/pub/week38/html/._week38-bs042.html | 81 +- doc/pub/week38/html/week38-bs.html | 81 +- doc/pub/week38/html/week38-reveal.html | 590 -------- doc/pub/week38/html/week38-solarized.html | 567 -------- doc/pub/week38/html/week38.html | 567 -------- doc/pub/week38/ipynb/ipynb-week38-src.tar.gz | Bin 193 -> 192 bytes doc/pub/week38/ipynb/week38.ipynb | 1366 +++--------------- doc/src/week38/week38.do.txt | 371 ----- 50 files changed, 776 insertions(+), 6252 deletions(-) diff --git a/doc/pub/week38/html/._week38-bs000.html b/doc/pub/week38/html/._week38-bs000.html index 1d4fa6b1e..3a1f601f0 100644 --- a/doc/pub/week38/html/._week38-bs000.html +++ b/doc/pub/week38/html/._week38-bs000.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -412,7 +357,7 @@ MathJax.Hub.Config({
  • 9
  • 10
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs001.html b/doc/pub/week38/html/._week38-bs001.html index 166b51c71..c752b96ca 100644 --- a/doc/pub/week38/html/._week38-bs001.html +++ b/doc/pub/week38/html/._week38-bs001.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -399,7 +344,7 @@ MathJax.Hub.Config({
  • 10
  • 11
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs002.html b/doc/pub/week38/html/._week38-bs002.html index 476b92bfb..222d67df7 100644 --- a/doc/pub/week38/html/._week38-bs002.html +++ b/doc/pub/week38/html/._week38-bs002.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -440,7 +385,7 @@ $$
  • 11
  • 12
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs003.html b/doc/pub/week38/html/._week38-bs003.html index 07ab8f606..2ae2373c9 100644 --- a/doc/pub/week38/html/._week38-bs003.html +++ b/doc/pub/week38/html/._week38-bs003.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -405,7 +350,7 @@ cross-validation (LOOCV).
  • 12
  • 13
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs004.html b/doc/pub/week38/html/._week38-bs004.html index c5c4705e2..35b903f02 100644 --- a/doc/pub/week38/html/._week38-bs004.html +++ b/doc/pub/week38/html/._week38-bs004.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -409,7 +354,7 @@ $$
  • 13
  • 14
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs005.html b/doc/pub/week38/html/._week38-bs005.html index 89c512833..c7cd1ee82 100644 --- a/doc/pub/week38/html/._week38-bs005.html +++ b/doc/pub/week38/html/._week38-bs005.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -405,7 +350,7 @@ MathJax.Hub.Config({
  • 14
  • 15
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs006.html b/doc/pub/week38/html/._week38-bs006.html index db3ce49d8..be7f193d0 100644 --- a/doc/pub/week38/html/._week38-bs006.html +++ b/doc/pub/week38/html/._week38-bs006.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -505,7 +450,7 @@ plt.show()
  • 15
  • 16
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs007.html b/doc/pub/week38/html/._week38-bs007.html index 76328b8cd..3fc85160d 100644 --- a/doc/pub/week38/html/._week38-bs007.html +++ b/doc/pub/week38/html/._week38-bs007.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -406,7 +351,7 @@ simple recipe for fitting our data.
  • 16
  • 17
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs008.html b/doc/pub/week38/html/._week38-bs008.html index a23831eab..43c1537d0 100644 --- a/doc/pub/week38/html/._week38-bs008.html +++ b/doc/pub/week38/html/._week38-bs008.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -412,7 +357,7 @@ failure etc.
  • 17
  • 18
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs009.html b/doc/pub/week38/html/._week38-bs009.html index 281c6c417..26f661cef 100644 --- a/doc/pub/week38/html/._week38-bs009.html +++ b/doc/pub/week38/html/._week38-bs009.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -411,7 +356,7 @@ models, as we will see later.
  • 18
  • 19
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs010.html b/doc/pub/week38/html/._week38-bs010.html index d4e00a28d..112d9414b 100644 --- a/doc/pub/week38/html/._week38-bs010.html +++ b/doc/pub/week38/html/._week38-bs010.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -419,7 +364,7 @@ $$
  • 19
  • 20
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs011.html b/doc/pub/week38/html/._week38-bs011.html index 317f3e55c..e93c80746 100644 --- a/doc/pub/week38/html/._week38-bs011.html +++ b/doc/pub/week38/html/._week38-bs011.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -416,7 +361,7 @@ $$
  • 20
  • 21
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs012.html b/doc/pub/week38/html/._week38-bs012.html index 12e0c03a5..1607d34e6 100644 --- a/doc/pub/week38/html/._week38-bs012.html +++ b/doc/pub/week38/html/._week38-bs012.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -416,7 +361,7 @@ the probability of a given category. This leads us to the logistic function.
  • 21
  • 22
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs013.html b/doc/pub/week38/html/._week38-bs013.html index 85d62d456..12a6afb32 100644 --- a/doc/pub/week38/html/._week38-bs013.html +++ b/doc/pub/week38/html/._week38-bs013.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -475,7 +420,7 @@ plt.show()
  • 22
  • 23
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs014.html b/doc/pub/week38/html/._week38-bs014.html index 33fd90952..f36b6f942 100644 --- a/doc/pub/week38/html/._week38-bs014.html +++ b/doc/pub/week38/html/._week38-bs014.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -447,7 +392,7 @@ representing the probability for finding a value of \( y_i \) with a given
  • 23
  • 24
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs015.html b/doc/pub/week38/html/._week38-bs015.html index 5b97db474..bc79a2a42 100644 --- a/doc/pub/week38/html/._week38-bs015.html +++ b/doc/pub/week38/html/._week38-bs015.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -414,7 +359,7 @@ $$
  • 24
  • 25
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs016.html b/doc/pub/week38/html/._week38-bs016.html index 36526f461..b733f3882 100644 --- a/doc/pub/week38/html/._week38-bs016.html +++ b/doc/pub/week38/html/._week38-bs016.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -475,7 +420,7 @@ plt.show()
  • 25
  • 26
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs017.html b/doc/pub/week38/html/._week38-bs017.html index 3b7e69ee0..a786ddfc0 100644 --- a/doc/pub/week38/html/._week38-bs017.html +++ b/doc/pub/week38/html/._week38-bs017.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -412,7 +357,7 @@ $$
  • 26
  • 27
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs018.html b/doc/pub/week38/html/._week38-bs018.html index eb2fcc1c8..9a27093b8 100644 --- a/doc/pub/week38/html/._week38-bs018.html +++ b/doc/pub/week38/html/._week38-bs018.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -415,7 +360,7 @@ $$
  • 27
  • 28
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs019.html b/doc/pub/week38/html/._week38-bs019.html index af0e240bc..310d43e95 100644 --- a/doc/pub/week38/html/._week38-bs019.html +++ b/doc/pub/week38/html/._week38-bs019.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -412,7 +357,7 @@ in practice we often supplement the cross-entropy with additional regularization
  • 28
  • 29
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs020.html b/doc/pub/week38/html/._week38-bs020.html index 3e59ac418..a3ec44392 100644 --- a/doc/pub/week38/html/._week38-bs020.html +++ b/doc/pub/week38/html/._week38-bs020.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -414,7 +359,7 @@ $$
  • 29
  • 30
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs021.html b/doc/pub/week38/html/._week38-bs021.html index a0e33c5b1..75e02044f 100644 --- a/doc/pub/week38/html/._week38-bs021.html +++ b/doc/pub/week38/html/._week38-bs021.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -415,7 +360,7 @@ $$
  • 30
  • 31
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs022.html b/doc/pub/week38/html/._week38-bs022.html index ab16bf58a..84d2b73f6 100644 --- a/doc/pub/week38/html/._week38-bs022.html +++ b/doc/pub/week38/html/._week38-bs022.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -407,7 +352,7 @@ $$
  • 31
  • 32
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs023.html b/doc/pub/week38/html/._week38-bs023.html index 0b2ecc020..8b67ebf64 100644 --- a/doc/pub/week38/html/._week38-bs023.html +++ b/doc/pub/week38/html/._week38-bs023.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -419,7 +364,7 @@ $$
  • 32
  • 33
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs024.html b/doc/pub/week38/html/._week38-bs024.html index 2041362ff..3fe880b04 100644 --- a/doc/pub/week38/html/._week38-bs024.html +++ b/doc/pub/week38/html/._week38-bs024.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -431,7 +376,7 @@ methods.
  • 33
  • 34
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs025.html b/doc/pub/week38/html/._week38-bs025.html index da2831244..37b85a5b3 100644 --- a/doc/pub/week38/html/._week38-bs025.html +++ b/doc/pub/week38/html/._week38-bs025.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -396,7 +341,7 @@ MathJax.Hub.Config({
  • 34
  • 35
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs026.html b/doc/pub/week38/html/._week38-bs026.html index eaa46c944..a87732988 100644 --- a/doc/pub/week38/html/._week38-bs026.html +++ b/doc/pub/week38/html/._week38-bs026.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -475,7 +420,7 @@ This becomes however less functional in the long run.
  • 35
  • 36
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs027.html b/doc/pub/week38/html/._week38-bs027.html index 877e64c68..826eab957 100644 --- a/doc/pub/week38/html/._week38-bs027.html +++ b/doc/pub/week38/html/._week38-bs027.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -473,7 +418,7 @@ contains more information on how to set the different parameters.
  • 36
  • 37
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs028.html b/doc/pub/week38/html/._week38-bs028.html index 33cd7da8d..d2c5c40af 100644 --- a/doc/pub/week38/html/._week38-bs028.html +++ b/doc/pub/week38/html/._week38-bs028.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -472,7 +417,7 @@ ypredictRidge = gridsearch37
  • 38
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs029.html b/doc/pub/week38/html/._week38-bs029.html index 4c6444577..3c6cae289 100644 --- a/doc/pub/week38/html/._week38-bs029.html +++ b/doc/pub/week38/html/._week38-bs029.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -440,7 +385,7 @@ logreg.fit(X_train, y_train)
  • 38
  • 39
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs030.html b/doc/pub/week38/html/._week38-bs030.html index ae88f38af..c2e7f19e9 100644 --- a/doc/pub/week38/html/._week38-bs030.html +++ b/doc/pub/week38/html/._week38-bs030.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -456,7 +401,7 @@ plt.show()
  • 39
  • 40
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs031.html b/doc/pub/week38/html/._week38-bs031.html index 930b97ef0..6556ed7e0 100644 --- a/doc/pub/week38/html/._week38-bs031.html +++ b/doc/pub/week38/html/._week38-bs031.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -464,7 +409,7 @@ applications. This will be discussed later this semester (40
  • 41
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs032.html b/doc/pub/week38/html/._week38-bs032.html index ac5785479..83e2c6f76 100644 --- a/doc/pub/week38/html/._week38-bs032.html +++ b/doc/pub/week38/html/._week38-bs032.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -392,8 +337,6 @@ X_train, X_test, y_train, y_test = train_tes # Logistic Regression logreg = LogisticRegression(solver='lbfgs') logreg.fit(X_train, y_train) -print("Test set accuracy with Logistic Regression: {:.2f}".format(logreg.score(X_test,y_test))) - from sklearn.preprocessing import LabelEncoder from sklearn.model_selection import cross_validate @@ -402,7 +345,6 @@ accuracy = cross_validate(logreg,X_test,y_te print(accuracy) print("Test set accuracy with Logistic Regression: {:.2f}".format(logreg.score(X_test,y_test))) - import scikitplot as skplt y_pred = logreg.predict(X_test) skplt.metrics.plot_confusion_matrix(y_test, y_pred, normalize=True) @@ -453,7 +395,7 @@ plt.show()
  • 41
  • 42
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs033.html b/doc/pub/week38/html/._week38-bs033.html index d9670a65e..6ad4a3d2c 100644 --- a/doc/pub/week38/html/._week38-bs033.html +++ b/doc/pub/week38/html/._week38-bs033.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -408,7 +353,7 @@ some approximative/numerical method to compute the minimum.
  • 42
  • 43
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs034.html b/doc/pub/week38/html/._week38-bs034.html index bbd9bbf63..6219c84ba 100644 --- a/doc/pub/week38/html/._week38-bs034.html +++ b/doc/pub/week38/html/._week38-bs034.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -413,7 +358,7 @@ $$
  • 43
  • 44
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs035.html b/doc/pub/week38/html/._week38-bs035.html index e2e480e56..66e07e0a1 100644 --- a/doc/pub/week38/html/._week38-bs035.html +++ b/doc/pub/week38/html/._week38-bs035.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -417,7 +362,7 @@ $$
  • 44
  • 45
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs036.html b/doc/pub/week38/html/._week38-bs036.html index 0e1963998..a5cf8c65e 100644 --- a/doc/pub/week38/html/._week38-bs036.html +++ b/doc/pub/week38/html/._week38-bs036.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -414,7 +359,7 @@ $$
  • 45
  • 46
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs037.html b/doc/pub/week38/html/._week38-bs037.html index c8ceb83ec..4ec436d64 100644 --- a/doc/pub/week38/html/._week38-bs037.html +++ b/doc/pub/week38/html/._week38-bs037.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -407,7 +352,7 @@ normally discourage the use of this method.
  • 46
  • 47
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs038.html b/doc/pub/week38/html/._week38-bs038.html index ab3d827b2..58c3a2439 100644 --- a/doc/pub/week38/html/._week38-bs038.html +++ b/doc/pub/week38/html/._week38-bs038.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -427,7 +372,7 @@ $$
  • 47
  • 48
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs039.html b/doc/pub/week38/html/._week38-bs039.html index 6c76038c7..1aa1e7554 100644 --- a/doc/pub/week38/html/._week38-bs039.html +++ b/doc/pub/week38/html/._week38-bs039.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -409,7 +354,7 @@ vanishes, then Newton-Raphson may fail totally
  • 48
  • 49
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs040.html b/doc/pub/week38/html/._week38-bs040.html index 07a636bb9..cc8c6b088 100644 --- a/doc/pub/week38/html/._week38-bs040.html +++ b/doc/pub/week38/html/._week38-bs040.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -447,7 +392,7 @@ more than two non-linear equations. In our case, the Jacobian matrix is given by
  • 49
  • 50
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs041.html b/doc/pub/week38/html/._week38-bs041.html index c83916e06..518169b08 100644 --- a/doc/pub/week38/html/._week38-bs041.html +++ b/doc/pub/week38/html/._week38-bs041.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -414,7 +359,7 @@ we are always moving towards smaller function values, i.e a minimum.
  • 50
  • 51
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs042.html b/doc/pub/week38/html/._week38-bs042.html index f67b4f5e6..8208265d6 100644 --- a/doc/pub/week38/html/._week38-bs042.html +++ b/doc/pub/week38/html/._week38-bs042.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -410,7 +355,7 @@ the learning rate within the context of Machine Learning.
  • 51
  • 52
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/week38-bs.html b/doc/pub/week38/html/week38-bs.html index 1d4fa6b1e..3a1f601f0 100644 --- a/doc/pub/week38/html/week38-bs.html +++ b/doc/pub/week38/html/week38-bs.html @@ -169,47 +169,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -332,32 +291,18 @@ MathJax.Hub.Config({
  • Conditions on convex functions
  • More on convex functions
  • Some simple problems
  • -
  • Standard steepest descent
  • -
  • Gradient method
  • -
  • Steepest descent method
  • -
  • Steepest descent method
  • -
  • Final expressions
  • -
  • Steepest descent example
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method and iterations
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Conjugate gradient method
  • -
  • Revisiting our first homework
  • -
  • Gradient descent example
  • -
  • The derivative of the cost/loss function
  • -
  • The Hessian matrix
  • -
  • Simple program
  • -
  • Gradient Descent Example
  • -
  • And a corresponding example using scikit-learn
  • -
  • Gradient descent and Ridge
  • -
  • The Hessian matrix for Ridge Regression
  • -
  • Program example for gradient descent with Ridge Regression
  • -
  • Using gradient descent methods, limitations
  • -
  • Challenge yourself this weekend
  • +
  • Revisiting our first homework
  • +
  • Gradient descent example
  • +
  • The derivative of the cost/loss function
  • +
  • The Hessian matrix
  • +
  • Simple program
  • +
  • Gradient Descent Example
  • +
  • And a corresponding example using scikit-learn
  • +
  • Gradient descent and Ridge
  • +
  • The Hessian matrix for Ridge Regression
  • +
  • Program example for gradient descent with Ridge Regression
  • +
  • Using gradient descent methods, limitations
  • +
  • Challenge yourself this weekend
  • @@ -412,7 +357,7 @@ MathJax.Hub.Config({
  • 9
  • 10
  • ...
  • -
  • 79
  • +
  • 65
  • »
  • diff --git a/doc/pub/week38/html/week38-reveal.html b/doc/pub/week38/html/week38-reveal.html index aa056a55f..a1bd6af32 100644 --- a/doc/pub/week38/html/week38-reveal.html +++ b/doc/pub/week38/html/week38-reveal.html @@ -1517,8 +1517,6 @@ X_train, X_test, y_train, y_test = train_test_split(cancer.data,cancer.target,ra # Logistic Regression logreg = LogisticRegression(solver='lbfgs') logreg.fit(X_train, y_train) -print("Test set accuracy with Logistic Regression: {:.2f}".format(logreg.score(X_test,y_test))) - from sklearn.preprocessing import LabelEncoder from sklearn.model_selection import cross_validate @@ -1527,7 +1525,6 @@ accuracy = cross_validate(logreg,X_test,y_test,cv=1 print(accuracy) print("Test set accuracy with Logistic Regression: {:.2f}".format(logreg.score(X_test,y_test))) - import scikitplot as skplt y_pred = logreg.predict(X_test) skplt.metrics.plot_confusion_matrix(y_test, y_pred, normalize=True) @@ -2069,593 +2066,6 @@ is minimal, where \( f \) is convex and differentiable. Then, any point

    Using the definition of convexity, try to show that a function satisfying the properties above is convex (the third condition is not needed to show this).

    -
    -

    Standard steepest descent

    - -

    Before we proceed, we would like to discuss the approach called the -standard Steepest descent (different from the above steepest descent discussion), which again leads to us having to be able -to compute a matrix. It belongs to the class of Conjugate Gradient methods (CG). -

    - -The success of the CG method -

    for finding solutions of non-linear problems is based on the theory -of conjugate gradients for linear systems of equations. It belongs to -the class of iterative methods for solving problems from linear -algebra of the type -

    -

     
    -$$ -\begin{equation*} -\boldsymbol{A}\boldsymbol{x} = \boldsymbol{b}. -\end{equation*} -$$ -

     
    - -

    In the iterative process we end up with a problem like

    - -

     
    -$$ -\begin{equation*} - \boldsymbol{r}= \boldsymbol{b}-\boldsymbol{A}\boldsymbol{x}, -\end{equation*} -$$ -

     
    - -

    where \( \boldsymbol{r} \) is the so-called residual or error in the iterative process.

    - -

    When we have found the exact solution, \( \boldsymbol{r}=0 \).

    -
    - -
    -

    Gradient method

    - -

    The residual is zero when we reach the minimum of the quadratic equation

    -

     
    -$$ -\begin{equation*} - P(\boldsymbol{x})=\frac{1}{2}\boldsymbol{x}^T\boldsymbol{A}\boldsymbol{x} - \boldsymbol{x}^T\boldsymbol{b}, -\end{equation*} -$$ -

     
    - -

    with the constraint that the matrix \( \boldsymbol{A} \) is positive definite and -symmetric. This defines also the Hessian and we want it to be positive definite. -

    -
    - -
    -

    Steepest descent method

    - -

    We denote the initial guess for \( \boldsymbol{x} \) as \( \boldsymbol{x}_0 \). -We can assume without loss of generality that -

    -

     
    -$$ -\begin{equation*} -\boldsymbol{x}_0=0, -\end{equation*} -$$ -

     
    - -

    or consider the system

    -

     
    -$$ -\begin{equation*} -\boldsymbol{A}\boldsymbol{z} = \boldsymbol{b}-\boldsymbol{A}\boldsymbol{x}_0, -\end{equation*} -$$ -

     
    - -

    instead.

    -
    - -
    -

    Steepest descent method

    -
    - -

    -

    One can show that the solution \( \boldsymbol{x} \) is also the unique minimizer of the quadratic form

    -

     
    -$$ -\begin{equation*} - f(\boldsymbol{x}) = \frac{1}{2}\boldsymbol{x}^T\boldsymbol{A}\boldsymbol{x} - \boldsymbol{x}^T \boldsymbol{x} , \quad \boldsymbol{x}\in\mathbf{R}^n. -\end{equation*} -$$ -

     
    - -

    This suggests taking the first basis vector \( \boldsymbol{r}_1 \) (see below for definition) -to be the gradient of \( f \) at \( \boldsymbol{x}=\boldsymbol{x}_0 \), -which equals -

    -

     
    -$$ -\begin{equation*} -\boldsymbol{A}\boldsymbol{x}_0-\boldsymbol{b}, -\end{equation*} -$$ -

     
    - -

    and -\( \boldsymbol{x}_0=0 \) it is equal \( -\boldsymbol{b} \). -

    -
    -
    - -
    -

    Final expressions

    -
    - -

    -

    We can compute the residual iteratively as

    -

     
    -$$ -\begin{equation*} -\boldsymbol{r}_{k+1}=\boldsymbol{b}-\boldsymbol{A}\boldsymbol{x}_{k+1}, - \end{equation*} -$$ -

     
    - -

    which equals

    -

     
    -$$ -\begin{equation*} -\boldsymbol{b}-\boldsymbol{A}(\boldsymbol{x}_k+\alpha_k\boldsymbol{r}_k), - \end{equation*} -$$ -

     
    - -

    or

    -

     
    -$$ -\begin{equation*} -(\boldsymbol{b}-\boldsymbol{A}\boldsymbol{x}_k)-\alpha_k\boldsymbol{A}\boldsymbol{r}_k, - \end{equation*} -$$ -

     
    - -

    which gives

    - -

     
    -$$ -\alpha_k = \frac{\boldsymbol{r}_k^T\boldsymbol{r}_k}{\boldsymbol{r}_k^T\boldsymbol{A}\boldsymbol{r}_k} -$$ -

     
    - -

    leading to the iterative scheme

    -

     
    -$$ -\begin{equation*} -\boldsymbol{x}_{k+1}=\boldsymbol{x}_k-\alpha_k\boldsymbol{r}_{k}, - \end{equation*} -$$ -

     
    -

    -
    - -
    -

    Steepest descent example

    - - - -
    -
    -
    -
    -
    -
    import numpy as np
    -import numpy.linalg as la
    -
    -import scipy.optimize as sopt
    -
    -import matplotlib.pyplot as pt
    -from mpl_toolkits.mplot3d import axes3d
    -
    -def f(x):
    -    return x[0]**2 + 3.0*x[1]**2
    -
    -def df(x):
    -    return np.array([2*x[0], 6*x[1]])
    -
    -fig = pt.figure()
    -ax = fig.gca(projection="3d")
    -
    -xmesh, ymesh = np.mgrid[-3:3:50j,-3:3:50j]
    -fmesh = f(np.array([xmesh, ymesh]))
    -ax.plot_surface(xmesh, ymesh, fmesh)
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -

    And then as countor plot

    - - -
    -
    -
    -
    -
    -
    pt.axis("equal")
    -pt.contour(xmesh, ymesh, fmesh)
    -guesses = [np.array([2, 2./5])]
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -

    Find guesses

    - - -
    -
    -
    -
    -
    -
    x = guesses[-1]
    -s = -df(x)
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -

    Run it!

    - - -
    -
    -
    -
    -
    -
    def f1d(alpha):
    -    return f(x + alpha*s)
    -
    -alpha_opt = sopt.golden(f1d)
    -next_guess = x + alpha_opt * s
    -guesses.append(next_guess)
    -print(next_guess)
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -

    What happened?

    - - -
    -
    -
    -
    -
    -
    pt.axis("equal")
    -pt.contour(xmesh, ymesh, fmesh, 50)
    -it_array = np.array(guesses)
    -pt.plot(it_array.T[0], it_array.T[1], "x-")
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -

    Note that we did only one iteration here. We can easily add more using our previous guesses.

    -
    - -
    -

    Conjugate gradient method

    -
    - -

    -

    In the CG method we define so-called conjugate directions and two vectors -\( \boldsymbol{s} \) and \( \boldsymbol{t} \) -are said to be -conjugate if -

    -

     
    -$$ -\begin{equation*} -\boldsymbol{s}^T\boldsymbol{A}\boldsymbol{t}= 0. -\end{equation*} -$$ -

     
    - -

    The philosophy of the CG method is to perform searches in various conjugate directions -of our vectors \( \boldsymbol{x}_i \) obeying the above criterion, namely -

    -

     
    -$$ -\begin{equation*} -\boldsymbol{x}_i^T\boldsymbol{A}\boldsymbol{x}_j= 0. -\end{equation*} -$$ -

     
    - -

    Two vectors are conjugate if they are orthogonal with respect to -this inner product. Being conjugate is a symmetric relation: if \( \boldsymbol{s} \) is conjugate to \( \boldsymbol{t} \), then \( \boldsymbol{t} \) is conjugate to \( \boldsymbol{s} \). -

    -
    -
    - -
    -

    Conjugate gradient method

    -
    - -

    -

    An example is given by the eigenvectors of the matrix

    -

     
    -$$ -\begin{equation*} -\boldsymbol{v}_i^T\boldsymbol{A}\boldsymbol{v}_j= \lambda\boldsymbol{v}_i^T\boldsymbol{v}_j, -\end{equation*} -$$ -

     
    - -

    which is zero unless \( i=j \).

    -
    -
    - -
    -

    Conjugate gradient method

    -
    - -

    -

    Assume now that we have a symmetric positive-definite matrix \( \boldsymbol{A} \) of size -\( n\times n \). At each iteration \( i+1 \) we obtain the conjugate direction of a vector -

    -

     
    -$$ -\begin{equation*} -\boldsymbol{x}_{i+1}=\boldsymbol{x}_{i}+\alpha_i\boldsymbol{p}_{i}. -\end{equation*} -$$ -

     
    - -

    We assume that \( \boldsymbol{p}_{i} \) is a sequence of \( n \) mutually conjugate directions. -Then the \( \boldsymbol{p}_{i} \) form a basis of \( R^n \) and we can expand the solution -$ \boldsymbol{A}\boldsymbol{x} = \boldsymbol{b}$ in this basis, namely -

    - -

     
    -$$ -\begin{equation*} - \boldsymbol{x} = \sum^{n}_{i=1} \alpha_i \boldsymbol{p}_i. -\end{equation*} -$$ -

     
    -

    -
    - -
    -

    Conjugate gradient method

    -
    - -

    -

    The coefficients are given by

    -

     
    -$$ -\begin{equation*} - \mathbf{A}\mathbf{x} = \sum^{n}_{i=1} \alpha_i \mathbf{A} \mathbf{p}_i = \mathbf{b}. -\end{equation*} -$$ -

     
    - -

    Multiplying with \( \boldsymbol{p}_k^T \) from the left gives

    - -

     
    -$$ -\begin{equation*} - \boldsymbol{p}_k^T \boldsymbol{A}\boldsymbol{x} = \sum^{n}_{i=1} \alpha_i\boldsymbol{p}_k^T \boldsymbol{A}\boldsymbol{p}_i= \boldsymbol{p}_k^T \boldsymbol{b}, -\end{equation*} -$$ -

     
    - -

    and we can define the coefficients \( \alpha_k \) as

    - -

     
    -$$ -\begin{equation*} - \alpha_k = \frac{\boldsymbol{p}_k^T \boldsymbol{b}}{\boldsymbol{p}_k^T \boldsymbol{A} \boldsymbol{p}_k} -\end{equation*} -$$ -

     
    -

    -
    - -
    -

    Conjugate gradient method and iterations

    -
    - -

    - -

    If we choose the conjugate vectors \( \boldsymbol{p}_k \) carefully, -then we may not need all of them to obtain a good approximation to the solution -\( \boldsymbol{x} \). -We want to regard the conjugate gradient method as an iterative method. -This will us to solve systems where \( n \) is so large that the direct -method would take too much time. -

    - -

    We denote the initial guess for \( \boldsymbol{x} \) as \( \boldsymbol{x}_0 \). -We can assume without loss of generality that -

    -

     
    -$$ -\begin{equation*} -\boldsymbol{x}_0=0, -\end{equation*} -$$ -

     
    - -

    or consider the system

    -

     
    -$$ -\begin{equation*} -\boldsymbol{A}\boldsymbol{z} = \boldsymbol{b}-\boldsymbol{A}\boldsymbol{x}_0, -\end{equation*} -$$ -

     
    - -

    instead.

    -
    -
    - -
    -

    Conjugate gradient method

    -
    - -

    -

    One can show that the solution \( \boldsymbol{x} \) is also the unique minimizer of the quadratic form

    -

     
    -$$ -\begin{equation*} - f(\boldsymbol{x}) = \frac{1}{2}\boldsymbol{x}^T\boldsymbol{A}\boldsymbol{x} - \boldsymbol{x}^T \boldsymbol{x} , \quad \boldsymbol{x}\in\mathbf{R}^n. -\end{equation*} -$$ -

     
    - -

    This suggests taking the first basis vector \( \boldsymbol{p}_1 \) -to be the gradient of \( f \) at \( \boldsymbol{x}=\boldsymbol{x}_0 \), -which equals -

    -

     
    -$$ -\begin{equation*} -\boldsymbol{A}\boldsymbol{x}_0-\boldsymbol{b}, -\end{equation*} -$$ -

     
    - -

    and -\( \boldsymbol{x}_0=0 \) it is equal \( -\boldsymbol{b} \). -The other vectors in the basis will be conjugate to the gradient, -hence the name conjugate gradient method. -

    -
    -
    - -
    -

    Conjugate gradient method

    -
    - -

    -

    Let \( \boldsymbol{r}_k \) be the residual at the \( k \)-th step:

    -

     
    -$$ -\begin{equation*} -\boldsymbol{r}_k=\boldsymbol{b}-\boldsymbol{A}\boldsymbol{x}_k. -\end{equation*} -$$ -

     
    - -

    Note that \( \boldsymbol{r}_k \) is the negative gradient of \( f \) at -\( \boldsymbol{x}=\boldsymbol{x}_k \), -so the gradient descent method would be to move in the direction \( \boldsymbol{r}_k \). -Here, we insist that the directions \( \boldsymbol{p}_k \) are conjugate to each other, -so we take the direction closest to the gradient \( \boldsymbol{r}_k \) -under the conjugacy constraint. -This gives the following expression -

    -

     
    -$$ -\begin{equation*} -\boldsymbol{p}_{k+1}=\boldsymbol{r}_k-\frac{\boldsymbol{p}_k^T \boldsymbol{A}\boldsymbol{r}_k}{\boldsymbol{p}_k^T\boldsymbol{A}\boldsymbol{p}_k} \boldsymbol{p}_k. -\end{equation*} -$$ -

     
    -

    -
    - -
    -

    Conjugate gradient method

    -
    - -

    -

    We can also compute the residual iteratively as

    -

     
    -$$ -\begin{equation*} -\boldsymbol{r}_{k+1}=\boldsymbol{b}-\boldsymbol{A}\boldsymbol{x}_{k+1}, - \end{equation*} -$$ -

     
    - -

    which equals

    -

     
    -$$ -\begin{equation*} -\boldsymbol{b}-\boldsymbol{A}(\boldsymbol{x}_k+\alpha_k\boldsymbol{p}_k), - \end{equation*} -$$ -

     
    - -

    or

    -

     
    -$$ -\begin{equation*} -(\boldsymbol{b}-\boldsymbol{A}\boldsymbol{x}_k)-\alpha_k\boldsymbol{A}\boldsymbol{p}_k, - \end{equation*} -$$ -

     
    - -

    which gives

    - -

     
    -$$ -\begin{equation*} -\boldsymbol{r}_{k+1}=\boldsymbol{r}_k-\boldsymbol{A}\boldsymbol{p}_{k}, - \end{equation*} -$$ -

     
    -

    -
    -

    Revisiting our first homework

    diff --git a/doc/pub/week38/html/week38-solarized.html b/doc/pub/week38/html/week38-solarized.html index 899b48b67..c72f6ae20 100644 --- a/doc/pub/week38/html/week38-solarized.html +++ b/doc/pub/week38/html/week38-solarized.html @@ -196,47 +196,6 @@ div.toc p,a { 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -1555,8 +1514,6 @@ X_train, X_test, y_train, y_test = train_test_split(cancer.data,cancer.target,ra # Logistic Regression logreg = LogisticRegression(solver='lbfgs') logreg.fit(X_train, y_train) -print("Test set accuracy with Logistic Regression: {:.2f}".format(logreg.score(X_test,y_test))) - from sklearn.preprocessing import LabelEncoder from sklearn.model_selection import cross_validate @@ -1565,7 +1522,6 @@ accuracy = cross_validate(logreg,X_test,y_test,cv=1 print(accuracy) print("Test set accuracy with Logistic Regression: {:.2f}".format(logreg.score(X_test,y_test))) - import scikitplot as skplt y_pred = logreg.predict(X_test) skplt.metrics.plot_confusion_matrix(y_test, y_pred, normalize=True) @@ -2041,529 +1997,6 @@ is minimal, where \( f \) is convex and differentiable. Then, any point

    Using the definition of convexity, try to show that a function satisfying the properties above is convex (the third condition is not needed to show this).

    -









    -

    Standard steepest descent

    - -

    Before we proceed, we would like to discuss the approach called the -standard Steepest descent (different from the above steepest descent discussion), which again leads to us having to be able -to compute a matrix. It belongs to the class of Conjugate Gradient methods (CG). -

    - -The success of the CG method -

    for finding solutions of non-linear problems is based on the theory -of conjugate gradients for linear systems of equations. It belongs to -the class of iterative methods for solving problems from linear -algebra of the type -

    -$$ -\begin{equation*} -\boldsymbol{A}\boldsymbol{x} = \boldsymbol{b}. -\end{equation*} -$$ - -

    In the iterative process we end up with a problem like

    - -$$ -\begin{equation*} - \boldsymbol{r}= \boldsymbol{b}-\boldsymbol{A}\boldsymbol{x}, -\end{equation*} -$$ - -

    where \( \boldsymbol{r} \) is the so-called residual or error in the iterative process.

    - -

    When we have found the exact solution, \( \boldsymbol{r}=0 \).

    - -









    -

    Gradient method

    - -

    The residual is zero when we reach the minimum of the quadratic equation

    -$$ -\begin{equation*} - P(\boldsymbol{x})=\frac{1}{2}\boldsymbol{x}^T\boldsymbol{A}\boldsymbol{x} - \boldsymbol{x}^T\boldsymbol{b}, -\end{equation*} -$$ - -

    with the constraint that the matrix \( \boldsymbol{A} \) is positive definite and -symmetric. This defines also the Hessian and we want it to be positive definite. -

    - -









    -

    Steepest descent method

    - -

    We denote the initial guess for \( \boldsymbol{x} \) as \( \boldsymbol{x}_0 \). -We can assume without loss of generality that -

    -$$ -\begin{equation*} -\boldsymbol{x}_0=0, -\end{equation*} -$$ - -

    or consider the system

    -$$ -\begin{equation*} -\boldsymbol{A}\boldsymbol{z} = \boldsymbol{b}-\boldsymbol{A}\boldsymbol{x}_0, -\end{equation*} -$$ - -

    instead.

    - -









    -

    Steepest descent method

    -
    - -

    -

    One can show that the solution \( \boldsymbol{x} \) is also the unique minimizer of the quadratic form

    -$$ -\begin{equation*} - f(\boldsymbol{x}) = \frac{1}{2}\boldsymbol{x}^T\boldsymbol{A}\boldsymbol{x} - \boldsymbol{x}^T \boldsymbol{x} , \quad \boldsymbol{x}\in\mathbf{R}^n. -\end{equation*} -$$ - -

    This suggests taking the first basis vector \( \boldsymbol{r}_1 \) (see below for definition) -to be the gradient of \( f \) at \( \boldsymbol{x}=\boldsymbol{x}_0 \), -which equals -

    -$$ -\begin{equation*} -\boldsymbol{A}\boldsymbol{x}_0-\boldsymbol{b}, -\end{equation*} -$$ - -

    and -\( \boldsymbol{x}_0=0 \) it is equal \( -\boldsymbol{b} \). -

    -
    - - -









    -

    Final expressions

    -
    - -

    -

    We can compute the residual iteratively as

    -$$ -\begin{equation*} -\boldsymbol{r}_{k+1}=\boldsymbol{b}-\boldsymbol{A}\boldsymbol{x}_{k+1}, - \end{equation*} -$$ - -

    which equals

    -$$ -\begin{equation*} -\boldsymbol{b}-\boldsymbol{A}(\boldsymbol{x}_k+\alpha_k\boldsymbol{r}_k), - \end{equation*} -$$ - -

    or

    -$$ -\begin{equation*} -(\boldsymbol{b}-\boldsymbol{A}\boldsymbol{x}_k)-\alpha_k\boldsymbol{A}\boldsymbol{r}_k, - \end{equation*} -$$ - -

    which gives

    - -$$ -\alpha_k = \frac{\boldsymbol{r}_k^T\boldsymbol{r}_k}{\boldsymbol{r}_k^T\boldsymbol{A}\boldsymbol{r}_k} -$$ - -

    leading to the iterative scheme

    -$$ -\begin{equation*} -\boldsymbol{x}_{k+1}=\boldsymbol{x}_k-\alpha_k\boldsymbol{r}_{k}, - \end{equation*} -$$ -
    - - -









    -

    Steepest descent example

    - - - -
    -
    -
    -
    -
    -
    import numpy as np
    -import numpy.linalg as la
    -
    -import scipy.optimize as sopt
    -
    -import matplotlib.pyplot as pt
    -from mpl_toolkits.mplot3d import axes3d
    -
    -def f(x):
    -    return x[0]**2 + 3.0*x[1]**2
    -
    -def df(x):
    -    return np.array([2*x[0], 6*x[1]])
    -
    -fig = pt.figure()
    -ax = fig.gca(projection="3d")
    -
    -xmesh, ymesh = np.mgrid[-3:3:50j,-3:3:50j]
    -fmesh = f(np.array([xmesh, ymesh]))
    -ax.plot_surface(xmesh, ymesh, fmesh)
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -

    And then as countor plot

    - - -
    -
    -
    -
    -
    -
    pt.axis("equal")
    -pt.contour(xmesh, ymesh, fmesh)
    -guesses = [np.array([2, 2./5])]
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -

    Find guesses

    - - -
    -
    -
    -
    -
    -
    x = guesses[-1]
    -s = -df(x)
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -

    Run it!

    - - -
    -
    -
    -
    -
    -
    def f1d(alpha):
    -    return f(x + alpha*s)
    -
    -alpha_opt = sopt.golden(f1d)
    -next_guess = x + alpha_opt * s
    -guesses.append(next_guess)
    -print(next_guess)
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -

    What happened?

    - - -
    -
    -
    -
    -
    -
    pt.axis("equal")
    -pt.contour(xmesh, ymesh, fmesh, 50)
    -it_array = np.array(guesses)
    -pt.plot(it_array.T[0], it_array.T[1], "x-")
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -

    Note that we did only one iteration here. We can easily add more using our previous guesses.

    - -









    -

    Conjugate gradient method

    -
    - -

    -

    In the CG method we define so-called conjugate directions and two vectors -\( \boldsymbol{s} \) and \( \boldsymbol{t} \) -are said to be -conjugate if -

    -$$ -\begin{equation*} -\boldsymbol{s}^T\boldsymbol{A}\boldsymbol{t}= 0. -\end{equation*} -$$ - -

    The philosophy of the CG method is to perform searches in various conjugate directions -of our vectors \( \boldsymbol{x}_i \) obeying the above criterion, namely -

    -$$ -\begin{equation*} -\boldsymbol{x}_i^T\boldsymbol{A}\boldsymbol{x}_j= 0. -\end{equation*} -$$ - -

    Two vectors are conjugate if they are orthogonal with respect to -this inner product. Being conjugate is a symmetric relation: if \( \boldsymbol{s} \) is conjugate to \( \boldsymbol{t} \), then \( \boldsymbol{t} \) is conjugate to \( \boldsymbol{s} \). -

    -
    - - -









    -

    Conjugate gradient method

    -
    - -

    -

    An example is given by the eigenvectors of the matrix

    -$$ -\begin{equation*} -\boldsymbol{v}_i^T\boldsymbol{A}\boldsymbol{v}_j= \lambda\boldsymbol{v}_i^T\boldsymbol{v}_j, -\end{equation*} -$$ - -

    which is zero unless \( i=j \).

    -
    - - -









    -

    Conjugate gradient method

    -
    - -

    -

    Assume now that we have a symmetric positive-definite matrix \( \boldsymbol{A} \) of size -\( n\times n \). At each iteration \( i+1 \) we obtain the conjugate direction of a vector -

    -$$ -\begin{equation*} -\boldsymbol{x}_{i+1}=\boldsymbol{x}_{i}+\alpha_i\boldsymbol{p}_{i}. -\end{equation*} -$$ - -

    We assume that \( \boldsymbol{p}_{i} \) is a sequence of \( n \) mutually conjugate directions. -Then the \( \boldsymbol{p}_{i} \) form a basis of \( R^n \) and we can expand the solution -$ \boldsymbol{A}\boldsymbol{x} = \boldsymbol{b}$ in this basis, namely -

    - -$$ -\begin{equation*} - \boldsymbol{x} = \sum^{n}_{i=1} \alpha_i \boldsymbol{p}_i. -\end{equation*} -$$ -
    - - -









    -

    Conjugate gradient method

    -
    - -

    -

    The coefficients are given by

    -$$ -\begin{equation*} - \mathbf{A}\mathbf{x} = \sum^{n}_{i=1} \alpha_i \mathbf{A} \mathbf{p}_i = \mathbf{b}. -\end{equation*} -$$ - -

    Multiplying with \( \boldsymbol{p}_k^T \) from the left gives

    - -$$ -\begin{equation*} - \boldsymbol{p}_k^T \boldsymbol{A}\boldsymbol{x} = \sum^{n}_{i=1} \alpha_i\boldsymbol{p}_k^T \boldsymbol{A}\boldsymbol{p}_i= \boldsymbol{p}_k^T \boldsymbol{b}, -\end{equation*} -$$ - -

    and we can define the coefficients \( \alpha_k \) as

    - -$$ -\begin{equation*} - \alpha_k = \frac{\boldsymbol{p}_k^T \boldsymbol{b}}{\boldsymbol{p}_k^T \boldsymbol{A} \boldsymbol{p}_k} -\end{equation*} -$$ -
    - - -









    -

    Conjugate gradient method and iterations

    -
    - -

    - -

    If we choose the conjugate vectors \( \boldsymbol{p}_k \) carefully, -then we may not need all of them to obtain a good approximation to the solution -\( \boldsymbol{x} \). -We want to regard the conjugate gradient method as an iterative method. -This will us to solve systems where \( n \) is so large that the direct -method would take too much time. -

    - -

    We denote the initial guess for \( \boldsymbol{x} \) as \( \boldsymbol{x}_0 \). -We can assume without loss of generality that -

    -$$ -\begin{equation*} -\boldsymbol{x}_0=0, -\end{equation*} -$$ - -

    or consider the system

    -$$ -\begin{equation*} -\boldsymbol{A}\boldsymbol{z} = \boldsymbol{b}-\boldsymbol{A}\boldsymbol{x}_0, -\end{equation*} -$$ - -

    instead.

    -
    - - -









    -

    Conjugate gradient method

    -
    - -

    -

    One can show that the solution \( \boldsymbol{x} \) is also the unique minimizer of the quadratic form

    -$$ -\begin{equation*} - f(\boldsymbol{x}) = \frac{1}{2}\boldsymbol{x}^T\boldsymbol{A}\boldsymbol{x} - \boldsymbol{x}^T \boldsymbol{x} , \quad \boldsymbol{x}\in\mathbf{R}^n. -\end{equation*} -$$ - -

    This suggests taking the first basis vector \( \boldsymbol{p}_1 \) -to be the gradient of \( f \) at \( \boldsymbol{x}=\boldsymbol{x}_0 \), -which equals -

    -$$ -\begin{equation*} -\boldsymbol{A}\boldsymbol{x}_0-\boldsymbol{b}, -\end{equation*} -$$ - -

    and -\( \boldsymbol{x}_0=0 \) it is equal \( -\boldsymbol{b} \). -The other vectors in the basis will be conjugate to the gradient, -hence the name conjugate gradient method. -

    -
    - - -









    -

    Conjugate gradient method

    -
    - -

    -

    Let \( \boldsymbol{r}_k \) be the residual at the \( k \)-th step:

    -$$ -\begin{equation*} -\boldsymbol{r}_k=\boldsymbol{b}-\boldsymbol{A}\boldsymbol{x}_k. -\end{equation*} -$$ - -

    Note that \( \boldsymbol{r}_k \) is the negative gradient of \( f \) at -\( \boldsymbol{x}=\boldsymbol{x}_k \), -so the gradient descent method would be to move in the direction \( \boldsymbol{r}_k \). -Here, we insist that the directions \( \boldsymbol{p}_k \) are conjugate to each other, -so we take the direction closest to the gradient \( \boldsymbol{r}_k \) -under the conjugacy constraint. -This gives the following expression -

    -$$ -\begin{equation*} -\boldsymbol{p}_{k+1}=\boldsymbol{r}_k-\frac{\boldsymbol{p}_k^T \boldsymbol{A}\boldsymbol{r}_k}{\boldsymbol{p}_k^T\boldsymbol{A}\boldsymbol{p}_k} \boldsymbol{p}_k. -\end{equation*} -$$ -
    - - -









    -

    Conjugate gradient method

    -
    - -

    -

    We can also compute the residual iteratively as

    -$$ -\begin{equation*} -\boldsymbol{r}_{k+1}=\boldsymbol{b}-\boldsymbol{A}\boldsymbol{x}_{k+1}, - \end{equation*} -$$ - -

    which equals

    -$$ -\begin{equation*} -\boldsymbol{b}-\boldsymbol{A}(\boldsymbol{x}_k+\alpha_k\boldsymbol{p}_k), - \end{equation*} -$$ - -

    or

    -$$ -\begin{equation*} -(\boldsymbol{b}-\boldsymbol{A}\boldsymbol{x}_k)-\alpha_k\boldsymbol{A}\boldsymbol{p}_k, - \end{equation*} -$$ - -

    which gives

    - -$$ -\begin{equation*} -\boldsymbol{r}_{k+1}=\boldsymbol{r}_k-\boldsymbol{A}\boldsymbol{p}_{k}, - \end{equation*} -$$ -
    - -

    Revisiting our first homework

    diff --git a/doc/pub/week38/html/week38.html b/doc/pub/week38/html/week38.html index 332960e54..d78efc01a 100644 --- a/doc/pub/week38/html/week38.html +++ b/doc/pub/week38/html/week38.html @@ -273,47 +273,6 @@ div.toc p,a { 'conditions-on-convex-functions'), ('More on convex functions', 2, None, 'more-on-convex-functions'), ('Some simple problems', 2, None, 'some-simple-problems'), - ('Standard steepest descent', - 2, - None, - 'standard-steepest-descent'), - ('Gradient method', 2, None, 'gradient-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Steepest descent method', 2, None, 'steepest-descent-method'), - ('Final expressions', 2, None, 'final-expressions'), - ('Steepest descent example', 2, None, 'steepest-descent-example'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method and iterations', - 2, - None, - 'conjugate-gradient-method-and-iterations'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), - ('Conjugate gradient method', - 2, - None, - 'conjugate-gradient-method'), ('Revisiting our first homework', 2, None, @@ -1632,8 +1591,6 @@ X_train, X_test, y_train, y_test = train_tes # Logistic Regression logreg = LogisticRegression(solver='lbfgs') logreg.fit(X_train, y_train) -print("Test set accuracy with Logistic Regression: {:.2f}".format(logreg.score(X_test,y_test))) - from sklearn.preprocessing import LabelEncoder from sklearn.model_selection import cross_validate @@ -1642,7 +1599,6 @@ accuracy = cross_validate(logreg,X_test,y_te print(accuracy) print("Test set accuracy with Logistic Regression: {:.2f}".format(logreg.score(X_test,y_test))) - import scikitplot as skplt y_pred = logreg.predict(X_test) skplt.metrics.plot_confusion_matrix(y_test, y_pred, normalize=True) @@ -2118,529 +2074,6 @@ is minimal, where \( f \) is convex and differentiable. Then, any point

    Using the definition of convexity, try to show that a function satisfying the properties above is convex (the third condition is not needed to show this).

    -









    -

    Standard steepest descent

    - -

    Before we proceed, we would like to discuss the approach called the -standard Steepest descent (different from the above steepest descent discussion), which again leads to us having to be able -to compute a matrix. It belongs to the class of Conjugate Gradient methods (CG). -

    - -The success of the CG method -

    for finding solutions of non-linear problems is based on the theory -of conjugate gradients for linear systems of equations. It belongs to -the class of iterative methods for solving problems from linear -algebra of the type -

    -$$ -\begin{equation*} -\boldsymbol{A}\boldsymbol{x} = \boldsymbol{b}. -\end{equation*} -$$ - -

    In the iterative process we end up with a problem like

    - -$$ -\begin{equation*} - \boldsymbol{r}= \boldsymbol{b}-\boldsymbol{A}\boldsymbol{x}, -\end{equation*} -$$ - -

    where \( \boldsymbol{r} \) is the so-called residual or error in the iterative process.

    - -

    When we have found the exact solution, \( \boldsymbol{r}=0 \).

    - -









    -

    Gradient method

    - -

    The residual is zero when we reach the minimum of the quadratic equation

    -$$ -\begin{equation*} - P(\boldsymbol{x})=\frac{1}{2}\boldsymbol{x}^T\boldsymbol{A}\boldsymbol{x} - \boldsymbol{x}^T\boldsymbol{b}, -\end{equation*} -$$ - -

    with the constraint that the matrix \( \boldsymbol{A} \) is positive definite and -symmetric. This defines also the Hessian and we want it to be positive definite. -

    - -









    -

    Steepest descent method

    - -

    We denote the initial guess for \( \boldsymbol{x} \) as \( \boldsymbol{x}_0 \). -We can assume without loss of generality that -

    -$$ -\begin{equation*} -\boldsymbol{x}_0=0, -\end{equation*} -$$ - -

    or consider the system

    -$$ -\begin{equation*} -\boldsymbol{A}\boldsymbol{z} = \boldsymbol{b}-\boldsymbol{A}\boldsymbol{x}_0, -\end{equation*} -$$ - -

    instead.

    - -









    -

    Steepest descent method

    -
    - -

    -

    One can show that the solution \( \boldsymbol{x} \) is also the unique minimizer of the quadratic form

    -$$ -\begin{equation*} - f(\boldsymbol{x}) = \frac{1}{2}\boldsymbol{x}^T\boldsymbol{A}\boldsymbol{x} - \boldsymbol{x}^T \boldsymbol{x} , \quad \boldsymbol{x}\in\mathbf{R}^n. -\end{equation*} -$$ - -

    This suggests taking the first basis vector \( \boldsymbol{r}_1 \) (see below for definition) -to be the gradient of \( f \) at \( \boldsymbol{x}=\boldsymbol{x}_0 \), -which equals -

    -$$ -\begin{equation*} -\boldsymbol{A}\boldsymbol{x}_0-\boldsymbol{b}, -\end{equation*} -$$ - -

    and -\( \boldsymbol{x}_0=0 \) it is equal \( -\boldsymbol{b} \). -

    -
    - - -









    -

    Final expressions

    -
    - -

    -

    We can compute the residual iteratively as

    -$$ -\begin{equation*} -\boldsymbol{r}_{k+1}=\boldsymbol{b}-\boldsymbol{A}\boldsymbol{x}_{k+1}, - \end{equation*} -$$ - -

    which equals

    -$$ -\begin{equation*} -\boldsymbol{b}-\boldsymbol{A}(\boldsymbol{x}_k+\alpha_k\boldsymbol{r}_k), - \end{equation*} -$$ - -

    or

    -$$ -\begin{equation*} -(\boldsymbol{b}-\boldsymbol{A}\boldsymbol{x}_k)-\alpha_k\boldsymbol{A}\boldsymbol{r}_k, - \end{equation*} -$$ - -

    which gives

    - -$$ -\alpha_k = \frac{\boldsymbol{r}_k^T\boldsymbol{r}_k}{\boldsymbol{r}_k^T\boldsymbol{A}\boldsymbol{r}_k} -$$ - -

    leading to the iterative scheme

    -$$ -\begin{equation*} -\boldsymbol{x}_{k+1}=\boldsymbol{x}_k-\alpha_k\boldsymbol{r}_{k}, - \end{equation*} -$$ -
    - - -









    -

    Steepest descent example

    - - - -
    -
    -
    -
    -
    -
    import numpy as np
    -import numpy.linalg as la
    -
    -import scipy.optimize as sopt
    -
    -import matplotlib.pyplot as pt
    -from mpl_toolkits.mplot3d import axes3d
    -
    -def f(x):
    -    return x[0]**2 + 3.0*x[1]**2
    -
    -def df(x):
    -    return np.array([2*x[0], 6*x[1]])
    -
    -fig = pt.figure()
    -ax = fig.gca(projection="3d")
    -
    -xmesh, ymesh = np.mgrid[-3:3:50j,-3:3:50j]
    -fmesh = f(np.array([xmesh, ymesh]))
    -ax.plot_surface(xmesh, ymesh, fmesh)
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -

    And then as countor plot

    - - -
    -
    -
    -
    -
    -
    pt.axis("equal")
    -pt.contour(xmesh, ymesh, fmesh)
    -guesses = [np.array([2, 2./5])]
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -

    Find guesses

    - - -
    -
    -
    -
    -
    -
    x = guesses[-1]
    -s = -df(x)
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -

    Run it!

    - - -
    -
    -
    -
    -
    -
    def f1d(alpha):
    -    return f(x + alpha*s)
    -
    -alpha_opt = sopt.golden(f1d)
    -next_guess = x + alpha_opt * s
    -guesses.append(next_guess)
    -print(next_guess)
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -

    What happened?

    - - -
    -
    -
    -
    -
    -
    pt.axis("equal")
    -pt.contour(xmesh, ymesh, fmesh, 50)
    -it_array = np.array(guesses)
    -pt.plot(it_array.T[0], it_array.T[1], "x-")
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -

    Note that we did only one iteration here. We can easily add more using our previous guesses.

    - -









    -

    Conjugate gradient method

    -
    - -

    -

    In the CG method we define so-called conjugate directions and two vectors -\( \boldsymbol{s} \) and \( \boldsymbol{t} \) -are said to be -conjugate if -

    -$$ -\begin{equation*} -\boldsymbol{s}^T\boldsymbol{A}\boldsymbol{t}= 0. -\end{equation*} -$$ - -

    The philosophy of the CG method is to perform searches in various conjugate directions -of our vectors \( \boldsymbol{x}_i \) obeying the above criterion, namely -

    -$$ -\begin{equation*} -\boldsymbol{x}_i^T\boldsymbol{A}\boldsymbol{x}_j= 0. -\end{equation*} -$$ - -

    Two vectors are conjugate if they are orthogonal with respect to -this inner product. Being conjugate is a symmetric relation: if \( \boldsymbol{s} \) is conjugate to \( \boldsymbol{t} \), then \( \boldsymbol{t} \) is conjugate to \( \boldsymbol{s} \). -

    -
    - - -









    -

    Conjugate gradient method

    -
    - -

    -

    An example is given by the eigenvectors of the matrix

    -$$ -\begin{equation*} -\boldsymbol{v}_i^T\boldsymbol{A}\boldsymbol{v}_j= \lambda\boldsymbol{v}_i^T\boldsymbol{v}_j, -\end{equation*} -$$ - -

    which is zero unless \( i=j \).

    -
    - - -









    -

    Conjugate gradient method

    -
    - -

    -

    Assume now that we have a symmetric positive-definite matrix \( \boldsymbol{A} \) of size -\( n\times n \). At each iteration \( i+1 \) we obtain the conjugate direction of a vector -

    -$$ -\begin{equation*} -\boldsymbol{x}_{i+1}=\boldsymbol{x}_{i}+\alpha_i\boldsymbol{p}_{i}. -\end{equation*} -$$ - -

    We assume that \( \boldsymbol{p}_{i} \) is a sequence of \( n \) mutually conjugate directions. -Then the \( \boldsymbol{p}_{i} \) form a basis of \( R^n \) and we can expand the solution -$ \boldsymbol{A}\boldsymbol{x} = \boldsymbol{b}$ in this basis, namely -

    - -$$ -\begin{equation*} - \boldsymbol{x} = \sum^{n}_{i=1} \alpha_i \boldsymbol{p}_i. -\end{equation*} -$$ -
    - - -









    -

    Conjugate gradient method

    -
    - -

    -

    The coefficients are given by

    -$$ -\begin{equation*} - \mathbf{A}\mathbf{x} = \sum^{n}_{i=1} \alpha_i \mathbf{A} \mathbf{p}_i = \mathbf{b}. -\end{equation*} -$$ - -

    Multiplying with \( \boldsymbol{p}_k^T \) from the left gives

    - -$$ -\begin{equation*} - \boldsymbol{p}_k^T \boldsymbol{A}\boldsymbol{x} = \sum^{n}_{i=1} \alpha_i\boldsymbol{p}_k^T \boldsymbol{A}\boldsymbol{p}_i= \boldsymbol{p}_k^T \boldsymbol{b}, -\end{equation*} -$$ - -

    and we can define the coefficients \( \alpha_k \) as

    - -$$ -\begin{equation*} - \alpha_k = \frac{\boldsymbol{p}_k^T \boldsymbol{b}}{\boldsymbol{p}_k^T \boldsymbol{A} \boldsymbol{p}_k} -\end{equation*} -$$ -
    - - -









    -

    Conjugate gradient method and iterations

    -
    - -

    - -

    If we choose the conjugate vectors \( \boldsymbol{p}_k \) carefully, -then we may not need all of them to obtain a good approximation to the solution -\( \boldsymbol{x} \). -We want to regard the conjugate gradient method as an iterative method. -This will us to solve systems where \( n \) is so large that the direct -method would take too much time. -

    - -

    We denote the initial guess for \( \boldsymbol{x} \) as \( \boldsymbol{x}_0 \). -We can assume without loss of generality that -

    -$$ -\begin{equation*} -\boldsymbol{x}_0=0, -\end{equation*} -$$ - -

    or consider the system

    -$$ -\begin{equation*} -\boldsymbol{A}\boldsymbol{z} = \boldsymbol{b}-\boldsymbol{A}\boldsymbol{x}_0, -\end{equation*} -$$ - -

    instead.

    -
    - - -









    -

    Conjugate gradient method

    -
    - -

    -

    One can show that the solution \( \boldsymbol{x} \) is also the unique minimizer of the quadratic form

    -$$ -\begin{equation*} - f(\boldsymbol{x}) = \frac{1}{2}\boldsymbol{x}^T\boldsymbol{A}\boldsymbol{x} - \boldsymbol{x}^T \boldsymbol{x} , \quad \boldsymbol{x}\in\mathbf{R}^n. -\end{equation*} -$$ - -

    This suggests taking the first basis vector \( \boldsymbol{p}_1 \) -to be the gradient of \( f \) at \( \boldsymbol{x}=\boldsymbol{x}_0 \), -which equals -

    -$$ -\begin{equation*} -\boldsymbol{A}\boldsymbol{x}_0-\boldsymbol{b}, -\end{equation*} -$$ - -

    and -\( \boldsymbol{x}_0=0 \) it is equal \( -\boldsymbol{b} \). -The other vectors in the basis will be conjugate to the gradient, -hence the name conjugate gradient method. -

    -
    - - -









    -

    Conjugate gradient method

    -
    - -

    -

    Let \( \boldsymbol{r}_k \) be the residual at the \( k \)-th step:

    -$$ -\begin{equation*} -\boldsymbol{r}_k=\boldsymbol{b}-\boldsymbol{A}\boldsymbol{x}_k. -\end{equation*} -$$ - -

    Note that \( \boldsymbol{r}_k \) is the negative gradient of \( f \) at -\( \boldsymbol{x}=\boldsymbol{x}_k \), -so the gradient descent method would be to move in the direction \( \boldsymbol{r}_k \). -Here, we insist that the directions \( \boldsymbol{p}_k \) are conjugate to each other, -so we take the direction closest to the gradient \( \boldsymbol{r}_k \) -under the conjugacy constraint. -This gives the following expression -

    -$$ -\begin{equation*} -\boldsymbol{p}_{k+1}=\boldsymbol{r}_k-\frac{\boldsymbol{p}_k^T \boldsymbol{A}\boldsymbol{r}_k}{\boldsymbol{p}_k^T\boldsymbol{A}\boldsymbol{p}_k} \boldsymbol{p}_k. -\end{equation*} -$$ -
    - - -









    -

    Conjugate gradient method

    -
    - -

    -

    We can also compute the residual iteratively as

    -$$ -\begin{equation*} -\boldsymbol{r}_{k+1}=\boldsymbol{b}-\boldsymbol{A}\boldsymbol{x}_{k+1}, - \end{equation*} -$$ - -

    which equals

    -$$ -\begin{equation*} -\boldsymbol{b}-\boldsymbol{A}(\boldsymbol{x}_k+\alpha_k\boldsymbol{p}_k), - \end{equation*} -$$ - -

    or

    -$$ -\begin{equation*} -(\boldsymbol{b}-\boldsymbol{A}\boldsymbol{x}_k)-\alpha_k\boldsymbol{A}\boldsymbol{p}_k, - \end{equation*} -$$ - -

    which gives

    - -$$ -\begin{equation*} -\boldsymbol{r}_{k+1}=\boldsymbol{r}_k-\boldsymbol{A}\boldsymbol{p}_{k}, - \end{equation*} -$$ -
    - -

    Revisiting our first homework

    diff --git a/doc/pub/week38/ipynb/ipynb-week38-src.tar.gz b/doc/pub/week38/ipynb/ipynb-week38-src.tar.gz index 58c236f87bc3ed9018ca2923a38d37f97ac046cd..4408c6d9be92eb49cfa47e3a73a366fcd2954a7a 100644 GIT binary patch literal 192 zcmV;x06+g9iwFQ)PAy{q1MSbv3c@f92k@Qu6nTQtuHEKUa0d^9h%eBw%+z)Gs& zGT%urSL=l7PigBTDvRpfTt8M-ANEYIz%&2EzLpl&+s@Tmfzl2OtsA%@Hf#~ebEgU@ uHQJ#C1}|4>5QOSLl%;f1D{%_XMjwo5Z500c8PD@P?`sd%D(Dgb2mk=41y?ly literal 193 zcmV;y06za8iwFSIM=fIj1MSaC3c@fD2H>uHia9|^nxu6r*o6y0#0#V}wXrs-Ns9LN z_5r$5+!PV=ZGMIshM7aQ-t4l--CeL4git~$jF~2EN)*ra1Y-u65=>%B(wG3kgvBfX zwA@KAopsy{r!>`BC@a*vxnZm1TYQ-;MYxK$R#zx_