diff --git a/doc/pub/week38/html/._week38-bs000.html b/doc/pub/week38/html/._week38-bs000.html index 3c1fdc334..a52bfcda1 100644 --- a/doc/pub/week38/html/._week38-bs000.html +++ b/doc/pub/week38/html/._week38-bs000.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -364,7 +362,7 @@ MathJax.Hub.Config({
  • 9
  • 10
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs001.html b/doc/pub/week38/html/._week38-bs001.html index 6a550ac3e..4b62a0142 100644 --- a/doc/pub/week38/html/._week38-bs001.html +++ b/doc/pub/week38/html/._week38-bs001.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -352,7 +350,7 @@ MathJax.Hub.Config({
  • 10
  • 11
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs002.html b/doc/pub/week38/html/._week38-bs002.html index 487d5e7ea..f5f74c7a4 100644 --- a/doc/pub/week38/html/._week38-bs002.html +++ b/doc/pub/week38/html/._week38-bs002.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -357,7 +355,7 @@ MathJax.Hub.Config({
  • 11
  • 12
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs003.html b/doc/pub/week38/html/._week38-bs003.html index 57141c7bc..9c7a8c5bd 100644 --- a/doc/pub/week38/html/._week38-bs003.html +++ b/doc/pub/week38/html/._week38-bs003.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -354,7 +352,7 @@ MathJax.Hub.Config({
  • 12
  • 13
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs004.html b/doc/pub/week38/html/._week38-bs004.html index 81863a2ad..e2fb069b1 100644 --- a/doc/pub/week38/html/._week38-bs004.html +++ b/doc/pub/week38/html/._week38-bs004.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -321,7 +319,7 @@ MathJax.Hub.Config({

     

     

     

    -

    Material for lecture Thursday September 21

    +

    Material for lecture Monday September 16

    @@ -342,7 +340,7 @@ MathJax.Hub.Config({

  • 13
  • 14
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs005.html b/doc/pub/week38/html/._week38-bs005.html index 551bdd8e1..06e44fb5b 100644 --- a/doc/pub/week38/html/._week38-bs005.html +++ b/doc/pub/week38/html/._week38-bs005.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -356,7 +354,7 @@ simple recipe for fitting our data.
  • 14
  • 15
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs006.html b/doc/pub/week38/html/._week38-bs006.html index 90e9dab96..893663b0f 100644 --- a/doc/pub/week38/html/._week38-bs006.html +++ b/doc/pub/week38/html/._week38-bs006.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -362,7 +360,7 @@ failure etc.
  • 15
  • 16
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs007.html b/doc/pub/week38/html/._week38-bs007.html index cf2dca7e9..7d230f0d6 100644 --- a/doc/pub/week38/html/._week38-bs007.html +++ b/doc/pub/week38/html/._week38-bs007.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -361,7 +359,7 @@ models, as we will see later.
  • 16
  • 17
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs008.html b/doc/pub/week38/html/._week38-bs008.html index 1686433ff..9788889fd 100644 --- a/doc/pub/week38/html/._week38-bs008.html +++ b/doc/pub/week38/html/._week38-bs008.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -369,7 +367,7 @@ $$
  • 17
  • 18
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs009.html b/doc/pub/week38/html/._week38-bs009.html index df145a26e..ecf5ff1c7 100644 --- a/doc/pub/week38/html/._week38-bs009.html +++ b/doc/pub/week38/html/._week38-bs009.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -367,7 +365,7 @@ $$
  • 18
  • 19
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs010.html b/doc/pub/week38/html/._week38-bs010.html index 498cca27a..ef4581284 100644 --- a/doc/pub/week38/html/._week38-bs010.html +++ b/doc/pub/week38/html/._week38-bs010.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -368,7 +366,7 @@ the probability of a given category. This leads us to the logistic function.
  • 19
  • 20
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs011.html b/doc/pub/week38/html/._week38-bs011.html index 5076b002f..e9d8d4629 100644 --- a/doc/pub/week38/html/._week38-bs011.html +++ b/doc/pub/week38/html/._week38-bs011.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -427,7 +425,7 @@ plt.show()
  • 20
  • 21
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs012.html b/doc/pub/week38/html/._week38-bs012.html index 2b9f5b825..c8a7ce3e3 100644 --- a/doc/pub/week38/html/._week38-bs012.html +++ b/doc/pub/week38/html/._week38-bs012.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -399,7 +397,7 @@ representing the probability for finding a value of \( y_i \) with a given
  • 21
  • 22
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs013.html b/doc/pub/week38/html/._week38-bs013.html index 51defc67f..69634491c 100644 --- a/doc/pub/week38/html/._week38-bs013.html +++ b/doc/pub/week38/html/._week38-bs013.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -366,7 +364,7 @@ $$
  • 22
  • 23
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs014.html b/doc/pub/week38/html/._week38-bs014.html index f28b7d3f9..eaa1d6ac9 100644 --- a/doc/pub/week38/html/._week38-bs014.html +++ b/doc/pub/week38/html/._week38-bs014.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -427,7 +425,7 @@ plt.show()
  • 23
  • 24
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs015.html b/doc/pub/week38/html/._week38-bs015.html index 05bd553ca..2ecabeb95 100644 --- a/doc/pub/week38/html/._week38-bs015.html +++ b/doc/pub/week38/html/._week38-bs015.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -364,7 +362,7 @@ $$
  • 24
  • 25
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs016.html b/doc/pub/week38/html/._week38-bs016.html index a1ee25d8b..57aeb35bc 100644 --- a/doc/pub/week38/html/._week38-bs016.html +++ b/doc/pub/week38/html/._week38-bs016.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -367,7 +365,7 @@ $$
  • 25
  • 26
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs017.html b/doc/pub/week38/html/._week38-bs017.html index 3bb860b88..7a4092b38 100644 --- a/doc/pub/week38/html/._week38-bs017.html +++ b/doc/pub/week38/html/._week38-bs017.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -364,7 +362,7 @@ in practice we often supplement the cross-entropy with additional regularization
  • 26
  • 27
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs018.html b/doc/pub/week38/html/._week38-bs018.html index f8bb5c812..92aa08d87 100644 --- a/doc/pub/week38/html/._week38-bs018.html +++ b/doc/pub/week38/html/._week38-bs018.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -366,7 +364,7 @@ $$
  • 27
  • 28
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs019.html b/doc/pub/week38/html/._week38-bs019.html index b1e5b7367..80a1ba0a2 100644 --- a/doc/pub/week38/html/._week38-bs019.html +++ b/doc/pub/week38/html/._week38-bs019.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -367,7 +365,7 @@ $$
  • 28
  • 29
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs020.html b/doc/pub/week38/html/._week38-bs020.html index 8b364addb..603d7d0fb 100644 --- a/doc/pub/week38/html/._week38-bs020.html +++ b/doc/pub/week38/html/._week38-bs020.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -359,7 +357,7 @@ $$
  • 29
  • 30
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs021.html b/doc/pub/week38/html/._week38-bs021.html index bcaec474a..13346790e 100644 --- a/doc/pub/week38/html/._week38-bs021.html +++ b/doc/pub/week38/html/._week38-bs021.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -371,7 +369,7 @@ $$
  • 30
  • 31
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs022.html b/doc/pub/week38/html/._week38-bs022.html index f2df6ddaa..6b53c4aec 100644 --- a/doc/pub/week38/html/._week38-bs022.html +++ b/doc/pub/week38/html/._week38-bs022.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -383,7 +381,7 @@ methods.
  • 31
  • 32
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs023.html b/doc/pub/week38/html/._week38-bs023.html index 9fb3de602..d2a8d9bbc 100644 --- a/doc/pub/week38/html/._week38-bs023.html +++ b/doc/pub/week38/html/._week38-bs023.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -321,7 +319,86 @@ MathJax.Hub.Config({

     

     

     

    -

    Friday September 23

    +

    Searching for Optimal Regularization Parameters \( \lambda \)

    + +

    In project 1, when using Ridge and Lasso regression, we end up +searching for the optimal parameter \( \lambda \) which minimizes our +selected scores (MSE or \( R2 \) values for example). The brute force +approach, as discussed in the code here for Ridge regression, consists +in evaluating the MSE as function of different \( \lambda \) values. +Based on these calculations, one tries then to determine the value of the hyperparameter \( \lambda \) +which results in optimal scores (for example the smallest MSE or an \( R2=1 \)). +

    + + +
    +
    +
    +
    +
    +
    import numpy as np
    +import pandas as pd
    +import matplotlib.pyplot as plt
    +from sklearn.model_selection import train_test_split
    +from sklearn import linear_model
    +
    +def MSE(y_data,y_model):
    +    n = np.size(y_model)
    +    return np.sum((y_data-y_model)**2)/n
    +# A seed just to ensure that the random numbers are the same for every run.
    +# Useful for eventual debugging.
    +np.random.seed(2021)
    +
    +n = 100
    +x = np.random.rand(n)
    +y = np.exp(-x**2) + 1.5 * np.exp(-(x-2)**2)+ np.random.randn(n)
    +
    +Maxpolydegree = 5
    +X = np.zeros((n,Maxpolydegree-1))
    +
    +for degree in range(1,Maxpolydegree): #No intercept column
    +    X[:,degree-1] = x**(degree)
    +
    +# We split the data in test and training data
    +X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)
    +
    +# Decide which values of lambda to use
    +nlambdas = 500
    +MSERidgePredict = np.zeros(nlambdas)
    +lambdas = np.logspace(-4, 2, nlambdas)
    +for i in range(nlambdas):
    +    lmb = lambdas[i]
    +    RegRidge = linear_model.Ridge(lmb)
    +    RegRidge.fit(X_train,y_train)
    +    ypredictRidge = RegRidge.predict(X_test)
    +    MSERidgePredict[i] = MSE(y_test,ypredictRidge)
    +
    +# Now plot the results
    +plt.figure()
    +plt.plot(np.log10(lambdas), MSERidgePredict, 'g--', label = 'MSE SL Ridge Test')
    +plt.xlabel('log10(lambda)')
    +plt.ylabel('MSE')
    +plt.legend()
    +plt.show()
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +

    Here we have performed a rather data greedy calculation as function of the regularization parameter \( \lambda \). There is no resampling here. The latter can easily be added by employing the function RidgeCV instead of just calling the Ridge function. For RidgeCV we need to pass the array of \( \lambda \) values. +By inspecting the figure we can in turn determine which is the optimal regularization parameter. +This becomes however less functional in the long run. +

    @@ -348,7 +425,7 @@ MathJax.Hub.Config({

  • 32
  • 33
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs024.html b/doc/pub/week38/html/._week38-bs024.html index 5d6b6a56e..b93c2aa2a 100644 --- a/doc/pub/week38/html/._week38-bs024.html +++ b/doc/pub/week38/html/._week38-bs024.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -321,17 +319,14 @@ MathJax.Hub.Config({

     

     

     

    -

    Searching for Optimal Regularization Parameters \( \lambda \)

    + -

    In project 1, when using Ridge and Lasso regression, we end up -searching for the optimal parameter \( \lambda \) which minimizes our -selected scores (MSE or \( R2 \) values for example). The brute force -approach, as discussed in the code here for Ridge regression, consists -in evaluating the MSE as function of different \( \lambda \) values. -Based on these calculations, one tries then to determine the value of the hyperparameter \( \lambda \) -which results in optimal scores (for example the smallest MSE or an \( R2=1 \)). +

    An alternative is to use the so-called grid search functionality +included with the library Scikit-Learn, as demonstrated for the same +example here.

    +
    @@ -339,14 +334,17 @@ which results in optimal scores (for example the smallest MSE or an \( R2=1 \)).
    import numpy as np
    -import pandas as pd
    -import matplotlib.pyplot as plt
     from sklearn.model_selection import train_test_split
    -from sklearn import linear_model
    +from sklearn.linear_model import Ridge
    +from sklearn.model_selection import GridSearchCV
    +
    +def R2(y_data, y_model):
    +    return 1 - np.sum((y_data - y_model) ** 2) / np.sum((y_data - np.mean(y_data)) ** 2)
     
     def MSE(y_data,y_model):
         n = np.size(y_model)
         return np.sum((y_data-y_model)**2)/n
    +
     # A seed just to ensure that the random numbers are the same for every run.
     # Useful for eventual debugging.
     np.random.seed(2021)
    @@ -365,23 +363,18 @@ X = np.z
     X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)
     
     # Decide which values of lambda to use
    -nlambdas = 500
    -MSERidgePredict = np.zeros(nlambdas)
    +nlambdas = 10
     lambdas = np.logspace(-4, 2, nlambdas)
    -for i in range(nlambdas):
    -    lmb = lambdas[i]
    -    RegRidge = linear_model.Ridge(lmb)
    -    RegRidge.fit(X_train,y_train)
    -    ypredictRidge = RegRidge.predict(X_test)
    -    MSERidgePredict[i] = MSE(y_test,ypredictRidge)
    -
    -# Now plot the results
    -plt.figure()
    -plt.plot(np.log10(lambdas), MSERidgePredict, 'g--', label = 'MSE SL Ridge Test')
    -plt.xlabel('log10(lambda)')
    -plt.ylabel('MSE')
    -plt.legend()
    -plt.show()
    +# create and fit a ridge regression model, testing each alpha
    +model = Ridge()
    +gridsearch = GridSearchCV(estimator=model, param_grid=dict(alpha=lambdas))
    +gridsearch.fit(X_train, y_train)
    +print(gridsearch)
    +ypredictRidge = gridsearch.predict(X_test)
    +# summarize the results of the grid search
    +print(f"Best estimated lambda-value: {gridsearch.best_estimator_.alpha}")
    +print(f"MSE score: {MSE(y_test,ypredictRidge)}")
    +print(f"R2 score: {R2(y_test,ypredictRidge)}")
     
    @@ -397,11 +390,14 @@ plt.show()
    -

    Here we have performed a rather data greedy calculation as function of the regularization parameter \( \lambda \). There is no resampling here. The latter can easily be added by employing the function RidgeCV instead of just calling the Ridge function. For RidgeCV we need to pass the array of \( \lambda \) values. -By inspecting the figure we can in turn determine which is the optimal regularization parameter. -This becomes however less functional in the long run. +

    By default the grid search function includes cross validation with +five folds. The Scikit-Learn +documentation +contains more information on how to set the different parameters.

    +

    If we take out the random noise, running the above codes results in \( \lambda=0 \) yielding the best fit.

    +

    diff --git a/doc/pub/week38/html/._week38-bs025.html b/doc/pub/week38/html/._week38-bs025.html index b965cdc49..b1c784217 100644 --- a/doc/pub/week38/html/._week38-bs025.html +++ b/doc/pub/week38/html/._week38-bs025.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -321,11 +319,16 @@ MathJax.Hub.Config({

     

     

     

    - + -

    An alternative is to use the so-called grid search functionality -included with the library Scikit-Learn, as demonstrated for the same -example here. +

    An alternative to the above manual grid set up, is to use a random +search where the parameters are tuned from a random distribution +(uniform below) for a fixed number of iterations. A model is +constructed and evaluated for each combination of chosen parameters. +We repeat the previous example but now with a random search. Note +that values of \( \lambda \) are now limited to be within \( x\in +[0,1] \). This domain may not be the most relevant one for the specific +case under study.

    @@ -339,6 +342,9 @@ example here. from sklearn.model_selection import train_test_split from sklearn.linear_model import Ridge from sklearn.model_selection import GridSearchCV +from scipy.stats import uniform as randuniform +from sklearn.model_selection import RandomizedSearchCV + def R2(y_data, y_model): return 1 - np.sum((y_data - y_model) ** 2) / np.sum((y_data - np.mean(y_data)) ** 2) @@ -364,12 +370,10 @@ X = np.z # We split the data in test and training data X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2) -# Decide which values of lambda to use -nlambdas = 10 -lambdas = np.logspace(-4, 2, nlambdas) +param_grid = {'alpha': randuniform()} # create and fit a ridge regression model, testing each alpha model = Ridge() -gridsearch = GridSearchCV(estimator=model, param_grid=dict(alpha=lambdas)) +gridsearch = RandomizedSearchCV(estimator=model, param_distributions=param_grid, n_iter=100) gridsearch.fit(X_train, y_train) print(gridsearch) ypredictRidge = gridsearch.predict(X_test) @@ -392,13 +396,6 @@ ypredictRidge = gridsearchScikit-Learn -documentation -contains more information on how to set the different parameters. -

    - -

    If we take out the random noise, running the above codes results in \( \lambda=0 \) yielding the best fit.

    @@ -425,7 +422,7 @@ contains more information on how to set the different parameters.

  • 34
  • 35
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs026.html b/doc/pub/week38/html/._week38-bs026.html index f16714904..0233fafa1 100644 --- a/doc/pub/week38/html/._week38-bs026.html +++ b/doc/pub/week38/html/._week38-bs026.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -321,16 +319,11 @@ MathJax.Hub.Config({

     

     

     

    - +

    Wisconsin Cancer Data

    -

    An alternative to the above manual grid set up, is to use a random -search where the parameters are tuned from a random distribution -(uniform below) for a fixed number of iterations. A model is -constructed and evaluated for each combination of chosen parameters. -We repeat the previous example but now with a random search. Note -that values of \( \lambda \) are now limited to be within \( x\in -[0,1] \). This domain may not be the most relevant one for the specific -case under study. +

    We show here how we can use a simple regression case on the breast +cancer data using Logistic regression as our algorithm for +classification.

    @@ -340,49 +333,22 @@ case under study.
    -
    import numpy as np
    -from sklearn.model_selection import train_test_split
    -from sklearn.linear_model import Ridge
    -from sklearn.model_selection import GridSearchCV
    -from scipy.stats import uniform as randuniform
    -from sklearn.model_selection import RandomizedSearchCV
    +  
    import matplotlib.pyplot as plt
    +import numpy as np
    +from sklearn.model_selection import  train_test_split 
    +from sklearn.datasets import load_breast_cancer
    +from sklearn.linear_model import LogisticRegression
     
    +# Load the data
    +cancer = load_breast_cancer()
     
    -def R2(y_data, y_model):
    -    return 1 - np.sum((y_data - y_model) ** 2) / np.sum((y_data - np.mean(y_data)) ** 2)
    -
    -def MSE(y_data,y_model):
    -    n = np.size(y_model)
    -    return np.sum((y_data-y_model)**2)/n
    -
    -# A seed just to ensure that the random numbers are the same for every run.
    -# Useful for eventual debugging.
    -np.random.seed(2021)
    -
    -n = 100
    -x = np.random.rand(n)
    -y = np.exp(-x**2) + 1.5 * np.exp(-(x-2)**2)+ np.random.randn(n)
    -
    -Maxpolydegree = 5
    -X = np.zeros((n,Maxpolydegree-1))
    -
    -for degree in range(1,Maxpolydegree): #No intercept column
    -    X[:,degree-1] = x**(degree)
    -
    -# We split the data in test and training data
    -X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)
    -
    -param_grid = {'alpha': randuniform()}
    -# create and fit a ridge regression model, testing each alpha
    -model = Ridge()
    -gridsearch = RandomizedSearchCV(estimator=model, param_distributions=param_grid, n_iter=100)
    -gridsearch.fit(X_train, y_train)
    -print(gridsearch)
    -ypredictRidge = gridsearch.predict(X_test)
    -# summarize the results of the grid search
    -print(f"Best estimated lambda-value: {gridsearch.best_estimator_.alpha}")
    -print(f"MSE score: {MSE(y_test,ypredictRidge)}")
    -print(f"R2 score: {R2(y_test,ypredictRidge)}")
    +X_train, X_test, y_train, y_test = train_test_split(cancer.data,cancer.target,random_state=0)
    +print(X_train.shape)
    +print(X_test.shape)
    +# 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)))
     
    @@ -424,7 +390,7 @@ ypredictRidge = gridsearch35
  • 36
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs027.html b/doc/pub/week38/html/._week38-bs027.html index fedfdacad..3401cf91f 100644 --- a/doc/pub/week38/html/._week38-bs027.html +++ b/doc/pub/week38/html/._week38-bs027.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -321,14 +319,12 @@ MathJax.Hub.Config({

     

     

     

    -

    Wisconsin Cancer Data

    +

    Using the correlation matrix

    -

    We show here how we can use a simple regression case on the breast -cancer data using Logistic regression as our algorithm for -classification. +

    In addition to the above scores, we could also study the covariance (and the correlation matrix). +We use Pandas to compute the correlation matrix.

    -
    @@ -340,17 +336,35 @@ classification. from sklearn.model_selection import train_test_split from sklearn.datasets import load_breast_cancer from sklearn.linear_model import LogisticRegression - -# Load the data cancer = load_breast_cancer() +import pandas as pd +# Making a data frame +cancerpd = pd.DataFrame(cancer.data, columns=cancer.feature_names) -X_train, X_test, y_train, y_test = train_test_split(cancer.data,cancer.target,random_state=0) -print(X_train.shape) -print(X_test.shape) -# 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))) +fig, axes = plt.subplots(15,2,figsize=(10,20)) +malignant = cancer.data[cancer.target == 0] +benign = cancer.data[cancer.target == 1] +ax = axes.ravel() + +for i in range(30): + _, bins = np.histogram(cancer.data[:,i], bins =50) + ax[i].hist(malignant[:,i], bins = bins, alpha = 0.5) + ax[i].hist(benign[:,i], bins = bins, alpha = 0.5) + ax[i].set_title(cancer.feature_names[i]) + ax[i].set_yticks(()) +ax[0].set_xlabel("Feature magnitude") +ax[0].set_ylabel("Frequency") +ax[0].legend(["Malignant", "Benign"], loc ="best") +fig.tight_layout() +plt.show() + +import seaborn as sns +correlation_matrix = cancerpd.corr().round(1) +# use the heatmap function from seaborn to plot the correlation matrix +# annot = True to print the values inside the square +plt.figure(figsize=(15,8)) +sns.heatmap(data=correlation_matrix, annot=True) +plt.show()
    @@ -392,7 +406,7 @@ logreg.fit(X_train, y_train)
  • 36
  • 37
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs028.html b/doc/pub/week38/html/._week38-bs028.html index 8af64bc6b..28461be2f 100644 --- a/doc/pub/week38/html/._week38-bs028.html +++ b/doc/pub/week38/html/._week38-bs028.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -321,52 +319,31 @@ MathJax.Hub.Config({

     

     

     

    -

    Using the correlation matrix

    +

    Discussing the correlation data

    -

    In addition to the above scores, we could also study the covariance (and the correlation matrix). -We use Pandas to compute the correlation matrix. +

    In the above example we note two things. In the first plot we display +the overlap of benign and malignant tumors as functions of the various +features in the Wisconsing breast cancer data set. We see that for +some of the features we can distinguish clearly the benign and +malignant cases while for other features we cannot. This can point to +us which features may be of greater interest when we wish to classify +a benign or not benign tumour.

    +

    In the second figure we have computed the so-called correlation +matrix, which in our case with thirty features becomes a \( 30\times 30 \) +matrix. +

    + +

    We constructed this matrix using pandas via the statements

    +
    -
    import matplotlib.pyplot as plt
    -import numpy as np
    -from sklearn.model_selection import  train_test_split 
    -from sklearn.datasets import load_breast_cancer
    -from sklearn.linear_model import LogisticRegression
    -cancer = load_breast_cancer()
    -import pandas as pd
    -# Making a data frame
    -cancerpd = pd.DataFrame(cancer.data, columns=cancer.feature_names)
    -
    -fig, axes = plt.subplots(15,2,figsize=(10,20))
    -malignant = cancer.data[cancer.target == 0]
    -benign = cancer.data[cancer.target == 1]
    -ax = axes.ravel()
    -
    -for i in range(30):
    -    _, bins = np.histogram(cancer.data[:,i], bins =50)
    -    ax[i].hist(malignant[:,i], bins = bins, alpha = 0.5)
    -    ax[i].hist(benign[:,i], bins = bins, alpha = 0.5)
    -    ax[i].set_title(cancer.feature_names[i])
    -    ax[i].set_yticks(())
    -ax[0].set_xlabel("Feature magnitude")
    -ax[0].set_ylabel("Frequency")
    -ax[0].legend(["Malignant", "Benign"], loc ="best")
    -fig.tight_layout()
    -plt.show()
    -
    -import seaborn as sns
    -correlation_matrix = cancerpd.corr().round(1)
    -# use the heatmap function from seaborn to plot the correlation matrix
    -# annot = True to print the values inside the square
    -plt.figure(figsize=(15,8))
    -sns.heatmap(data=correlation_matrix, annot=True)
    -plt.show()
    +  
    cancerpd = pd.DataFrame(cancer.data, columns=cancer.feature_names)
     
    @@ -382,6 +359,35 @@ plt.show()
    +

    and then

    + + +
    +
    +
    +
    +
    +
    correlation_matrix = cancerpd.corr().round(1)
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +

    Diagonalizing this matrix we can in turn say something about which +features are of relevance and which are not. This leads us to +the classical Principal Component Analysis (PCA) theorem with +applications. This will be discussed later this semester (week 43). +

    @@ -408,7 +414,7 @@ plt.show()

  • 37
  • 38
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs029.html b/doc/pub/week38/html/._week38-bs029.html index 9fd43940a..eb743f7ce 100644 --- a/doc/pub/week38/html/._week38-bs029.html +++ b/doc/pub/week38/html/._week38-bs029.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -321,23 +319,7 @@ MathJax.Hub.Config({

     

     

     

    -

    Discussing the correlation data

    - -

    In the above example we note two things. In the first plot we display -the overlap of benign and malignant tumors as functions of the various -features in the Wisconsing breast cancer data set. We see that for -some of the features we can distinguish clearly the benign and -malignant cases while for other features we cannot. This can point to -us which features may be of greater interest when we wish to classify -a benign or not benign tumour. -

    - -

    In the second figure we have computed the so-called correlation -matrix, which in our case with thirty features becomes a \( 30\times 30 \) -matrix. -

    - -

    We constructed this matrix using pandas via the statements

    +

    Other measures in classification studies: Cancer Data again

    @@ -345,7 +327,38 @@ matrix.
    -
    cancerpd = pd.DataFrame(cancer.data, columns=cancer.feature_names)
    +  
    import matplotlib.pyplot as plt
    +import numpy as np
    +from sklearn.model_selection import  train_test_split 
    +from sklearn.datasets import load_breast_cancer
    +from sklearn.linear_model import LogisticRegression
    +
    +# Load the data
    +cancer = load_breast_cancer()
    +
    +X_train, X_test, y_train, y_test = train_test_split(cancer.data,cancer.target,random_state=0)
    +print(X_train.shape)
    +print(X_test.shape)
    +# Logistic Regression
    +logreg = LogisticRegression(solver='lbfgs')
    +logreg.fit(X_train, y_train)
    +
    +from sklearn.preprocessing import LabelEncoder
    +from sklearn.model_selection import cross_validate
    +#Cross validation
    +accuracy = cross_validate(logreg,X_test,y_test,cv=10)['test_score']
    +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)
    +plt.show()
    +y_probas = logreg.predict_proba(X_test)
    +skplt.metrics.plot_roc(y_test, y_probas)
    +plt.show()
    +skplt.metrics.plot_cumulative_gain(y_test, y_probas)
    +plt.show()
     
    @@ -361,35 +374,6 @@ matrix.
    -

    and then

    - - -
    -
    -
    -
    -
    -
    correlation_matrix = cancerpd.corr().round(1)
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -

    Diagonalizing this matrix we can in turn say something about which -features are of relevance and which are not. This leads us to -the classical Principal Component Analysis (PCA) theorem with -applications. This will be discussed later this semester (week 43). -

    @@ -416,7 +400,7 @@ applications. This will be discussed later this semester (38

  • 39
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs030.html b/doc/pub/week38/html/._week38-bs030.html index cb969c060..d592c53e4 100644 --- a/doc/pub/week38/html/._week38-bs030.html +++ b/doc/pub/week38/html/._week38-bs030.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -321,61 +319,19 @@ MathJax.Hub.Config({

     

     

     

    -

    Other measures in classification studies: Cancer Data again

    +

    Optimization, the central part of any Machine Learning algortithm

    - -
    -
    -
    -
    -
    -
    import matplotlib.pyplot as plt
    -import numpy as np
    -from sklearn.model_selection import  train_test_split 
    -from sklearn.datasets import load_breast_cancer
    -from sklearn.linear_model import LogisticRegression
    -
    -# Load the data
    -cancer = load_breast_cancer()
    -
    -X_train, X_test, y_train, y_test = train_test_split(cancer.data,cancer.target,random_state=0)
    -print(X_train.shape)
    -print(X_test.shape)
    -# Logistic Regression
    -logreg = LogisticRegression(solver='lbfgs')
    -logreg.fit(X_train, y_train)
    -
    -from sklearn.preprocessing import LabelEncoder
    -from sklearn.model_selection import cross_validate
    -#Cross validation
    -accuracy = cross_validate(logreg,X_test,y_test,cv=10)['test_score']
    -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)
    -plt.show()
    -y_probas = logreg.predict_proba(X_test)
    -skplt.metrics.plot_roc(y_test, y_probas)
    -plt.show()
    -skplt.metrics.plot_cumulative_gain(y_test, y_probas)
    -plt.show()
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    +Overview Video, why do we care about gradient methods? +

    Almost every problem in machine learning and data science starts with +a dataset \( X \), a model \( g(\beta) \), which is a function of the +parameters \( \beta \) and a cost function \( C(X, g(\beta)) \) that allows +us to judge how well the model \( g(\beta) \) explains the observations +\( X \). The model is fit by finding the values of \( \beta \) that minimize +the cost function. Ideally we would be able to solve for \( \beta \) +analytically, however this is not possible in general and we must use +some approximative/numerical method to compute the minimum. +

    @@ -402,7 +358,7 @@ plt.show()

  • 39
  • 40
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs031.html b/doc/pub/week38/html/._week38-bs031.html index 2f0818b5a..75c3ea574 100644 --- a/doc/pub/week38/html/._week38-bs031.html +++ b/doc/pub/week38/html/._week38-bs031.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -321,20 +319,25 @@ MathJax.Hub.Config({

     

     

     

    -

    Optimization, the central part of any Machine Learning algortithm

    +

    Revisiting our Logistic Regression case

    -Overview Video, why do we care about gradient methods? - -

    Almost every problem in machine learning and data science starts with -a dataset \( X \), a model \( g(\beta) \), which is a function of the -parameters \( \beta \) and a cost function \( C(X, g(\beta)) \) that allows -us to judge how well the model \( g(\beta) \) explains the observations -\( X \). The model is fit by finding the values of \( \beta \) that minimize -the cost function. Ideally we would be able to solve for \( \beta \) -analytically, however this is not possible in general and we must use -some approximative/numerical method to compute the minimum. +

    In our discussion on Logistic Regression we studied the +case of +two classes, with \( y_i \) either +\( 0 \) or \( 1 \). Furthermore we assumed also that we have only two +parameters \( \beta \) in our fitting, that is we +defined probabilities

    +$$ +\begin{align*} +p(y_i=1|x_i,\boldsymbol{\beta}) &= \frac{\exp{(\beta_0+\beta_1x_i)}}{1+\exp{(\beta_0+\beta_1x_i)}},\nonumber\\ +p(y_i=0|x_i,\boldsymbol{\beta}) &= 1 - p(y_i=1|x_i,\boldsymbol{\beta}), +\end{align*} +$$ + +

    where \( \boldsymbol{\beta} \) are the weights we wish to extract from data, in our case \( \beta_0 \) and \( \beta_1 \).

    +

      @@ -360,7 +363,7 @@ some approximative/numerical method to compute the minimum.
    • 40
    • 41
    • ...
    • -
    • 65
    • +
    • 64
    • »
    diff --git a/doc/pub/week38/html/._week38-bs032.html b/doc/pub/week38/html/._week38-bs032.html index 108383ca1..0765817e5 100644 --- a/doc/pub/week38/html/._week38-bs032.html +++ b/doc/pub/week38/html/._week38-bs032.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -321,24 +319,28 @@ MathJax.Hub.Config({

     

     

     

    -

    Revisiting our Logistic Regression case

    +

    The equations to solve

    -

    In our discussion on Logistic Regression we studied the -case of -two classes, with \( y_i \) either -\( 0 \) or \( 1 \). Furthermore we assumed also that we have only two -parameters \( \beta \) in our fitting, that is we -defined probabilities +

    Our compact equations used a definition of a vector \( \boldsymbol{y} \) with \( n \) +elements \( y_i \), an \( n\times p \) matrix \( \boldsymbol{X} \) which contains the +\( x_i \) values and a vector \( \boldsymbol{p} \) of fitted probabilities +\( p(y_i\vert x_i,\boldsymbol{\beta}) \). We rewrote in a more compact form +the first derivative of the cost function as

    $$ -\begin{align*} -p(y_i=1|x_i,\boldsymbol{\beta}) &= \frac{\exp{(\beta_0+\beta_1x_i)}}{1+\exp{(\beta_0+\beta_1x_i)}},\nonumber\\ -p(y_i=0|x_i,\boldsymbol{\beta}) &= 1 - p(y_i=1|x_i,\boldsymbol{\beta}), -\end{align*} +\frac{\partial \mathcal{C}(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}} = -\boldsymbol{X}^T\left(\boldsymbol{y}-\boldsymbol{p}\right). $$ -

    where \( \boldsymbol{\beta} \) are the weights we wish to extract from data, in our case \( \beta_0 \) and \( \beta_1 \).

    +

    If we in addition define a diagonal matrix \( \boldsymbol{W} \) with elements +\( p(y_i\vert x_i,\boldsymbol{\beta})(1-p(y_i\vert x_i,\boldsymbol{\beta}) \), we can obtain a compact expression of the second derivative as +

    + +$$ +\frac{\partial^2 \mathcal{C}(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}\partial \boldsymbol{\beta}^T} = \boldsymbol{X}^T\boldsymbol{W}\boldsymbol{X}. +$$ + +

    This defines what is called the Hessian matrix.

    @@ -365,7 +367,7 @@ $$

  • 41
  • 42
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs033.html b/doc/pub/week38/html/._week38-bs033.html index c030102ca..aac7ed65a 100644 --- a/doc/pub/week38/html/._week38-bs033.html +++ b/doc/pub/week38/html/._week38-bs033.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -321,28 +319,25 @@ MathJax.Hub.Config({

     

     

     

    -

    The equations to solve

    +

    Solving using Newton-Raphson's method

    -

    Our compact equations used a definition of a vector \( \boldsymbol{y} \) with \( n \) -elements \( y_i \), an \( n\times p \) matrix \( \boldsymbol{X} \) which contains the -\( x_i \) values and a vector \( \boldsymbol{p} \) of fitted probabilities -\( p(y_i\vert x_i,\boldsymbol{\beta}) \). We rewrote in a more compact form -the first derivative of the cost function as -

    +

    If we can set up these equations, Newton-Raphson's iterative method is normally the method of choice. It requires however that we can compute in an efficient way the matrices that define the first and second derivatives.

    + +

    Our iterative scheme is then given by

    $$ -\frac{\partial \mathcal{C}(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}} = -\boldsymbol{X}^T\left(\boldsymbol{y}-\boldsymbol{p}\right). +\boldsymbol{\beta}^{\mathrm{new}} = \boldsymbol{\beta}^{\mathrm{old}}-\left(\frac{\partial^2 \mathcal{C}(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}\partial \boldsymbol{\beta}^T}\right)^{-1}_{\boldsymbol{\beta}^{\mathrm{old}}}\times \left(\frac{\partial \mathcal{C}(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}}\right)_{\boldsymbol{\beta}^{\mathrm{old}}}, $$ -

    If we in addition define a diagonal matrix \( \boldsymbol{W} \) with elements -\( p(y_i\vert x_i,\boldsymbol{\beta})(1-p(y_i\vert x_i,\boldsymbol{\beta}) \), we can obtain a compact expression of the second derivative as -

    +

    or in matrix form as

    $$ -\frac{\partial^2 \mathcal{C}(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}\partial \boldsymbol{\beta}^T} = \boldsymbol{X}^T\boldsymbol{W}\boldsymbol{X}. +\boldsymbol{\beta}^{\mathrm{new}} = \boldsymbol{\beta}^{\mathrm{old}}-\left(\boldsymbol{X}^T\boldsymbol{W}\boldsymbol{X} \right)^{-1}\times \left(-\boldsymbol{X}^T(\boldsymbol{y}-\boldsymbol{p}) \right)_{\boldsymbol{\beta}^{\mathrm{old}}}. $$ -

    This defines what is called the Hessian matrix.

    +

    The right-hand side is computed with the old values of \( \beta \).

    + +

    If we can compute these matrices, in particular the Hessian, the above is often the easiest method to implement.

    @@ -369,7 +364,7 @@ $$

  • 42
  • 43
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs034.html b/doc/pub/week38/html/._week38-bs034.html index 4e7c65565..cf2562182 100644 --- a/doc/pub/week38/html/._week38-bs034.html +++ b/doc/pub/week38/html/._week38-bs034.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -321,25 +319,18 @@ MathJax.Hub.Config({

     

     

     

    -

    Solving using Newton-Raphson's method

    +

    Brief reminder on Newton-Raphson's method

    -

    If we can set up these equations, Newton-Raphson's iterative method is normally the method of choice. It requires however that we can compute in an efficient way the matrices that define the first and second derivatives.

    +

    Let us quickly remind ourselves how we derive the above method.

    -

    Our iterative scheme is then given by

    - -$$ -\boldsymbol{\beta}^{\mathrm{new}} = \boldsymbol{\beta}^{\mathrm{old}}-\left(\frac{\partial^2 \mathcal{C}(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}\partial \boldsymbol{\beta}^T}\right)^{-1}_{\boldsymbol{\beta}^{\mathrm{old}}}\times \left(\frac{\partial \mathcal{C}(\boldsymbol{\beta})}{\partial \boldsymbol{\beta}}\right)_{\boldsymbol{\beta}^{\mathrm{old}}}, -$$ - -

    or in matrix form as

    - -$$ -\boldsymbol{\beta}^{\mathrm{new}} = \boldsymbol{\beta}^{\mathrm{old}}-\left(\boldsymbol{X}^T\boldsymbol{W}\boldsymbol{X} \right)^{-1}\times \left(-\boldsymbol{X}^T(\boldsymbol{y}-\boldsymbol{p}) \right)_{\boldsymbol{\beta}^{\mathrm{old}}}. -$$ - -

    The right-hand side is computed with the old values of \( \beta \).

    - -

    If we can compute these matrices, in particular the Hessian, the above is often the easiest method to implement.

    +

    Perhaps the most celebrated of all one-dimensional root-finding +routines is Newton's method, also called the Newton-Raphson +method. This method requires the evaluation of both the +function \( f \) and its derivative \( f' \) at arbitrary points. +If you can only calculate the derivative +numerically and/or your function is not of the smooth type, we +normally discourage the use of this method. +

    @@ -366,7 +357,7 @@ $$

  • 43
  • 44
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs035.html b/doc/pub/week38/html/._week38-bs035.html index 5d2f2b04c..dbd6a332c 100644 --- a/doc/pub/week38/html/._week38-bs035.html +++ b/doc/pub/week38/html/._week38-bs035.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -321,19 +319,39 @@ MathJax.Hub.Config({

     

     

     

    -

    Brief reminder on Newton-Raphson's method

    +

    The equations

    -

    Let us quickly remind ourselves how we derive the above method.

    - -

    Perhaps the most celebrated of all one-dimensional root-finding -routines is Newton's method, also called the Newton-Raphson -method. This method requires the evaluation of both the -function \( f \) and its derivative \( f' \) at arbitrary points. -If you can only calculate the derivative -numerically and/or your function is not of the smooth type, we -normally discourage the use of this method. +

    The Newton-Raphson formula consists geometrically of extending the +tangent line at a current point until it crosses zero, then setting +the next guess to the abscissa of that zero-crossing. The mathematics +behind this method is rather simple. Employing a Taylor expansion for +\( x \) sufficiently close to the solution \( s \), we have

    +$$ + f(s)=0=f(x)+(s-x)f'(x)+\frac{(s-x)^2}{2}f''(x) +\dots. + \tag{2} +$$ + +

    For small enough values of the function and for well-behaved +functions, the terms beyond linear are unimportant, hence we obtain +

    + +$$ + f(x)+(s-x)f'(x)\approx 0, +$$ + +

    yielding

    +$$ + s\approx x-\frac{f(x)}{f'(x)}. +$$ + +

    Having in mind an iterative procedure, it is natural to start iterating with

    +$$ + x_{n+1}=x_n-\frac{f(x_n)}{f'(x_n)}. +$$ + +

      @@ -359,7 +377,7 @@ normally discourage the use of this method.
    • 44
    • 45
    • ...
    • -
    • 65
    • +
    • 64
    • »
    diff --git a/doc/pub/week38/html/._week38-bs036.html b/doc/pub/week38/html/._week38-bs036.html index c65b23175..eba069d80 100644 --- a/doc/pub/week38/html/._week38-bs036.html +++ b/doc/pub/week38/html/._week38-bs036.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -321,39 +319,21 @@ MathJax.Hub.Config({

     

     

     

    -

    The equations

    +

    Simple geometric interpretation

    -

    The Newton-Raphson formula consists geometrically of extending the -tangent line at a current point until it crosses zero, then setting -the next guess to the abscissa of that zero-crossing. The mathematics -behind this method is rather simple. Employing a Taylor expansion for -\( x \) sufficiently close to the solution \( s \), we have +

    The above is Newton-Raphson's method. It has a simple geometric +interpretation, namely \( x_{n+1} \) is the point where the tangent from +\( (x_n,f(x_n)) \) crosses the \( x \)-axis. Close to the solution, +Newton-Raphson converges fast to the desired result. However, if we +are far from a root, where the higher-order terms in the series are +important, the Newton-Raphson formula can give grossly inaccurate +results. For instance, the initial guess for the root might be so far +from the true root as to let the search interval include a local +maximum or minimum of the function. If an iteration places a trial +guess near such a local extremum, so that the first derivative nearly +vanishes, then Newton-Raphson may fail totally

    -$$ - f(s)=0=f(x)+(s-x)f'(x)+\frac{(s-x)^2}{2}f''(x) +\dots. - \tag{2} -$$ - -

    For small enough values of the function and for well-behaved -functions, the terms beyond linear are unimportant, hence we obtain -

    - -$$ - f(x)+(s-x)f'(x)\approx 0, -$$ - -

    yielding

    -$$ - s\approx x-\frac{f(x)}{f'(x)}. -$$ - -

    Having in mind an iterative procedure, it is natural to start iterating with

    -$$ - x_{n+1}=x_n-\frac{f(x_n)}{f'(x_n)}. -$$ - -

    diff --git a/doc/pub/week38/html/._week38-bs037.html b/doc/pub/week38/html/._week38-bs037.html index 6599d122b..27f4eac93 100644 --- a/doc/pub/week38/html/._week38-bs037.html +++ b/doc/pub/week38/html/._week38-bs037.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -321,19 +319,57 @@ MathJax.Hub.Config({

     

     

     

    -

    Simple geometric interpretation

    +

    Extending to more than one variable

    -

    The above is Newton-Raphson's method. It has a simple geometric -interpretation, namely \( x_{n+1} \) is the point where the tangent from -\( (x_n,f(x_n)) \) crosses the \( x \)-axis. Close to the solution, -Newton-Raphson converges fast to the desired result. However, if we -are far from a root, where the higher-order terms in the series are -important, the Newton-Raphson formula can give grossly inaccurate -results. For instance, the initial guess for the root might be so far -from the true root as to let the search interval include a local -maximum or minimum of the function. If an iteration places a trial -guess near such a local extremum, so that the first derivative nearly -vanishes, then Newton-Raphson may fail totally +

    Newton's method can be generalized to systems of several non-linear equations +and variables. Consider the case with two equations +

    +$$ + \begin{array}{cc} f_1(x_1,x_2) &=0\\ + f_2(x_1,x_2) &=0,\end{array} +$$ + +

    which we Taylor expand to obtain

    + +$$ + \begin{array}{cc} 0=f_1(x_1+h_1,x_2+h_2)=&f_1(x_1,x_2)+h_1 + \partial f_1/\partial x_1+h_2 + \partial f_1/\partial x_2+\dots\\ + 0=f_2(x_1+h_1,x_2+h_2)=&f_2(x_1,x_2)+h_1 + \partial f_2/\partial x_1+h_2 + \partial f_2/\partial x_2+\dots + \end{array}. +$$ + +

    Defining the Jacobian matrix \( {\bf \boldsymbol{J}} \) we have

    +$$ + {\bf \boldsymbol{J}}=\left( \begin{array}{cc} + \partial f_1/\partial x_1 & \partial f_1/\partial x_2 \\ + \partial f_2/\partial x_1 &\partial f_2/\partial x_2 + \end{array} \right), +$$ + +

    we can rephrase Newton's method as

    +$$ +\left(\begin{array}{c} x_1^{n+1} \\ x_2^{n+1} \end{array} \right)= +\left(\begin{array}{c} x_1^{n} \\ x_2^{n} \end{array} \right)+ +\left(\begin{array}{c} h_1^{n} \\ h_2^{n} \end{array} \right), +$$ + +

    where we have defined

    +$$ + \left(\begin{array}{c} h_1^{n} \\ h_2^{n} \end{array} \right)= + -{\bf \boldsymbol{J}}^{-1} + \left(\begin{array}{c} f_1(x_1^{n},x_2^{n}) \\ f_2(x_1^{n},x_2^{n}) \end{array} \right). +$$ + +

    We need thus to compute the inverse of the Jacobian matrix and it +is to understand that difficulties may +arise in case \( {\bf \boldsymbol{J}} \) is nearly singular. +

    + +

    It is rather straightforward to extend the above scheme to systems of +more than two non-linear equations. In our case, the Jacobian matrix is given by the Hessian that represents the second derivative of cost function.

    @@ -361,7 +397,7 @@ vanishes, then Newton-Raphson may fail totally

  • 46
  • 47
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs038.html b/doc/pub/week38/html/._week38-bs038.html index 8d7769072..ad0bc9017 100644 --- a/doc/pub/week38/html/._week38-bs038.html +++ b/doc/pub/week38/html/._week38-bs038.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -321,57 +319,24 @@ MathJax.Hub.Config({

     

     

     

    -

    Extending to more than one variable

    +

    Steepest descent

    -

    Newton's method can be generalized to systems of several non-linear equations -and variables. Consider the case with two equations -

    -$$ - \begin{array}{cc} f_1(x_1,x_2) &=0\\ - f_2(x_1,x_2) &=0,\end{array} -$$ - -

    which we Taylor expand to obtain

    - -$$ - \begin{array}{cc} 0=f_1(x_1+h_1,x_2+h_2)=&f_1(x_1,x_2)+h_1 - \partial f_1/\partial x_1+h_2 - \partial f_1/\partial x_2+\dots\\ - 0=f_2(x_1+h_1,x_2+h_2)=&f_2(x_1,x_2)+h_1 - \partial f_2/\partial x_1+h_2 - \partial f_2/\partial x_2+\dots - \end{array}. -$$ - -

    Defining the Jacobian matrix \( {\bf \boldsymbol{J}} \) we have

    -$$ - {\bf \boldsymbol{J}}=\left( \begin{array}{cc} - \partial f_1/\partial x_1 & \partial f_1/\partial x_2 \\ - \partial f_2/\partial x_1 &\partial f_2/\partial x_2 - \end{array} \right), -$$ - -

    we can rephrase Newton's method as

    -$$ -\left(\begin{array}{c} x_1^{n+1} \\ x_2^{n+1} \end{array} \right)= -\left(\begin{array}{c} x_1^{n} \\ x_2^{n} \end{array} \right)+ -\left(\begin{array}{c} h_1^{n} \\ h_2^{n} \end{array} \right), -$$ - -

    where we have defined

    -$$ - \left(\begin{array}{c} h_1^{n} \\ h_2^{n} \end{array} \right)= - -{\bf \boldsymbol{J}}^{-1} - \left(\begin{array}{c} f_1(x_1^{n},x_2^{n}) \\ f_2(x_1^{n},x_2^{n}) \end{array} \right). -$$ - -

    We need thus to compute the inverse of the Jacobian matrix and it -is to understand that difficulties may -arise in case \( {\bf \boldsymbol{J}} \) is nearly singular. +

    The basic idea of gradient descent is +that a function \( F(\mathbf{x}) \), +\( \mathbf{x} \equiv (x_1,\cdots,x_n) \), decreases fastest if one goes from \( \bf {x} \) in the +direction of the negative gradient \( -\nabla F(\mathbf{x}) \).

    -

    It is rather straightforward to extend the above scheme to systems of -more than two non-linear equations. In our case, the Jacobian matrix is given by the Hessian that represents the second derivative of cost function. +

    It can be shown that if

    +$$ +\mathbf{x}_{k+1} = \mathbf{x}_k - \gamma_k \nabla F(\mathbf{x}_k), +$$ + +

    with \( \gamma_k > 0 \).

    + +

    For \( \gamma_k \) small enough, then \( F(\mathbf{x}_{k+1}) \leq +F(\mathbf{x}_k) \). This means that for a sufficiently small \( \gamma_k \) +we are always moving towards smaller function values, i.e a minimum.

    @@ -399,7 +364,7 @@ more than two non-linear equations. In our case, the Jacobian matrix is given by

  • 47
  • 48
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs039.html b/doc/pub/week38/html/._week38-bs039.html index 92d9df659..b1544eb84 100644 --- a/doc/pub/week38/html/._week38-bs039.html +++ b/doc/pub/week38/html/._week38-bs039.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -320,25 +318,21 @@ MathJax.Hub.Config({

     

     

     

    - -

    Steepest descent

    + +

    More on Steepest descent

    -

    The basic idea of gradient descent is -that a function \( F(\mathbf{x}) \), -\( \mathbf{x} \equiv (x_1,\cdots,x_n) \), decreases fastest if one goes from \( \bf {x} \) in the -direction of the negative gradient \( -\nabla F(\mathbf{x}) \). +

    The previous observation is the basis of the method of steepest +descent, which is also referred to as just gradient descent (GD). One +starts with an initial guess \( \mathbf{x}_0 \) for a minimum of \( F \) and +computes new approximations according to

    -

    It can be shown that if

    $$ -\mathbf{x}_{k+1} = \mathbf{x}_k - \gamma_k \nabla F(\mathbf{x}_k), +\mathbf{x}_{k+1} = \mathbf{x}_k - \gamma_k \nabla F(\mathbf{x}_k), \ \ k \geq 0. $$ -

    with \( \gamma_k > 0 \).

    - -

    For \( \gamma_k \) small enough, then \( F(\mathbf{x}_{k+1}) \leq -F(\mathbf{x}_k) \). This means that for a sufficiently small \( \gamma_k \) -we are always moving towards smaller function values, i.e a minimum. +

    The parameter \( \gamma_k \) is often referred to as the step length or +the learning rate within the context of Machine Learning.

    @@ -366,7 +360,7 @@ we are always moving towards smaller function values, i.e a minimum.

  • 48
  • 49
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs040.html b/doc/pub/week38/html/._week38-bs040.html index c070bdd2e..7990df9a2 100644 --- a/doc/pub/week38/html/._week38-bs040.html +++ b/doc/pub/week38/html/._week38-bs040.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -321,20 +319,27 @@ MathJax.Hub.Config({

     

     

     

    -

    More on Steepest descent

    +

    The ideal

    -

    The previous observation is the basis of the method of steepest -descent, which is also referred to as just gradient descent (GD). One -starts with an initial guess \( \mathbf{x}_0 \) for a minimum of \( F \) and -computes new approximations according to +

    Ideally the sequence \( \{\mathbf{x}_k \}_{k=0} \) converges to a global +minimum of the function \( F \). In general we do not know if we are in a +global or local minimum. In the special case when \( F \) is a convex +function, all local minima are also global minima, so in this case +gradient descent can converge to the global solution. The advantage of +this scheme is that it is conceptually simple and straightforward to +implement. However the method in this form has some severe +limitations:

    -$$ -\mathbf{x}_{k+1} = \mathbf{x}_k - \gamma_k \nabla F(\mathbf{x}_k), \ \ k \geq 0. -$$ +

    In machine learing we are often faced with non-convex high dimensional +cost functions with many local minima. Since GD is deterministic we +will get stuck in a local minimum, if the method converges, unless we +have a very good intial guess. This also implies that the scheme is +sensitive to the chosen initial condition. +

    -

    The parameter \( \gamma_k \) is often referred to as the step length or -the learning rate within the context of Machine Learning. +

    Note that the gradient is a function of \( \mathbf{x} = +(x_1,\cdots,x_n) \) which makes it expensive to compute numerically.

    @@ -362,7 +367,7 @@ the learning rate within the context of Machine Learning.

  • 49
  • 50
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs041.html b/doc/pub/week38/html/._week38-bs041.html index 5435f9bb7..efcee7c0a 100644 --- a/doc/pub/week38/html/._week38-bs041.html +++ b/doc/pub/week38/html/._week38-bs041.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -321,27 +319,20 @@ MathJax.Hub.Config({

     

     

     

    -

    The ideal

    +

    The sensitiveness of the gradient descent

    -

    Ideally the sequence \( \{\mathbf{x}_k \}_{k=0} \) converges to a global -minimum of the function \( F \). In general we do not know if we are in a -global or local minimum. In the special case when \( F \) is a convex -function, all local minima are also global minima, so in this case -gradient descent can converge to the global solution. The advantage of -this scheme is that it is conceptually simple and straightforward to -implement. However the method in this form has some severe -limitations: +

    The gradient descent method +is sensitive to the choice of learning rate \( \gamma_k \). This is due +to the fact that we are only guaranteed that \( F(\mathbf{x}_{k+1}) \leq +F(\mathbf{x}_k) \) for sufficiently small \( \gamma_k \). The problem is to +determine an optimal learning rate. If the learning rate is chosen too +small the method will take a long time to converge and if it is too +large we can experience erratic behavior.

    -

    In machine learing we are often faced with non-convex high dimensional -cost functions with many local minima. Since GD is deterministic we -will get stuck in a local minimum, if the method converges, unless we -have a very good intial guess. This also implies that the scheme is -sensitive to the chosen initial condition. -

    - -

    Note that the gradient is a function of \( \mathbf{x} = -(x_1,\cdots,x_n) \) which makes it expensive to compute numerically. +

    Many of these shortcomings can be alleviated by introducing +randomness. One such method is that of Stochastic Gradient Descent +(SGD), to be discussed next week.

    @@ -369,7 +360,7 @@ sensitive to the chosen initial condition.

  • 50
  • 51
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/._week38-bs042.html b/doc/pub/week38/html/._week38-bs042.html index fc8bee609..0cadba8ad 100644 --- a/doc/pub/week38/html/._week38-bs042.html +++ b/doc/pub/week38/html/._week38-bs042.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -321,20 +319,20 @@ MathJax.Hub.Config({

     

     

     

    -

    The sensitiveness of the gradient descent

    +

    Convex functions

    -

    The gradient descent method -is sensitive to the choice of learning rate \( \gamma_k \). This is due -to the fact that we are only guaranteed that \( F(\mathbf{x}_{k+1}) \leq -F(\mathbf{x}_k) \) for sufficiently small \( \gamma_k \). The problem is to -determine an optimal learning rate. If the learning rate is chosen too -small the method will take a long time to converge and if it is too -large we can experience erratic behavior. +

    Ideally we want our cost/loss function to be convex(concave).

    + +

    First we give the definition of a convex set: A set \( C \) in +\( \mathbb{R}^n \) is said to be convex if, for all \( x \) and \( y \) in \( C \) and +all \( t \in (0,1) \) , the point \( (1 − t)x + ty \) also belongs to +C. Geometrically this means that every point on the line segment +connecting \( x \) and \( y \) is in \( C \) as discussed below.

    -

    Many of these shortcomings can be alleviated by introducing -randomness. One such method is that of Stochastic Gradient Descent -(SGD), to be discussed next week. +

    The convex subsets of \( \mathbb{R} \) are the intervals of +\( \mathbb{R} \). Examples of convex sets of \( \mathbb{R}^2 \) are the +regular polygons (triangles, rectangles, pentagons, etc...).

    @@ -362,7 +360,7 @@ randomness. One such method is that of Stochastic Gradient Descent

  • 51
  • 52
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/week38-bs.html b/doc/pub/week38/html/week38-bs.html index 3c1fdc334..a52bfcda1 100644 --- a/doc/pub/week38/html/week38-bs.html +++ b/doc/pub/week38/html/week38-bs.html @@ -48,10 +48,10 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -92,7 +92,6 @@ doconce format html week38.do.txt --html_style=bootstrap --pygments_html_style=d 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -249,7 +248,7 @@ MathJax.Hub.Config({
  • Plans for week 38, lecture Monday September 16
  • Suggested reading and videos
  • Plans for the lab sessions
  • -
  • Material for lecture Thursday September 21
  • +
  • Material for lecture Monday September 16
  • Logistic Regression
  • Classification problems
  • Optimization and Deep learning
  • @@ -268,48 +267,47 @@ MathJax.Hub.Config({
  • Extending to more predictors
  • Including more classes
  • More classes
  • -
  • Friday September 23
  • -
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • -
  • Grid Search
  • -
  • Randomized Grid Search
  • -
  • Wisconsin Cancer Data
  • -
  • Using the correlation matrix
  • -
  • Discussing the correlation data
  • -
  • Other measures in classification studies: Cancer Data again
  • -
  • Optimization, the central part of any Machine Learning algortithm
  • -
  • Revisiting our Logistic Regression case
  • -
  • The equations to solve
  • -
  • Solving using Newton-Raphson's method
  • -
  • Brief reminder on Newton-Raphson's method
  • -
  • The equations
  • -
  • Simple geometric interpretation
  • -
  • Extending to more than one variable
  • -
  • Steepest descent
  • -
  • More on Steepest descent
  • -
  • The ideal
  • -
  • The sensitiveness of the gradient descent
  • -
  • Convex functions
  • -
  • Convex function
  • -
  • Conditions on convex functions
  • -
  • More on convex functions
  • -
  • Some simple problems
  • -
  • 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 the coming weekend
  • -
  • Lab session: Material from last week and relevant for the first project
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • Searching for Optimal Regularization Parameters \( \lambda \)
  • +
  • Grid Search
  • +
  • Randomized Grid Search
  • +
  • Wisconsin Cancer Data
  • +
  • Using the correlation matrix
  • +
  • Discussing the correlation data
  • +
  • Other measures in classification studies: Cancer Data again
  • +
  • Optimization, the central part of any Machine Learning algortithm
  • +
  • Revisiting our Logistic Regression case
  • +
  • The equations to solve
  • +
  • Solving using Newton-Raphson's method
  • +
  • Brief reminder on Newton-Raphson's method
  • +
  • The equations
  • +
  • Simple geometric interpretation
  • +
  • Extending to more than one variable
  • +
  • Steepest descent
  • +
  • More on Steepest descent
  • +
  • The ideal
  • +
  • The sensitiveness of the gradient descent
  • +
  • Convex functions
  • +
  • Convex function
  • +
  • Conditions on convex functions
  • +
  • More on convex functions
  • +
  • Some simple problems
  • +
  • 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 the coming weekend
  • +
  • Lab session: Material from last week and relevant for the first project
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • @@ -364,7 +362,7 @@ MathJax.Hub.Config({
  • 9
  • 10
  • ...
  • -
  • 65
  • +
  • 64
  • »
  • diff --git a/doc/pub/week38/html/week38-reveal.html b/doc/pub/week38/html/week38-reveal.html index 4231649bd..fc091a161 100644 --- a/doc/pub/week38/html/week38-reveal.html +++ b/doc/pub/week38/html/week38-reveal.html @@ -260,7 +260,7 @@ MathJax.Hub.Config({
    -

    Material for lecture Thursday September 21

    +

    Material for lecture Monday September 16

    @@ -863,10 +863,6 @@ methods.

    -
    -

    Friday September 23

    -
    -

    Searching for Optimal Regularization Parameters \( \lambda \)

    diff --git a/doc/pub/week38/html/week38-solarized.html b/doc/pub/week38/html/week38-solarized.html index 5d8b1a1a4..f6750d75a 100644 --- a/doc/pub/week38/html/week38-solarized.html +++ b/doc/pub/week38/html/week38-solarized.html @@ -75,10 +75,10 @@ div.toc p,a { 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -119,7 +119,6 @@ div.toc p,a { 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -330,7 +329,7 @@ MathJax.Hub.Config({









    -

    Material for lecture Thursday September 21

    +

    Material for lecture Monday September 16

    Logistic Regression

    @@ -880,9 +879,6 @@ discussed in the material on Friday September 23 -









    Searching for Optimal Regularization Parameters \( \lambda \)

    diff --git a/doc/pub/week38/html/week38.html b/doc/pub/week38/html/week38.html index 5285103b4..4f5f82b21 100644 --- a/doc/pub/week38/html/week38.html +++ b/doc/pub/week38/html/week38.html @@ -152,10 +152,10 @@ div.toc p,a { 2, None, 'plans-for-the-lab-sessions'), - ('Material for lecture Thursday September 21', + ('Material for lecture Monday September 16', 2, None, - 'material-for-lecture-thursday-september-21'), + 'material-for-lecture-monday-september-16'), ('Logistic Regression', 2, None, 'logistic-regression'), ('Classification problems', 2, None, 'classification-problems'), ('Optimization and Deep learning', @@ -196,7 +196,6 @@ div.toc p,a { 'extending-to-more-predictors'), ('Including more classes', 2, None, 'including-more-classes'), ('More classes', 2, None, 'more-classes'), - ('Friday September 23', 2, None, 'friday-september-23'), ('Searching for Optimal Regularization Parameters $\\lambda$', 2, None, @@ -407,7 +406,7 @@ MathJax.Hub.Config({









    -

    Material for lecture Thursday September 21

    +

    Material for lecture Monday September 16

    Logistic Regression

    @@ -957,9 +956,6 @@ discussed in the material on
    Friday September 23 -









    Searching for Optimal Regularization Parameters \( \lambda \)

    diff --git a/doc/pub/week38/ipynb/ipynb-week38-src.tar.gz b/doc/pub/week38/ipynb/ipynb-week38-src.tar.gz index 73c850c0d..c5cf6a1d4 100644 Binary files a/doc/pub/week38/ipynb/ipynb-week38-src.tar.gz and b/doc/pub/week38/ipynb/ipynb-week38-src.tar.gz differ diff --git a/doc/pub/week38/ipynb/week38.ipynb b/doc/pub/week38/ipynb/week38.ipynb index ba96b5d66..343d401bc 100644 --- a/doc/pub/week38/ipynb/week38.ipynb +++ b/doc/pub/week38/ipynb/week38.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "ab8d23ae", + "id": "54608ce4", "metadata": { "editable": true }, @@ -14,7 +14,7 @@ }, { "cell_type": "markdown", - "id": "080e5293", + "id": "702fc25a", "metadata": { "editable": true }, @@ -27,7 +27,7 @@ }, { "cell_type": "markdown", - "id": "4039a635", + "id": "708a3ac3", "metadata": { "editable": true }, @@ -47,7 +47,7 @@ }, { "cell_type": "markdown", - "id": "25f2dc54", + "id": "ca760e72", "metadata": { "editable": true }, @@ -70,7 +70,7 @@ }, { "cell_type": "markdown", - "id": "ce24b7fa", + "id": "a9fd5329", "metadata": { "editable": true }, @@ -90,17 +90,17 @@ }, { "cell_type": "markdown", - "id": "ee39a15f", + "id": "63b2922e", "metadata": { "editable": true }, "source": [ - "## Material for lecture Thursday September 21" + "## Material for lecture Monday September 16" ] }, { "cell_type": "markdown", - "id": "b079388e", + "id": "d5f9f534", "metadata": { "editable": true }, @@ -122,7 +122,7 @@ }, { "cell_type": "markdown", - "id": "9e80089c", + "id": "0143d162", "metadata": { "editable": true }, @@ -148,7 +148,7 @@ }, { "cell_type": "markdown", - "id": "30254f9e", + "id": "ef85093d", "metadata": { "editable": true }, @@ -172,7 +172,7 @@ }, { "cell_type": "markdown", - "id": "70bfd4db", + "id": "99320f0f", "metadata": { "editable": true }, @@ -197,7 +197,7 @@ }, { "cell_type": "markdown", - "id": "a9679b14", + "id": "44bcf7a3", "metadata": { "editable": true }, @@ -209,7 +209,7 @@ }, { "cell_type": "markdown", - "id": "ae7156e0", + "id": "403aa0cd", "metadata": { "editable": true }, @@ -227,7 +227,7 @@ }, { "cell_type": "markdown", - "id": "12f49fa9", + "id": "7703e42f", "metadata": { "editable": true }, @@ -245,7 +245,7 @@ }, { "cell_type": "markdown", - "id": "6b02c6f7", + "id": "025d7cc2", "metadata": { "editable": true }, @@ -256,7 +256,7 @@ }, { "cell_type": "markdown", - "id": "52fdc3bb", + "id": "02656176", "metadata": { "editable": true }, @@ -283,7 +283,7 @@ }, { "cell_type": "markdown", - "id": "0ca51f60", + "id": "190a0e98", "metadata": { "editable": true }, @@ -296,7 +296,7 @@ { "cell_type": "code", "execution_count": 1, - "id": "a5e8c140", + "id": "d3aa4736", "metadata": { "collapsed": false, "editable": true @@ -363,7 +363,7 @@ }, { "cell_type": "markdown", - "id": "166027fb", + "id": "b52054ec", "metadata": { "editable": true }, @@ -376,7 +376,7 @@ { "cell_type": "code", "execution_count": 2, - "id": "cb423fb1", + "id": "8c348f42", "metadata": { "collapsed": false, "editable": true @@ -395,7 +395,7 @@ }, { "cell_type": "markdown", - "id": "ba8a95c2", + "id": "6df16129", "metadata": { "editable": true }, @@ -406,7 +406,7 @@ }, { "cell_type": "markdown", - "id": "d59ffea1", + "id": "9a89924c", "metadata": { "editable": true }, @@ -418,7 +418,7 @@ }, { "cell_type": "markdown", - "id": "0abf6dc2", + "id": "bf2297a8", "metadata": { "editable": true }, @@ -437,7 +437,7 @@ }, { "cell_type": "markdown", - "id": "88e5e3d0", + "id": "a865cd76", "metadata": { "editable": true }, @@ -459,7 +459,7 @@ }, { "cell_type": "markdown", - "id": "70bd6cfc", + "id": "4137be07", "metadata": { "editable": true }, @@ -471,7 +471,7 @@ }, { "cell_type": "markdown", - "id": "872532dd", + "id": "42c4a103", "metadata": { "editable": true }, @@ -481,7 +481,7 @@ }, { "cell_type": "markdown", - "id": "52bd04cb", + "id": "9b193f51", "metadata": { "editable": true }, @@ -494,7 +494,7 @@ { "cell_type": "code", "execution_count": 3, - "id": "37944dba", + "id": "02f9e114", "metadata": { "collapsed": false, "editable": true @@ -559,7 +559,7 @@ }, { "cell_type": "markdown", - "id": "e1e349be", + "id": "cf81cc5c", "metadata": { "editable": true }, @@ -571,7 +571,7 @@ }, { "cell_type": "markdown", - "id": "3813b51d", + "id": "905fc981", "metadata": { "editable": true }, @@ -586,7 +586,7 @@ }, { "cell_type": "markdown", - "id": "6277d3c8", + "id": "2c734796", "metadata": { "editable": true }, @@ -598,7 +598,7 @@ }, { "cell_type": "markdown", - "id": "4e47e2dc", + "id": "c72d9c5f", "metadata": { "editable": true }, @@ -610,7 +610,7 @@ }, { "cell_type": "markdown", - "id": "eafc0787", + "id": "bc0af9ee", "metadata": { "editable": true }, @@ -627,7 +627,7 @@ }, { "cell_type": "markdown", - "id": "21feec2b", + "id": "7362c186", "metadata": { "editable": true }, @@ -641,7 +641,7 @@ }, { "cell_type": "markdown", - "id": "54a1ab90", + "id": "553b6180", "metadata": { "editable": true }, @@ -651,7 +651,7 @@ }, { "cell_type": "markdown", - "id": "343cf5e0", + "id": "4a4286b1", "metadata": { "editable": true }, @@ -663,7 +663,7 @@ }, { "cell_type": "markdown", - "id": "92c13cec", + "id": "5873ef6a", "metadata": { "editable": true }, @@ -675,7 +675,7 @@ }, { "cell_type": "markdown", - "id": "5ce0539f", + "id": "97f8406f", "metadata": { "editable": true }, @@ -687,7 +687,7 @@ }, { "cell_type": "markdown", - "id": "0d5fa113", + "id": "d492a29a", "metadata": { "editable": true }, @@ -698,7 +698,7 @@ }, { "cell_type": "markdown", - "id": "3e145775", + "id": "b384d3ea", "metadata": { "editable": true }, @@ -710,7 +710,7 @@ }, { "cell_type": "markdown", - "id": "0edb76c3", + "id": "257c19a6", "metadata": { "editable": true }, @@ -721,7 +721,7 @@ }, { "cell_type": "markdown", - "id": "91189e0c", + "id": "4fcc7b46", "metadata": { "editable": true }, @@ -737,7 +737,7 @@ }, { "cell_type": "markdown", - "id": "249b0007", + "id": "cccc7482", "metadata": { "editable": true }, @@ -749,7 +749,7 @@ }, { "cell_type": "markdown", - "id": "33ab07ad", + "id": "ff305cbe", "metadata": { "editable": true }, @@ -759,7 +759,7 @@ }, { "cell_type": "markdown", - "id": "a8c99503", + "id": "ab1aa23e", "metadata": { "editable": true }, @@ -771,7 +771,7 @@ }, { "cell_type": "markdown", - "id": "bc290dda", + "id": "6799086b", "metadata": { "editable": true }, @@ -786,7 +786,7 @@ }, { "cell_type": "markdown", - "id": "0aa96cf8", + "id": "cda3c102", "metadata": { "editable": true }, @@ -798,7 +798,7 @@ }, { "cell_type": "markdown", - "id": "1708bccc", + "id": "b5be8ca2", "metadata": { "editable": true }, @@ -809,7 +809,7 @@ }, { "cell_type": "markdown", - "id": "80f3c42e", + "id": "28868ab9", "metadata": { "editable": true }, @@ -821,7 +821,7 @@ }, { "cell_type": "markdown", - "id": "b5b70594", + "id": "e92418db", "metadata": { "editable": true }, @@ -833,7 +833,7 @@ }, { "cell_type": "markdown", - "id": "d505acd6", + "id": "5533c3f5", "metadata": { "editable": true }, @@ -845,7 +845,7 @@ }, { "cell_type": "markdown", - "id": "3f981296", + "id": "9312b78f", "metadata": { "editable": true }, @@ -855,7 +855,7 @@ }, { "cell_type": "markdown", - "id": "ab4c25ed", + "id": "edbb0614", "metadata": { "editable": true }, @@ -867,7 +867,7 @@ }, { "cell_type": "markdown", - "id": "8ad1b13f", + "id": "394f6fae", "metadata": { "editable": true }, @@ -881,7 +881,7 @@ }, { "cell_type": "markdown", - "id": "cac2084f", + "id": "883253c4", "metadata": { "editable": true }, @@ -893,7 +893,7 @@ }, { "cell_type": "markdown", - "id": "9fca320f", + "id": "7c00e2f2", "metadata": { "editable": true }, @@ -903,7 +903,7 @@ }, { "cell_type": "markdown", - "id": "e53b6ce3", + "id": "6a4795d0", "metadata": { "editable": true }, @@ -915,7 +915,7 @@ }, { "cell_type": "markdown", - "id": "a13a4b05", + "id": "deed99f4", "metadata": { "editable": true }, @@ -925,7 +925,7 @@ }, { "cell_type": "markdown", - "id": "1c6b584c", + "id": "3ca93d73", "metadata": { "editable": true }, @@ -937,7 +937,7 @@ }, { "cell_type": "markdown", - "id": "fbdc6da0", + "id": "89672774", "metadata": { "editable": true }, @@ -948,7 +948,7 @@ }, { "cell_type": "markdown", - "id": "beeb573b", + "id": "8a75d099", "metadata": { "editable": true }, @@ -971,7 +971,7 @@ }, { "cell_type": "markdown", - "id": "faac9ea8", + "id": "780a498d", "metadata": { "editable": true }, @@ -983,7 +983,7 @@ }, { "cell_type": "markdown", - "id": "993818ce", + "id": "f19ad43b", "metadata": { "editable": true }, @@ -993,7 +993,7 @@ }, { "cell_type": "markdown", - "id": "090c1b4f", + "id": "25956ba0", "metadata": { "editable": true }, @@ -1005,7 +1005,7 @@ }, { "cell_type": "markdown", - "id": "b576d8b2", + "id": "4cb5ea2b", "metadata": { "editable": true }, @@ -1022,17 +1022,7 @@ }, { "cell_type": "markdown", - "id": "857b1de2", - "metadata": { - "editable": true - }, - "source": [ - "## Friday September 23" - ] - }, - { - "cell_type": "markdown", - "id": "7f8868c1", + "id": "1d6c4caf", "metadata": { "editable": true }, @@ -1051,7 +1041,7 @@ { "cell_type": "code", "execution_count": 4, - "id": "79014e68", + "id": "2cc35ceb", "metadata": { "collapsed": false, "editable": true @@ -1106,7 +1096,7 @@ }, { "cell_type": "markdown", - "id": "f83a773d", + "id": "d5c16758", "metadata": { "editable": true }, @@ -1118,7 +1108,7 @@ }, { "cell_type": "markdown", - "id": "0e19b228", + "id": "67640d94", "metadata": { "editable": true }, @@ -1133,7 +1123,7 @@ { "cell_type": "code", "execution_count": 5, - "id": "c8bbd787", + "id": "6aee13c4", "metadata": { "collapsed": false, "editable": true @@ -1186,7 +1176,7 @@ }, { "cell_type": "markdown", - "id": "10df50fd", + "id": "fbf16323", "metadata": { "editable": true }, @@ -1201,7 +1191,7 @@ }, { "cell_type": "markdown", - "id": "17e3fdaa", + "id": "b32612ca", "metadata": { "editable": true }, @@ -1221,7 +1211,7 @@ { "cell_type": "code", "execution_count": 6, - "id": "157788fa", + "id": "ec7749b1", "metadata": { "collapsed": false, "editable": true @@ -1275,7 +1265,7 @@ }, { "cell_type": "markdown", - "id": "0bbb0277", + "id": "8e0c1ec4", "metadata": { "editable": true }, @@ -1290,7 +1280,7 @@ { "cell_type": "code", "execution_count": 7, - "id": "d8f890af", + "id": "9edb0920", "metadata": { "collapsed": false, "editable": true @@ -1317,7 +1307,7 @@ }, { "cell_type": "markdown", - "id": "42360065", + "id": "72beef44", "metadata": { "editable": true }, @@ -1331,7 +1321,7 @@ { "cell_type": "code", "execution_count": 8, - "id": "8d293124", + "id": "bf09a6eb", "metadata": { "collapsed": false, "editable": true @@ -1376,7 +1366,7 @@ }, { "cell_type": "markdown", - "id": "f2d2437f", + "id": "2d081372", "metadata": { "editable": true }, @@ -1401,7 +1391,7 @@ { "cell_type": "code", "execution_count": 9, - "id": "cafe365e", + "id": "cd0fad75", "metadata": { "collapsed": false, "editable": true @@ -1413,7 +1403,7 @@ }, { "cell_type": "markdown", - "id": "1de18895", + "id": "0cf534b2", "metadata": { "editable": true }, @@ -1424,7 +1414,7 @@ { "cell_type": "code", "execution_count": 10, - "id": "b5ec5072", + "id": "6429451b", "metadata": { "collapsed": false, "editable": true @@ -1436,7 +1426,7 @@ }, { "cell_type": "markdown", - "id": "2665db97", + "id": "ed0138cc", "metadata": { "editable": true }, @@ -1449,7 +1439,7 @@ }, { "cell_type": "markdown", - "id": "58141c35", + "id": "9b32814b", "metadata": { "editable": true }, @@ -1460,7 +1450,7 @@ { "cell_type": "code", "execution_count": 11, - "id": "ec4eaf05", + "id": "bfe200b0", "metadata": { "collapsed": false, "editable": true @@ -1503,7 +1493,7 @@ }, { "cell_type": "markdown", - "id": "2e7def81", + "id": "13691108", "metadata": { "editable": true }, @@ -1524,7 +1514,7 @@ }, { "cell_type": "markdown", - "id": "a5c88c20", + "id": "9622bff1", "metadata": { "editable": true }, @@ -1541,7 +1531,7 @@ }, { "cell_type": "markdown", - "id": "54942447", + "id": "bffe481f", "metadata": { "editable": true }, @@ -1556,7 +1546,7 @@ }, { "cell_type": "markdown", - "id": "de645222", + "id": "f967b579", "metadata": { "editable": true }, @@ -1566,7 +1556,7 @@ }, { "cell_type": "markdown", - "id": "a1f07ead", + "id": "929b2860", "metadata": { "editable": true }, @@ -1582,7 +1572,7 @@ }, { "cell_type": "markdown", - "id": "42683d63", + "id": "4d50befc", "metadata": { "editable": true }, @@ -1594,7 +1584,7 @@ }, { "cell_type": "markdown", - "id": "c293bc1a", + "id": "0c55b82a", "metadata": { "editable": true }, @@ -1605,7 +1595,7 @@ }, { "cell_type": "markdown", - "id": "01b1f1f4", + "id": "69de59e3", "metadata": { "editable": true }, @@ -1617,7 +1607,7 @@ }, { "cell_type": "markdown", - "id": "d4998d11", + "id": "5615f25a", "metadata": { "editable": true }, @@ -1627,7 +1617,7 @@ }, { "cell_type": "markdown", - "id": "26e366c1", + "id": "48df73cf", "metadata": { "editable": true }, @@ -1641,7 +1631,7 @@ }, { "cell_type": "markdown", - "id": "fa4faa70", + "id": "cb6d2d95", "metadata": { "editable": true }, @@ -1653,7 +1643,7 @@ }, { "cell_type": "markdown", - "id": "d83709bc", + "id": "7f1e6122", "metadata": { "editable": true }, @@ -1663,7 +1653,7 @@ }, { "cell_type": "markdown", - "id": "4c59fc43", + "id": "830f7b44", "metadata": { "editable": true }, @@ -1675,7 +1665,7 @@ }, { "cell_type": "markdown", - "id": "7eeec130", + "id": "1860e409", "metadata": { "editable": true }, @@ -1687,7 +1677,7 @@ }, { "cell_type": "markdown", - "id": "cd10dbbb", + "id": "49bb5265", "metadata": { "editable": true }, @@ -1707,7 +1697,7 @@ }, { "cell_type": "markdown", - "id": "4c57eac4", + "id": "9142c2ca", "metadata": { "editable": true }, @@ -1723,7 +1713,7 @@ }, { "cell_type": "markdown", - "id": "3db0ac48", + "id": "d98a052f", "metadata": { "editable": true }, @@ -1739,7 +1729,7 @@ }, { "cell_type": "markdown", - "id": "f677bd7f", + "id": "3d013035", "metadata": { "editable": true }, @@ -1750,7 +1740,7 @@ }, { "cell_type": "markdown", - "id": "57dacd74", + "id": "67e37396", "metadata": { "editable": true }, @@ -1762,7 +1752,7 @@ }, { "cell_type": "markdown", - "id": "e70e59f9", + "id": "aaad3cb4", "metadata": { "editable": true }, @@ -1772,7 +1762,7 @@ }, { "cell_type": "markdown", - "id": "0b7531dd", + "id": "1c4c599d", "metadata": { "editable": true }, @@ -1784,7 +1774,7 @@ }, { "cell_type": "markdown", - "id": "463e5692", + "id": "947ebe9a", "metadata": { "editable": true }, @@ -1794,7 +1784,7 @@ }, { "cell_type": "markdown", - "id": "db707031", + "id": "f7a44bbf", "metadata": { "editable": true }, @@ -1806,7 +1796,7 @@ }, { "cell_type": "markdown", - "id": "50c0f9df", + "id": "6db59422", "metadata": { "editable": true }, @@ -1828,7 +1818,7 @@ }, { "cell_type": "markdown", - "id": "7e4d259f", + "id": "d8287387", "metadata": { "editable": true }, @@ -1841,7 +1831,7 @@ }, { "cell_type": "markdown", - "id": "2ceb6a95", + "id": "80c8b46c", "metadata": { "editable": true }, @@ -1854,7 +1844,7 @@ }, { "cell_type": "markdown", - "id": "e24c4d10", + "id": "49a9d35c", "metadata": { "editable": true }, @@ -1864,7 +1854,7 @@ }, { "cell_type": "markdown", - "id": "944cff0d", + "id": "78a67613", "metadata": { "editable": true }, @@ -1882,7 +1872,7 @@ }, { "cell_type": "markdown", - "id": "c952fadb", + "id": "5eb2659a", "metadata": { "editable": true }, @@ -1892,7 +1882,7 @@ }, { "cell_type": "markdown", - "id": "d838fcc9", + "id": "8a8fe9da", "metadata": { "editable": true }, @@ -1907,7 +1897,7 @@ }, { "cell_type": "markdown", - "id": "a143e4b3", + "id": "71b1c4c8", "metadata": { "editable": true }, @@ -1917,7 +1907,7 @@ }, { "cell_type": "markdown", - "id": "9333cef9", + "id": "881e1a96", "metadata": { "editable": true }, @@ -1931,7 +1921,7 @@ }, { "cell_type": "markdown", - "id": "4ca14fa2", + "id": "6551a36e", "metadata": { "editable": true }, @@ -1941,7 +1931,7 @@ }, { "cell_type": "markdown", - "id": "7bb91605", + "id": "c0e75b50", "metadata": { "editable": true }, @@ -1955,7 +1945,7 @@ }, { "cell_type": "markdown", - "id": "873f9cec", + "id": "ac897f51", "metadata": { "editable": true }, @@ -1970,7 +1960,7 @@ }, { "cell_type": "markdown", - "id": "f37aef79", + "id": "8c19a119", "metadata": { "editable": true }, @@ -1987,7 +1977,7 @@ }, { "cell_type": "markdown", - "id": "7a2030da", + "id": "782860fa", "metadata": { "editable": true }, @@ -1999,7 +1989,7 @@ }, { "cell_type": "markdown", - "id": "a5ec1a50", + "id": "5ec3bde0", "metadata": { "editable": true }, @@ -2013,7 +2003,7 @@ }, { "cell_type": "markdown", - "id": "b73bc9fe", + "id": "ddb67ab3", "metadata": { "editable": true }, @@ -2028,7 +2018,7 @@ }, { "cell_type": "markdown", - "id": "088645ed", + "id": "5a8be57f", "metadata": { "editable": true }, @@ -2040,7 +2030,7 @@ }, { "cell_type": "markdown", - "id": "cd485a16", + "id": "4a60b86d", "metadata": { "editable": true }, @@ -2051,7 +2041,7 @@ }, { "cell_type": "markdown", - "id": "735deb2a", + "id": "9ff0c7db", "metadata": { "editable": true }, @@ -2079,7 +2069,7 @@ }, { "cell_type": "markdown", - "id": "5ebc4038", + "id": "0c9c1201", "metadata": { "editable": true }, @@ -2101,7 +2091,7 @@ }, { "cell_type": "markdown", - "id": "0ffd59b7", + "id": "d8f01f9e", "metadata": { "editable": true }, @@ -2123,7 +2113,7 @@ }, { "cell_type": "markdown", - "id": "77cf3548", + "id": "fc87a9cf", "metadata": { "editable": true }, @@ -2135,7 +2125,7 @@ }, { "cell_type": "markdown", - "id": "1ab40924", + "id": "a0b661cc", "metadata": { "editable": true }, @@ -2172,7 +2162,7 @@ }, { "cell_type": "markdown", - "id": "9bb05d6c", + "id": "180f4fbd", "metadata": { "editable": true }, @@ -2200,7 +2190,7 @@ }, { "cell_type": "markdown", - "id": "2f7c61fd", + "id": "e1ddb722", "metadata": { "editable": true }, @@ -2230,7 +2220,7 @@ }, { "cell_type": "markdown", - "id": "6086b2fe", + "id": "f30489e3", "metadata": { "editable": true }, @@ -2254,7 +2244,7 @@ { "cell_type": "code", "execution_count": 12, - "id": "9f1d5c25", + "id": "d8c2af3d", "metadata": { "collapsed": false, "editable": true @@ -2267,7 +2257,7 @@ }, { "cell_type": "markdown", - "id": "2f4befe3", + "id": "a9356dfb", "metadata": { "editable": true }, @@ -2278,7 +2268,7 @@ }, { "cell_type": "markdown", - "id": "efea83f9", + "id": "1c332ff0", "metadata": { "editable": true }, @@ -2290,7 +2280,7 @@ }, { "cell_type": "markdown", - "id": "39808e65", + "id": "6e4cff1f", "metadata": { "editable": true }, @@ -2300,7 +2290,7 @@ }, { "cell_type": "markdown", - "id": "acba99f7", + "id": "239b1e2c", "metadata": { "editable": true }, @@ -2312,7 +2302,7 @@ }, { "cell_type": "markdown", - "id": "a3efc01f", + "id": "6c8f0818", "metadata": { "editable": true }, @@ -2326,7 +2316,7 @@ }, { "cell_type": "markdown", - "id": "fe149ca8", + "id": "3b591ee3", "metadata": { "editable": true }, @@ -2342,7 +2332,7 @@ }, { "cell_type": "markdown", - "id": "1a62c1e4", + "id": "4c93f254", "metadata": { "editable": true }, @@ -2352,7 +2342,7 @@ }, { "cell_type": "markdown", - "id": "109f30b1", + "id": "16996523", "metadata": { "editable": true }, @@ -2364,7 +2354,7 @@ }, { "cell_type": "markdown", - "id": "b3265d97", + "id": "3262b60e", "metadata": { "editable": true }, @@ -2374,7 +2364,7 @@ }, { "cell_type": "markdown", - "id": "f9c74aa7", + "id": "dfcf41ff", "metadata": { "editable": true }, @@ -2386,7 +2376,7 @@ }, { "cell_type": "markdown", - "id": "22a568b3", + "id": "4fbc9b44", "metadata": { "editable": true }, @@ -2400,7 +2390,7 @@ }, { "cell_type": "markdown", - "id": "64c20e09", + "id": "1972249c", "metadata": { "editable": true }, @@ -2410,7 +2400,7 @@ }, { "cell_type": "markdown", - "id": "6bbac8da", + "id": "7e4e1d18", "metadata": { "editable": true }, @@ -2421,7 +2411,7 @@ }, { "cell_type": "markdown", - "id": "62959d3b", + "id": "64c801f1", "metadata": { "editable": true }, @@ -2436,7 +2426,7 @@ }, { "cell_type": "markdown", - "id": "a06a5b7e", + "id": "16f76226", "metadata": { "editable": true }, @@ -2446,7 +2436,7 @@ }, { "cell_type": "markdown", - "id": "d72f9402", + "id": "51aca262", "metadata": { "editable": true }, @@ -2458,7 +2448,7 @@ }, { "cell_type": "markdown", - "id": "fb94a4a9", + "id": "3e7e9594", "metadata": { "editable": true }, @@ -2470,7 +2460,7 @@ }, { "cell_type": "markdown", - "id": "dbbed685", + "id": "31584669", "metadata": { "editable": true }, @@ -2485,7 +2475,7 @@ }, { "cell_type": "markdown", - "id": "d2ecccf4", + "id": "850d7725", "metadata": { "editable": true }, @@ -2498,7 +2488,7 @@ { "cell_type": "code", "execution_count": 13, - "id": "b40baa2e", + "id": "20e6fb89", "metadata": { "collapsed": false, "editable": true @@ -2555,7 +2545,7 @@ }, { "cell_type": "markdown", - "id": "35c94947", + "id": "36c762c7", "metadata": { "editable": true }, @@ -2566,7 +2556,7 @@ { "cell_type": "code", "execution_count": 14, - "id": "5e6057cb", + "id": "1ba65efc", "metadata": { "collapsed": false, "editable": true @@ -2593,7 +2583,7 @@ }, { "cell_type": "markdown", - "id": "3eb169b8", + "id": "845acf36", "metadata": { "editable": true }, @@ -2605,7 +2595,7 @@ }, { "cell_type": "markdown", - "id": "a37fc8af", + "id": "ae354b8b", "metadata": { "editable": true }, @@ -2617,7 +2607,7 @@ }, { "cell_type": "markdown", - "id": "44eba894", + "id": "a6349642", "metadata": { "editable": true }, @@ -2627,7 +2617,7 @@ }, { "cell_type": "markdown", - "id": "0caf10a2", + "id": "d4a4a710", "metadata": { "editable": true }, @@ -2641,7 +2631,7 @@ }, { "cell_type": "markdown", - "id": "1ee0ca77", + "id": "3a8c4b43", "metadata": { "editable": true }, @@ -2651,7 +2641,7 @@ }, { "cell_type": "markdown", - "id": "ec5ce9e6", + "id": "a4efb50c", "metadata": { "editable": true }, @@ -2663,7 +2653,7 @@ }, { "cell_type": "markdown", - "id": "7b6826ef", + "id": "d180548c", "metadata": { "editable": true }, @@ -2674,7 +2664,7 @@ }, { "cell_type": "markdown", - "id": "9010e7b8", + "id": "87acd12f", "metadata": { "editable": true }, @@ -2689,7 +2679,7 @@ }, { "cell_type": "markdown", - "id": "d667b28e", + "id": "869f478b", "metadata": { "editable": true }, @@ -2703,7 +2693,7 @@ }, { "cell_type": "markdown", - "id": "60399cca", + "id": "9035cf3a", "metadata": { "editable": true }, @@ -2714,7 +2704,7 @@ { "cell_type": "code", "execution_count": 15, - "id": "80369e14", + "id": "10e7bb54", "metadata": { "collapsed": false, "editable": true @@ -2775,7 +2765,7 @@ }, { "cell_type": "markdown", - "id": "aee627f0", + "id": "4a349d39", "metadata": { "editable": true }, @@ -2797,7 +2787,7 @@ }, { "cell_type": "markdown", - "id": "abb67183", + "id": "33424a86", "metadata": { "editable": true }, @@ -2809,7 +2799,7 @@ }, { "cell_type": "markdown", - "id": "6adadded", + "id": "facda6dc", "metadata": { "editable": true }, @@ -2819,7 +2809,7 @@ }, { "cell_type": "markdown", - "id": "1aeddf5f", + "id": "71006b8a", "metadata": { "editable": true }, @@ -2844,7 +2834,7 @@ }, { "cell_type": "markdown", - "id": "25afc3fa", + "id": "8a7b6bd2", "metadata": { "editable": true }, @@ -2860,7 +2850,7 @@ }, { "cell_type": "markdown", - "id": "bcbe01f2", + "id": "01381fbd", "metadata": { "editable": true }, @@ -2876,7 +2866,7 @@ }, { "cell_type": "markdown", - "id": "90c19306", + "id": "db6812a1", "metadata": { "editable": true }, @@ -2890,7 +2880,7 @@ }, { "cell_type": "markdown", - "id": "5ef5b23c", + "id": "e98af5ba", "metadata": { "editable": true }, @@ -2918,7 +2908,7 @@ }, { "cell_type": "markdown", - "id": "b8be821b", + "id": "e3fb483e", "metadata": { "editable": true }, @@ -2931,7 +2921,7 @@ { "cell_type": "code", "execution_count": 16, - "id": "6edbc166", + "id": "b78643de", "metadata": { "collapsed": false, "editable": true diff --git a/doc/src/week38/week38.do.txt b/doc/src/week38/week38.do.txt index 44519cb62..0b176358c 100644 --- a/doc/src/week38/week38.do.txt +++ b/doc/src/week38/week38.do.txt @@ -42,7 +42,7 @@ DATE: September 16-20, 2024 !split -===== Material for lecture Thursday September 21 ===== +===== Material for lecture Monday September 16 ===== !split @@ -539,9 +539,6 @@ discussed in the material on "optimization methods":"https://compphysics.github.io/MachineLearning/doc/pub/Splines/html/Splines-bs.html". -!split -===== Friday September 23 ===== - !split ===== Searching for Optimal Regularization Parameters $\lambda$ =====