From af4a4d8a469089c3b8a1a7b90c95682eb6d0c3b8 Mon Sep 17 00:00:00 2001 From: mhjensen Date: Thu, 5 Sep 2019 04:31:27 +0200 Subject: [PATCH] updating regression slides --- .../Regression/html/._Regression-bs000.html | 254 ++++---- .../Regression/html/._Regression-bs001.html | 252 +++---- .../Regression/html/._Regression-bs002.html | 252 +++---- .../Regression/html/._Regression-bs003.html | 252 +++---- .../Regression/html/._Regression-bs004.html | 252 +++---- .../Regression/html/._Regression-bs005.html | 252 +++---- .../Regression/html/._Regression-bs006.html | 252 +++---- .../Regression/html/._Regression-bs007.html | 252 +++---- .../Regression/html/._Regression-bs008.html | 252 +++---- .../Regression/html/._Regression-bs009.html | 252 +++---- .../Regression/html/._Regression-bs010.html | 252 +++---- .../Regression/html/._Regression-bs011.html | 252 +++---- .../Regression/html/._Regression-bs012.html | 252 +++---- .../Regression/html/._Regression-bs013.html | 252 +++---- .../Regression/html/._Regression-bs014.html | 252 +++---- .../Regression/html/._Regression-bs015.html | 252 +++---- .../Regression/html/._Regression-bs016.html | 252 +++---- .../Regression/html/._Regression-bs017.html | 252 +++---- .../Regression/html/._Regression-bs018.html | 252 +++---- .../Regression/html/._Regression-bs019.html | 252 +++---- .../Regression/html/._Regression-bs020.html | 252 +++---- .../Regression/html/._Regression-bs021.html | 252 +++---- .../Regression/html/._Regression-bs022.html | 252 +++---- .../Regression/html/._Regression-bs023.html | 252 +++---- .../Regression/html/._Regression-bs024.html | 252 +++---- .../Regression/html/._Regression-bs025.html | 252 +++---- .../Regression/html/._Regression-bs026.html | 252 +++---- .../Regression/html/._Regression-bs027.html | 252 +++---- .../Regression/html/._Regression-bs028.html | 252 +++---- .../Regression/html/._Regression-bs029.html | 252 +++---- .../Regression/html/._Regression-bs030.html | 252 +++---- .../Regression/html/._Regression-bs031.html | 252 +++---- .../Regression/html/._Regression-bs032.html | 252 +++---- .../Regression/html/._Regression-bs033.html | 252 +++---- .../Regression/html/._Regression-bs034.html | 252 +++---- .../Regression/html/._Regression-bs035.html | 252 +++---- .../Regression/html/._Regression-bs036.html | 252 +++---- .../Regression/html/._Regression-bs037.html | 252 +++---- .../Regression/html/._Regression-bs038.html | 252 +++---- .../Regression/html/._Regression-bs039.html | 252 +++---- .../Regression/html/._Regression-bs040.html | 252 +++---- .../Regression/html/._Regression-bs041.html | 252 +++---- .../Regression/html/._Regression-bs042.html | 292 +++++---- .../Regression/html/._Regression-bs043.html | 280 ++++---- .../Regression/html/._Regression-bs044.html | 283 ++++---- .../Regression/html/._Regression-bs045.html | 277 ++++---- .../Regression/html/._Regression-bs046.html | 266 ++++---- .../Regression/html/._Regression-bs047.html | 283 ++++---- .../Regression/html/._Regression-bs048.html | 278 ++++---- .../Regression/html/._Regression-bs049.html | 285 ++++---- .../Regression/html/._Regression-bs050.html | 293 +++++---- .../Regression/html/._Regression-bs051.html | 289 ++++---- .../Regression/html/._Regression-bs052.html | 320 +++++---- .../Regression/html/._Regression-bs053.html | 322 ++++----- .../Regression/html/._Regression-bs054.html | 302 +++++---- .../Regression/html/._Regression-bs055.html | 282 ++++---- .../Regression/html/._Regression-bs056.html | 288 ++++---- .../Regression/html/._Regression-bs057.html | 284 ++++---- .../Regression/html/._Regression-bs058.html | 281 ++++---- .../Regression/html/._Regression-bs059.html | 283 ++++---- .../Regression/html/._Regression-bs060.html | 282 ++++---- .../Regression/html/._Regression-bs061.html | 271 ++++---- .../Regression/html/._Regression-bs062.html | 276 ++++---- .../Regression/html/._Regression-bs063.html | 280 ++++---- .../Regression/html/._Regression-bs064.html | 284 ++++---- .../Regression/html/._Regression-bs065.html | 286 ++++---- .../Regression/html/._Regression-bs066.html | 292 +++++---- .../Regression/html/._Regression-bs067.html | 282 ++++---- .../Regression/html/._Regression-bs068.html | 279 ++++---- .../Regression/html/._Regression-bs069.html | 283 ++++---- .../Regression/html/._Regression-bs070.html | 290 +++++---- .../Regression/html/._Regression-bs071.html | 286 ++++---- .../Regression/html/._Regression-bs072.html | 302 +++++---- .../Regression/html/._Regression-bs073.html | 292 +++++---- .../Regression/html/._Regression-bs074.html | 285 ++++---- .../Regression/html/._Regression-bs075.html | 348 +++++----- .../Regression/html/._Regression-bs076.html | 357 +++++----- .../Regression/html/._Regression-bs077.html | 288 ++++---- .../Regression/html/._Regression-bs078.html | 277 ++++---- .../Regression/html/._Regression-bs079.html | 301 ++++----- .../Regression/html/._Regression-bs080.html | 301 +++++---- .../Regression/html/._Regression-bs081.html | 278 ++++---- .../Regression/html/._Regression-bs082.html | 295 ++++----- .../Regression/html/._Regression-bs083.html | 298 +++++---- .../Regression/html/._Regression-bs084.html | 280 ++++---- .../Regression/html/._Regression-bs085.html | 278 ++++---- .../Regression/html/._Regression-bs086.html | 281 ++++---- .../Regression/html/._Regression-bs087.html | 284 ++++---- .../Regression/html/._Regression-bs088.html | 325 ++++----- .../Regression/html/._Regression-bs089.html | 380 +++++------ .../Regression/html/._Regression-bs090.html | 384 ++++++----- .../Regression/html/._Regression-bs091.html | 352 +++++----- .../Regression/html/._Regression-bs092.html | 316 ++++----- .../Regression/html/._Regression-bs093.html | 328 +++++----- .../Regression/html/._Regression-bs094.html | 353 +++++----- .../Regression/html/._Regression-bs095.html | 363 ++++++----- .../Regression/html/._Regression-bs096.html | 318 ++++----- .../Regression/html/._Regression-bs097.html | 307 ++++----- .../Regression/html/._Regression-bs098.html | 344 +++++----- .../Regression/html/._Regression-bs099.html | 404 +++++------- .../Regression/html/._Regression-bs100.html | 380 +++++++---- .../Regression/html/._Regression-bs101.html | 280 ++++---- .../Regression/html/._Regression-bs102.html | 315 +++++---- .../Regression/html/._Regression-bs103.html | 325 ++++----- .../Regression/html/._Regression-bs104.html | 616 ++++++++---------- doc/pub/Regression/html/Regression-bs.html | 254 ++++---- .../Regression/html/Regression-reveal.html | 165 +++-- .../Regression/html/Regression-solarized.html | 290 +++++---- doc/pub/Regression/html/Regression.html | 290 +++++---- doc/pub/Regression/ipynb/Regression.ipynb | 98 ++- .../ipynb/ipynb-Regression-src.tar.gz | Bin 212 -> 211 bytes doc/pub/Regression/pdf/Regression-minted.pdf | Bin 451753 -> 452301 bytes .../Projects/2019/Exercises/addition.do.tx | 47 +- doc/src/Regression/Regression.do.txt | 36 + 114 files changed, 15782 insertions(+), 15398 deletions(-) diff --git a/doc/pub/Regression/html/._Regression-bs000.html b/doc/pub/Regression/html/._Regression-bs000.html index 24bc1d993..cd3e72be9 100644 --- a/doc/pub/Regression/html/._Regression-bs000.html +++ b/doc/pub/Regression/html/._Regression-bs000.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -402,7 +404,7 @@ MathJax.Hub.Config({
    [2] Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

    -

    Sep 2, 2019

    +

    Sep 5, 2019


    @@ -426,7 +428,7 @@ MathJax.Hub.Config({

  • 9
  • 10
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs001.html b/doc/pub/Regression/html/._Regression-bs001.html index 9708d32ef..d699d7464 100644 --- a/doc/pub/Regression/html/._Regression-bs001.html +++ b/doc/pub/Regression/html/._Regression-bs001.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -420,7 +422,7 @@ Similarly, Mehta et al
  • 10
  • 11
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs002.html b/doc/pub/Regression/html/._Regression-bs002.html index 8f02d82f0..fa56f02fc 100644 --- a/doc/pub/Regression/html/._Regression-bs002.html +++ b/doc/pub/Regression/html/._Regression-bs002.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -424,7 +426,7 @@ A regression model aims at finding a likelihood function \( p(\boldsymbol{y}\ver
  • 11
  • 12
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs003.html b/doc/pub/Regression/html/._Regression-bs003.html index 9cac48f39..4eb5ff6bf 100644 --- a/doc/pub/Regression/html/._Regression-bs003.html +++ b/doc/pub/Regression/html/._Regression-bs003.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -433,7 +435,7 @@ Linear regression gives us a set of analytical equations for the parameters \( \
  • 12
  • 13
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs004.html b/doc/pub/Regression/html/._Regression-bs004.html index c6d617952..49af75f69 100644 --- a/doc/pub/Regression/html/._Regression-bs004.html +++ b/doc/pub/Regression/html/._Regression-bs004.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -430,7 +432,7 @@ so-called 13
  • 14
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs005.html b/doc/pub/Regression/html/._Regression-bs005.html index 7f18e57d8..73052d2fe 100644 --- a/doc/pub/Regression/html/._Regression-bs005.html +++ b/doc/pub/Regression/html/._Regression-bs005.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -423,7 +425,7 @@ where \( \epsilon_i \) is the error in our approximation.
  • 14
  • 15
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs006.html b/doc/pub/Regression/html/._Regression-bs006.html index 69a2cfe84..6063e12cc 100644 --- a/doc/pub/Regression/html/._Regression-bs006.html +++ b/doc/pub/Regression/html/._Regression-bs006.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -423,7 +425,7 @@ $$
  • 15
  • 16
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs007.html b/doc/pub/Regression/html/._Regression-bs007.html index 19f0763a0..898ceb0c6 100644 --- a/doc/pub/Regression/html/._Regression-bs007.html +++ b/doc/pub/Regression/html/._Regression-bs007.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -447,7 +449,7 @@ The above design matrix is called a 16
  • 17
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs008.html b/doc/pub/Regression/html/._Regression-bs008.html index 5ab9ebacf..bcce25743 100644 --- a/doc/pub/Regression/html/._Regression-bs008.html +++ b/doc/pub/Regression/html/._Regression-bs008.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -437,7 +439,7 @@ $$
  • 17
  • 18
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs009.html b/doc/pub/Regression/html/._Regression-bs009.html index d12c98bd8..588e45502 100644 --- a/doc/pub/Regression/html/._Regression-bs009.html +++ b/doc/pub/Regression/html/._Regression-bs009.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -434,7 +436,7 @@ The left-hand side of this equation is kwown. Our error vector \( \boldsymbol{\e
  • 18
  • 19
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs010.html b/doc/pub/Regression/html/._Regression-bs010.html index 3f8a9bb59..081b87dbd 100644 --- a/doc/pub/Regression/html/._Regression-bs010.html +++ b/doc/pub/Regression/html/._Regression-bs010.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -436,7 +438,7 @@ our matrix as \( \boldsymbol{X}\in {\mathbb{R}}^{n\times p} \), with the predict
  • 19
  • 20
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs011.html b/doc/pub/Regression/html/._Regression-bs011.html index 9dcc70156..78289ad7d 100644 --- a/doc/pub/Regression/html/._Regression-bs011.html +++ b/doc/pub/Regression/html/._Regression-bs011.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -497,7 +499,7 @@ throughout these lectures.
  • 20
  • 21
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs012.html b/doc/pub/Regression/html/._Regression-bs012.html index 5dde47771..17d48906c 100644 --- a/doc/pub/Regression/html/._Regression-bs012.html +++ b/doc/pub/Regression/html/._Regression-bs012.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -443,7 +445,7 @@ since when taking the first derivative with respect to the unknown parameters \(
  • 21
  • 22
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs013.html b/doc/pub/Regression/html/._Regression-bs013.html index e8d0a6a5b..47d39a3da 100644 --- a/doc/pub/Regression/html/._Regression-bs013.html +++ b/doc/pub/Regression/html/._Regression-bs013.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -463,7 +465,7 @@ $$
  • 22
  • 23
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs014.html b/doc/pub/Regression/html/._Regression-bs014.html index 367ccd0e0..0949cd9b4 100644 --- a/doc/pub/Regression/html/._Regression-bs014.html +++ b/doc/pub/Regression/html/._Regression-bs014.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -452,7 +454,7 @@ allow for the usage of direct linear algebra methods such as LU decomposi
  • 23
  • 24
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs015.html b/doc/pub/Regression/html/._Regression-bs015.html index 5ac0d6272..cd3e90824 100644 --- a/doc/pub/Regression/html/._Regression-bs015.html +++ b/doc/pub/Regression/html/._Regression-bs015.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -430,7 +432,7 @@ $$
  • 24
  • 25
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs016.html b/doc/pub/Regression/html/._Regression-bs016.html index ae0a00af2..db770d1a6 100644 --- a/doc/pub/Regression/html/._Regression-bs016.html +++ b/doc/pub/Regression/html/._Regression-bs016.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -438,7 +440,7 @@ Let us now return to our nuclear binding energies and simply code the above equa
  • 25
  • 26
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs017.html b/doc/pub/Regression/html/._Regression-bs017.html index f2ae569c8..8cf849171 100644 --- a/doc/pub/Regression/html/._Regression-bs017.html +++ b/doc/pub/Regression/html/._Regression-bs017.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -448,7 +450,7 @@ plt.show()
  • 26
  • 27
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs018.html b/doc/pub/Regression/html/._Regression-bs018.html index 063dec2c7..0ac1cb9c2 100644 --- a/doc/pub/Regression/html/._Regression-bs018.html +++ b/doc/pub/Regression/html/._Regression-bs018.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -447,7 +449,7 @@ and finally the relative error as
  • 27
  • 28
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs019.html b/doc/pub/Regression/html/._Regression-bs019.html index 59099e694..337a91e13 100644 --- a/doc/pub/Regression/html/._Regression-bs019.html +++ b/doc/pub/Regression/html/._Regression-bs019.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -439,7 +441,7 @@ where the matrix \( \boldsymbol{\Sigma} \) is a diagonal matrix with \( \sigma_i
  • 28
  • 29
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs020.html b/doc/pub/Regression/html/._Regression-bs020.html index af8d65e55..7ccde5b52 100644 --- a/doc/pub/Regression/html/._Regression-bs020.html +++ b/doc/pub/Regression/html/._Regression-bs020.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -435,7 +437,7 @@ where we have defined the matrix \( \boldsymbol{A} =\boldsymbol{X}/\boldsymbol{\
  • 29
  • 30
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs021.html b/doc/pub/Regression/html/._Regression-bs021.html index 46ebf3b80..217242de6 100644 --- a/doc/pub/Regression/html/._Regression-bs021.html +++ b/doc/pub/Regression/html/._Regression-bs021.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -433,7 +435,7 @@ $$
  • 30
  • 31
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs022.html b/doc/pub/Regression/html/._Regression-bs022.html index 0cc67fc3c..e4edf0ab2 100644 --- a/doc/pub/Regression/html/._Regression-bs022.html +++ b/doc/pub/Regression/html/._Regression-bs022.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -438,7 +440,7 @@ $$
  • 31
  • 32
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs023.html b/doc/pub/Regression/html/._Regression-bs023.html index ce7e28538..679a9436a 100644 --- a/doc/pub/Regression/html/._Regression-bs023.html +++ b/doc/pub/Regression/html/._Regression-bs023.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -431,7 +433,7 @@ $$
  • 32
  • 33
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs024.html b/doc/pub/Regression/html/._Regression-bs024.html index 726f3a2b9..7af1346bd 100644 --- a/doc/pub/Regression/html/._Regression-bs024.html +++ b/doc/pub/Regression/html/._Regression-bs024.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -465,7 +467,7 @@ Lasso and Ridge regression. See below.
  • 33
  • 34
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs025.html b/doc/pub/Regression/html/._Regression-bs025.html index 5c4573a72..40e69613e 100644 --- a/doc/pub/Regression/html/._Regression-bs025.html +++ b/doc/pub/Regression/html/._Regression-bs025.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -431,7 +433,7 @@ hyperparameter \( \lambda \), also to be explained below.
  • 34
  • 35
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs026.html b/doc/pub/Regression/html/._Regression-bs026.html index effe8cf1b..404cc22e1 100644 --- a/doc/pub/Regression/html/._Regression-bs026.html +++ b/doc/pub/Regression/html/._Regression-bs026.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -509,7 +511,7 @@ below.
  • 35
  • 36
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs027.html b/doc/pub/Regression/html/._Regression-bs027.html index 2c51fb3ae..767492628 100644 --- a/doc/pub/Regression/html/._Regression-bs027.html +++ b/doc/pub/Regression/html/._Regression-bs027.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -491,7 +493,7 @@ ypredict = X_test @ beta
  • 36
  • 37
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs028.html b/doc/pub/Regression/html/._Regression-bs028.html index e754349d2..644cfa48a 100644 --- a/doc/pub/Regression/html/._Regression-bs028.html +++ b/doc/pub/Regression/html/._Regression-bs028.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -437,7 +439,7 @@ The features/predictors are
  • 37
  • 38
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs029.html b/doc/pub/Regression/html/._Regression-bs029.html index a470c974a..cbe39660d 100644 --- a/doc/pub/Regression/html/._Regression-bs029.html +++ b/doc/pub/Regression/html/._Regression-bs029.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -563,7 +565,7 @@ plt.show()
  • 38
  • 39
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs030.html b/doc/pub/Regression/html/._Regression-bs030.html index 0d4a702bc..e53441c93 100644 --- a/doc/pub/Regression/html/._Regression-bs030.html +++ b/doc/pub/Regression/html/._Regression-bs030.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -442,7 +444,7 @@ inversion algorithm. Thereafter we dive into the math of the SVD.
  • 39
  • 40
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs031.html b/doc/pub/Regression/html/._Regression-bs031.html index 0c1e209c9..6a6e87a84 100644 --- a/doc/pub/Regression/html/._Regression-bs031.html +++ b/doc/pub/Regression/html/._Regression-bs031.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -457,7 +459,7 @@ This is equivalent to saying that the matrix \( \boldsymbol{X} \) has at least a
  • 40
  • 41
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs032.html b/doc/pub/Regression/html/._Regression-bs032.html index 3450418ad..6b0eb5c2e 100644 --- a/doc/pub/Regression/html/._Regression-bs032.html +++ b/doc/pub/Regression/html/._Regression-bs032.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -434,7 +436,7 @@ where \( \boldsymbol{I} \) is the identity matrix. When we discuss Ridge
  • 41
  • 42
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs033.html b/doc/pub/Regression/html/._Regression-bs033.html index f9723f764..16db30601 100644 --- a/doc/pub/Regression/html/._Regression-bs033.html +++ b/doc/pub/Regression/html/._Regression-bs033.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -445,7 +447,7 @@ is not diagonalizable, it is a so-called 42
  • 43
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs034.html b/doc/pub/Regression/html/._Regression-bs034.html index 6c36399ff..de2e26e13 100644 --- a/doc/pub/Regression/html/._Regression-bs034.html +++ b/doc/pub/Regression/html/._Regression-bs034.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -437,7 +439,7 @@ The SVD exits always!
  • 43
  • 44
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs035.html b/doc/pub/Regression/html/._Regression-bs035.html index 78c5abab6..ba5cfb8b8 100644 --- a/doc/pub/Regression/html/._Regression-bs035.html +++ b/doc/pub/Regression/html/._Regression-bs035.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -444,7 +446,7 @@ The columns of \( \boldsymbol{U} \) are called the left singular vectors while t
  • 44
  • 45
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs036.html b/doc/pub/Regression/html/._Regression-bs036.html index 73ca49000..9f85c5a05 100644 --- a/doc/pub/Regression/html/._Regression-bs036.html +++ b/doc/pub/Regression/html/._Regression-bs036.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -431,7 +433,7 @@ In general the economy-size SVD leads to less FLOPS and still conserving the des
  • 45
  • 46
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs037.html b/doc/pub/Regression/html/._Regression-bs037.html index 6142e651b..52c91d4fb 100644 --- a/doc/pub/Regression/html/._Regression-bs037.html +++ b/doc/pub/Regression/html/._Regression-bs037.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -458,7 +460,7 @@ We will come back to this expression when we discuss Ridge regression.
  • 46
  • 47
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs038.html b/doc/pub/Regression/html/._Regression-bs038.html index 5b604d134..cfbcfaaa4 100644 --- a/doc/pub/Regression/html/._Regression-bs038.html +++ b/doc/pub/Regression/html/._Regression-bs038.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -464,7 +466,7 @@ $$
  • 47
  • 48
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs039.html b/doc/pub/Regression/html/._Regression-bs039.html index c63c5f3ef..eb5551def 100644 --- a/doc/pub/Regression/html/._Regression-bs039.html +++ b/doc/pub/Regression/html/._Regression-bs039.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -465,7 +467,7 @@ with the vectors \( \boldsymbol{u}_j \) being the columns of \( \boldsymbol{U} \
  • 48
  • 49
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs040.html b/doc/pub/Regression/html/._Regression-bs040.html index 7fd678478..744968164 100644 --- a/doc/pub/Regression/html/._Regression-bs040.html +++ b/doc/pub/Regression/html/._Regression-bs040.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -430,7 +432,7 @@ With a parameter \( \lambda \) we can thus shrink the role of specific parameter
  • 49
  • 50
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs041.html b/doc/pub/Regression/html/._Regression-bs041.html index ab77a840d..5e000b866 100644 --- a/doc/pub/Regression/html/._Regression-bs041.html +++ b/doc/pub/Regression/html/._Regression-bs041.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -443,7 +445,7 @@ Similarly, Mehta et al
  • 50
  • 51
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs042.html b/doc/pub/Regression/html/._Regression-bs042.html index 8d2b5faee..d6efc981d 100644 --- a/doc/pub/Regression/html/._Regression-bs042.html +++ b/doc/pub/Regression/html/._Regression-bs042.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,19 +385,41 @@ MathJax.Hub.Config({ -

    Where are we going?

    +

    Some simple codes for the SVD

    -Before we proceed, we need to rethink what we have been doing. In our -eager to fit the data, we have omitted several important elements in -our regression analysis. In what follows we will -

      -
    1. look at statistical properties, including a discussion of mean values, variance and the so-called bias-variance tradeoff
    2. -
    3. introduce resampling techniques like cross-validation, bootstrapping and jackknife and more
    4. -
    + +
    import numpy as np
    +# SVD inversion
    +def SVDinv(A):
    +    ''' Takes as input a numpy matrix A and returns inv(A) based on singular value decomposition (SVD).
    +    SVD is numerically more stable than the inversion algorithms provided by
    +    numpy and scipy.linalg at the cost of being slower.
    +    '''
    +    U, s, VT = np.linalg.svd(A)
    +    print(U)
    +    print(s)
    +    print(VT)
    +    D = np.zeros((len(U),len(VT)))
    +    for i in range(0,len(VT)):
    +        D[i,i]=s[i]
    +    UT = np.transpose(U); V = np.transpose(VT); invD = np.linalg.inv(D)
    +    return np.matmul(V,np.matmul(invD,UT))
     
    -This will allow us to link the standard linear algebra methods we have discussed above to a statistical interpretation of the methods.
    +
    +X = np.array([ [1.0, -1.0, 2.0], [1.0, 0.0, 1.0], [1.0, 2.0, -1.0], [1.0, 1.0, 0.0] ])
    +print(X)
    +A = np.transpose(X) @ X
    +print(A)
    +# Brute force inversion of super-collinear matrix
    +#B = np.linalg.inv(A)
    +#print(B)
    +C = SVDinv(A)
    +print(C)
    +
    +

    +The matrix \( \boldsymbol{X} \) has columns that are linearly dependent. The column is the row-wise sum of the other two columns. The rank of a matrix (the column rank) is the dimension of space spanned by the column vectors. The rank of the matrix is the number of linearly independent columns, in this case just \( 2 \). We see this from the singular values when running the above code. Running the standard inversion algorithm for matrix inversion with \( \boldsymbol{X}^T\boldsymbol{X} \) results in the program terminating due to a singular matrix.

    @@ -423,7 +447,7 @@ This will allow us to link the standard linear algebra methods we have discussed

  • 51
  • 52
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs043.html b/doc/pub/Regression/html/._Regression-bs043.html index 416da079f..ad8198727 100644 --- a/doc/pub/Regression/html/._Regression-bs043.html +++ b/doc/pub/Regression/html/._Regression-bs043.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,23 +385,19 @@ MathJax.Hub.Config({ -

    Resampling methods

    -
    -
    -

    -Resampling methods are an indispensable tool in modern -statistics. They involve repeatedly drawing samples from a training -set and refitting a model of interest on each sample in order to -obtain additional information about the fitted model. For example, in -order to estimate the variability of a linear regression fit, we can -repeatedly draw different samples from the training data, fit a linear -regression to each new sample, and then examine the extent to which -the resulting fits differ. Such an approach may allow us to obtain -information that would not be available from fitting the model only -once using the original training sample. -

    -
    +

    Where are we going?

    +

    +Before we proceed, we need to rethink what we have been doing. In our +eager to fit the data, we have omitted several important elements in +our regression analysis. In what follows we will + +

      +
    1. look at statistical properties, including a discussion of mean values, variance and the so-called bias-variance tradeoff
    2. +
    3. introduce resampling techniques like cross-validation, bootstrapping and jackknife and more
    4. +
    + +This will allow us to link the standard linear algebra methods we have discussed above to a statistical interpretation of the methods.

    @@ -427,7 +425,7 @@ once using the original training sample.

  • 52
  • 53
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs044.html b/doc/pub/Regression/html/._Regression-bs044.html index d3532c4de..b44860b51 100644 --- a/doc/pub/Regression/html/._Regression-bs044.html +++ b/doc/pub/Regression/html/._Regression-bs044.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,29 +385,20 @@ MathJax.Hub.Config({ -

    Resampling approaches can be computationally expensive

    +

    Resampling methods

    - -

    -Resampling approaches can be computationally expensive, because they -involve fitting the same statistical method multiple times using -different subsets of the training data. However, due to recent -advances in computing power, the computational requirements of -resampling methods generally are not prohibitive. In this chapter, we -discuss two of the most commonly used resampling methods, -cross-validation and the bootstrap. Both methods are important tools -in the practical application of many statistical learning -procedures. For example, cross-validation can be used to estimate the -test error associated with a given statistical learning method in -order to evaluate its performance, or to select the appropriate level -of flexibility. The process of evaluating a model’s performance is -known as model assessment, whereas the process of selecting the proper -level of flexibility for a model is known as model selection. The -bootstrap is widely used. - -

    +Resampling methods are an indispensable tool in modern +statistics. They involve repeatedly drawing samples from a training +set and refitting a model of interest on each sample in order to +obtain additional information about the fitted model. For example, in +order to estimate the variability of a linear regression fit, we can +repeatedly draw different samples from the training data, fit a linear +regression to each new sample, and then examine the extent to which +the resulting fits differ. Such an approach may allow us to obtain +information that would not be available from fitting the model only +once using the original training sample.

    @@ -436,7 +429,7 @@ bootstrap is widely used.
  • 53
  • 54
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs045.html b/doc/pub/Regression/html/._Regression-bs045.html index a2680f2fe..e83e3e5dc 100644 --- a/doc/pub/Regression/html/._Regression-bs045.html +++ b/doc/pub/Regression/html/._Regression-bs045.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,16 +385,29 @@ MathJax.Hub.Config({ -

    Why resampling methods ?

    +

    Resampling approaches can be computationally expensive

    -

      -
    • Our simulations can be treated as computer experiments. This is particularly the case for Monte Carlo methods
    • -
    • The results can be analysed with the same statistical tools as we would use analysing experimental data.
    • -
    • As in all experiments, we are looking for expectation values and an estimate of how accurate they are, i.e., possible sources for errors.
    • -
    +

    +Resampling approaches can be computationally expensive, because they +involve fitting the same statistical method multiple times using +different subsets of the training data. However, due to recent +advances in computing power, the computational requirements of +resampling methods generally are not prohibitive. In this chapter, we +discuss two of the most commonly used resampling methods, +cross-validation and the bootstrap. Both methods are important tools +in the practical application of many statistical learning +procedures. For example, cross-validation can be used to estimate the +test error associated with a given statistical learning method in +order to evaluate its performance, or to select the appropriate level +of flexibility. The process of evaluating a model’s performance is +known as model assessment, whereas the process of selecting the proper +level of flexibility for a model is known as model selection. The +bootstrap is widely used. + +

    @@ -423,7 +438,7 @@ MathJax.Hub.Config({
  • 54
  • 55
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs046.html b/doc/pub/Regression/html/._Regression-bs046.html index 05142a991..11999ceb7 100644 --- a/doc/pub/Regression/html/._Regression-bs046.html +++ b/doc/pub/Regression/html/._Regression-bs046.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,21 +385,15 @@ MathJax.Hub.Config({ -

    Statistical analysis

    +

    Why resampling methods ?

      -
    • As in other experiments, many numerical experiments have two classes of errors:
    • - -
        -
      • Statistical errors
      • -
      • Systematical errors
      • -
      - -
    • Statistical errors can be estimated using standard tools from statistics
    • -
    • Systematical errors are method specific and must be treated differently from case to case.
    • +
    • Our simulations can be treated as computer experiments. This is particularly the case for Monte Carlo methods
    • +
    • The results can be analysed with the same statistical tools as we would use analysing experimental data.
    • +
    • As in all experiments, we are looking for expectation values and an estimate of how accurate they are, i.e., possible sources for errors.
    @@ -429,7 +425,7 @@ MathJax.Hub.Config({
  • 55
  • 56
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs047.html b/doc/pub/Regression/html/._Regression-bs047.html index 7fa3a3ae5..57e0f8e5b 100644 --- a/doc/pub/Regression/html/._Regression-bs047.html +++ b/doc/pub/Regression/html/._Regression-bs047.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,31 +385,22 @@ MathJax.Hub.Config({ -

    Statistics

    +

    Statistical analysis

    -The probability distribution function (PDF) is a function -\( p(x) \) on the domain which, in the discrete case, gives us the -probability or relative frequency with which these values of \( X \) occur: -$$ -p(x) = \mathrm{prob}(X=x) -$$ -In the continuous case, the PDF does not directly depict the -actual probability. Instead we define the probability for the -stochastic variable to assume any value on an infinitesimal interval -around \( x \) to be \( p(x)dx \). The continuous function \( p(x) \) then gives us -the density of the probability rather than the probability -itself. The probability for a stochastic variable to assume any value -on a non-infinitesimal interval \( [a,\,b] \) is then just the integral: -$$ -\mathrm{prob}(a\leq X\leq b) = \int_a^b p(x)dx -$$ +

      +
    • As in other experiments, many numerical experiments have two classes of errors:
    • -Qualitatively speaking, a stochastic variable represents the values of -numbers chosen as if by chance from some specified PDF so that the -selection of a large set of these numbers reproduces this PDF. +
        +
      • Statistical errors
      • +
      • Systematical errors
      • +
      + +
    • Statistical errors can be estimated using standard tools from statistics
    • +
    • Systematical errors are method specific and must be treated differently from case to case.
    • +
    @@ -438,7 +431,7 @@ selection of a large set of these numbers reproduces this PDF.
  • 56
  • 57
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs048.html b/doc/pub/Regression/html/._Regression-bs048.html index 9d1aeebbf..d3d1834c9 100644 --- a/doc/pub/Regression/html/._Regression-bs048.html +++ b/doc/pub/Regression/html/._Regression-bs048.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,23 +385,31 @@ MathJax.Hub.Config({ -

    Statistics, moments

    +

    Statistics

    -A particularly useful class of special expectation values are the -moments. The \( n \)-th moment of the PDF \( p \) is defined as -follows: +The probability distribution function (PDF) is a function +\( p(x) \) on the domain which, in the discrete case, gives us the +probability or relative frequency with which these values of \( X \) occur: $$ -\langle x^n\rangle \equiv \int\! x^n p(x)\,dx +p(x) = \mathrm{prob}(X=x) $$ -The zero-th moment \( \langle 1\rangle \) is just the normalization condition of -\( p \). The first moment, \( \langle x\rangle \), is called the mean of \( p \) -and often denoted by the letter \( \mu \): +In the continuous case, the PDF does not directly depict the +actual probability. Instead we define the probability for the +stochastic variable to assume any value on an infinitesimal interval +around \( x \) to be \( p(x)dx \). The continuous function \( p(x) \) then gives us +the density of the probability rather than the probability +itself. The probability for a stochastic variable to assume any value +on a non-infinitesimal interval \( [a,\,b] \) is then just the integral: $$ -\langle x\rangle = \mu \equiv \int\! x p(x)\,dx +\mathrm{prob}(a\leq X\leq b) = \int_a^b p(x)dx $$ + +Qualitatively speaking, a stochastic variable represents the values of +numbers chosen as if by chance from some specified PDF so that the +selection of a large set of these numbers reproduces this PDF.

    @@ -430,7 +440,7 @@ $$
  • 57
  • 58
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs049.html b/doc/pub/Regression/html/._Regression-bs049.html index b24a901cb..9000b961b 100644 --- a/doc/pub/Regression/html/._Regression-bs049.html +++ b/doc/pub/Regression/html/._Regression-bs049.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,38 +385,23 @@ MathJax.Hub.Config({ -

    Statistics, central moments

    +

    Statistics, moments

    -A special version of the moments is the set of central moments, -the n-th central moment defined as: +A particularly useful class of special expectation values are the +moments. The \( n \)-th moment of the PDF \( p \) is defined as +follows: $$ -\langle (x-\langle x \rangle )^n\rangle \equiv \int\! (x-\langle x\rangle)^n p(x)\,dx +\langle x^n\rangle \equiv \int\! x^n p(x)\,dx $$ -The zero-th and first central moments are both trivial, equal \( 1 \) and -\( 0 \), respectively. But the second central moment, known as the -variance of \( p \), is of particular interest. For the stochastic -variable \( X \), the variance is denoted as \( \sigma^2_X \) or \( \mathrm{var}(X) \): +The zero-th moment \( \langle 1\rangle \) is just the normalization condition of +\( p \). The first moment, \( \langle x\rangle \), is called the mean of \( p \) +and often denoted by the letter \( \mu \): $$ -\begin{align} -\sigma^2_X\ \ =\ \ \mathrm{var}(X) & = \langle (x-\langle x\rangle)^2\rangle = -\int\! (x-\langle x\rangle)^2 p(x)\,dx -\tag{2}\\ -& = \int\! \left(x^2 - 2 x \langle x\rangle^{2} + - \langle x\rangle^2\right)p(x)\,dx -\tag{3}\\ -& = \langle x^2\rangle - 2 \langle x\rangle\langle x\rangle + \langle x\rangle^2 -\tag{4}\\ -& = \langle x^2\rangle - \langle x\rangle^2 -\tag{5} -\end{align} +\langle x\rangle = \mu \equiv \int\! x p(x)\,dx $$ - -The square root of the variance, \( \sigma =\sqrt{\langle (x-\langle x\rangle)^2\rangle} \) is called the standard deviation of \( p \). It is clearly just the RMS (root-mean-square) -value of the deviation of the PDF from its mean value, interpreted -qualitatively as the spread of \( p \) around its mean.

    @@ -445,7 +432,7 @@ qualitatively as the spread of \( p \) around its mean.
  • 58
  • 59
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs050.html b/doc/pub/Regression/html/._Regression-bs050.html index 74018c6ae..fb3eed875 100644 --- a/doc/pub/Regression/html/._Regression-bs050.html +++ b/doc/pub/Regression/html/._Regression-bs050.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,31 +385,38 @@ MathJax.Hub.Config({ -

    Statistics, covariance

    +

    Statistics, central moments

    -Another important quantity is the so called covariance, a variant of -the above defined variance. Consider again the set \( \{X_i\} \) of \( n \) -stochastic variables (not necessarily uncorrelated) with the -multivariate PDF \( P(x_1,\dots,x_n) \). The covariance of two -of the stochastic variables, \( X_i \) and \( X_j \), is defined as follows: +A special version of the moments is the set of central moments, +the n-th central moment defined as: +$$ +\langle (x-\langle x \rangle )^n\rangle \equiv \int\! (x-\langle x\rangle)^n p(x)\,dx +$$ + +The zero-th and first central moments are both trivial, equal \( 1 \) and +\( 0 \), respectively. But the second central moment, known as the +variance of \( p \), is of particular interest. For the stochastic +variable \( X \), the variance is denoted as \( \sigma^2_X \) or \( \mathrm{var}(X) \): $$ \begin{align} -\mathrm{cov}(X_i,\,X_j) &\equiv \langle (x_i-\langle x_i\rangle)(x_j-\langle x_j\rangle)\rangle -\nonumber\\ -&= -\int\!\cdots\!\int\!(x_i-\langle x_i \rangle)(x_j-\langle x_j \rangle)\, -P(x_1,\dots,x_n)\,dx_1\dots dx_n -\tag{6} +\sigma^2_X\ \ =\ \ \mathrm{var}(X) & = \langle (x-\langle x\rangle)^2\rangle = +\int\! (x-\langle x\rangle)^2 p(x)\,dx +\tag{2}\\ +& = \int\! \left(x^2 - 2 x \langle x\rangle^{2} + + \langle x\rangle^2\right)p(x)\,dx +\tag{3}\\ +& = \langle x^2\rangle - 2 \langle x\rangle\langle x\rangle + \langle x\rangle^2 +\tag{4}\\ +& = \langle x^2\rangle - \langle x\rangle^2 +\tag{5} \end{align} $$ -with -$$ -\langle x_i\rangle = -\int\!\cdots\!\int\!x_i\,P(x_1,\dots,x_n)\,dx_1\dots dx_n -$$ +The square root of the variance, \( \sigma =\sqrt{\langle (x-\langle x\rangle)^2\rangle} \) is called the standard deviation of \( p \). It is clearly just the RMS (root-mean-square) +value of the deviation of the PDF from its mean value, interpreted +qualitatively as the spread of \( p \) around its mean.

    @@ -438,7 +447,7 @@ $$
  • 59
  • 60
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs051.html b/doc/pub/Regression/html/._Regression-bs051.html index 8a4c80b93..0bb04c85c 100644 --- a/doc/pub/Regression/html/._Regression-bs051.html +++ b/doc/pub/Regression/html/._Regression-bs051.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,32 +385,31 @@ MathJax.Hub.Config({ -

    Statistics, more covariance

    +

    Statistics, covariance

    -If we consider the above covariance as a matrix \( C_{ij}=\mathrm{cov}(X_i,\,X_j) \), then the diagonal elements are just the familiar -variances, \( C_{ii} = \mathrm{cov}(X_i,\,X_i) = \mathrm{var}(X_i) \). It turns out that -all the off-diagonal elements are zero if the stochastic variables are -uncorrelated. This is easy to show, keeping in mind the linearity of -the expectation value. Consider the stochastic variables \( X_i \) and -\( X_j \), (\( i\neq j \)): +Another important quantity is the so called covariance, a variant of +the above defined variance. Consider again the set \( \{X_i\} \) of \( n \) +stochastic variables (not necessarily uncorrelated) with the +multivariate PDF \( P(x_1,\dots,x_n) \). The covariance of two +of the stochastic variables, \( X_i \) and \( X_j \), is defined as follows: $$ \begin{align} -\mathrm{cov}(X_i,\,X_j) &= \langle(x_i-\langle x_i\rangle)(x_j-\langle x_j\rangle)\rangle -\tag{7}\\ -&=\langle x_i x_j - x_i\langle x_j\rangle - \langle x_i\rangle x_j + \langle x_i\rangle\langle x_j\rangle\rangle -\tag{8}\\ -&=\langle x_i x_j\rangle - \langle x_i\langle x_j\rangle\rangle - \langle \langle x_i\rangle x_j\rangle + -\langle \langle x_i\rangle\langle x_j\rangle\rangle -\tag{9}\\ -&=\langle x_i x_j\rangle - \langle x_i\rangle\langle x_j\rangle - \langle x_i\rangle\langle x_j\rangle + -\langle x_i\rangle\langle x_j\rangle -\tag{10}\\ -&=\langle x_i x_j\rangle - \langle x_i\rangle\langle x_j\rangle -\tag{11} +\mathrm{cov}(X_i,\,X_j) &\equiv \langle (x_i-\langle x_i\rangle)(x_j-\langle x_j\rangle)\rangle +\nonumber\\ +&= +\int\!\cdots\!\int\!(x_i-\langle x_i \rangle)(x_j-\langle x_j \rangle)\, +P(x_1,\dots,x_n)\,dx_1\dots dx_n +\tag{6} \end{align} $$ + +with +$$ +\langle x_i\rangle = +\int\!\cdots\!\int\!x_i\,P(x_1,\dots,x_n)\,dx_1\dots dx_n +$$

    @@ -439,7 +440,7 @@ $$
  • 60
  • 61
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs052.html b/doc/pub/Regression/html/._Regression-bs052.html index 715ea3015..6f8e2c914 100644 --- a/doc/pub/Regression/html/._Regression-bs052.html +++ b/doc/pub/Regression/html/._Regression-bs052.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,51 +385,35 @@ MathJax.Hub.Config({ -

    Covariance example

    - -

    -Suppose we have defined three vectors \( \hat{x}, \hat{y}, \hat{z} \) with -\( n \) elements each. The covariance matrix is defined as - +

    Statistics, more covariance

    +
    +
    +

    +If we consider the above covariance as a matrix \( C_{ij}=\mathrm{cov}(X_i,\,X_j) \), then the diagonal elements are just the familiar +variances, \( C_{ii} = \mathrm{cov}(X_i,\,X_i) = \mathrm{var}(X_i) \). It turns out that +all the off-diagonal elements are zero if the stochastic variables are +uncorrelated. This is easy to show, keeping in mind the linearity of +the expectation value. Consider the stochastic variables \( X_i \) and +\( X_j \), (\( i\neq j \)): $$ -\hat{\Sigma} = \begin{bmatrix} \sigma_{xx} & \sigma_{xy} & \sigma_{xz} \\ - \sigma_{yx} & \sigma_{yy} & \sigma_{yz} \\ - \sigma_{zx} & \sigma_{zy} & \sigma_{zz} - \end{bmatrix}, +\begin{align} +\mathrm{cov}(X_i,\,X_j) &= \langle(x_i-\langle x_i\rangle)(x_j-\langle x_j\rangle)\rangle +\tag{7}\\ +&=\langle x_i x_j - x_i\langle x_j\rangle - \langle x_i\rangle x_j + \langle x_i\rangle\langle x_j\rangle\rangle +\tag{8}\\ +&=\langle x_i x_j\rangle - \langle x_i\langle x_j\rangle\rangle - \langle \langle x_i\rangle x_j\rangle + +\langle \langle x_i\rangle\langle x_j\rangle\rangle +\tag{9}\\ +&=\langle x_i x_j\rangle - \langle x_i\rangle\langle x_j\rangle - \langle x_i\rangle\langle x_j\rangle + +\langle x_i\rangle\langle x_j\rangle +\tag{10}\\ +&=\langle x_i x_j\rangle - \langle x_i\rangle\langle x_j\rangle +\tag{11} +\end{align} $$ +

    +
    -where for example -$$ -\sigma_{xy} =\frac{1}{n} \sum_{i=0}^{n-1}(x_i- \overline{x})(y_i- \overline{y}). -$$ - -

    -The Numpy function np.cov calculates the covariance elements using -the factor \( 1/(n-1) \) instead of \( 1/n \) since it assumes we do not have -the exact mean valu\ es. - -

    -The following simple function uses the np.vstack function which -takes each vector of dimension \( 1\times n \) and produces a \( 3\times n \) -matrix \( \hat{W} \) - -$$ -\hat{W} = \begin{bmatrix} x_0 & y_0 & z_0 \\ - x_1 & y_1 & z_1 \\ - x_2 & y_2 & z_2 \\ - \dots & \dots & \dots \\ - x_{n-2} & y_{n-2} & z_{n-2} \\ - x_{n-1} & y_{n-1} & z_{n-1} - \end{bmatrix}, -$$ - -

    -which in turn is converted into into the \( 3\times 3 \) covariance matrix -\( \hat{\Sigma} \) via the Numpy function np.cov(). We note that we can -also calculate the mean value of each set of samples \( \hat{x} \) etc -using the Numpy function np.mean(x). We can also extract the -eigenvalues of the covariance matrix through the np.linalg.eig() -function.

    @@ -455,7 +441,7 @@ function.

  • 61
  • 62
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs053.html b/doc/pub/Regression/html/._Regression-bs053.html index 108f03bca..ab727a801 100644 --- a/doc/pub/Regression/html/._Regression-bs053.html +++ b/doc/pub/Regression/html/._Regression-bs053.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,42 +385,52 @@ MathJax.Hub.Config({ -

    Covariance in numpy

    +

    Covariance example

    +Suppose we have defined three vectors \( \hat{x}, \hat{y}, \hat{z} \) with +\( n \) elements each. The covariance matrix is defined as - -

    # Importing various packages
    -import numpy as np
    +$$
    +\hat{\Sigma} = \begin{bmatrix} \sigma_{xx} & \sigma_{xy} & \sigma_{xz} \\
    +                              \sigma_{yx} & \sigma_{yy} & \sigma_{yz} \\
    +                              \sigma_{zx} & \sigma_{zy} & \sigma_{zz}
    +             \end{bmatrix},
    +$$
    +
    +where for example
    +$$
    +\sigma_{xy} =\frac{1}{n} \sum_{i=0}^{n-1}(x_i- \overline{x})(y_i- \overline{y}).
    +$$
     
    -n = 100
    -x = np.random.normal(size=n)
    -print(np.mean(x))
    -y = 4+3*x+np.random.normal(size=n)
    -print(np.mean(y))
    -z = x**3+np.random.normal(size=n)
    -print(np.mean(z))
    -W = np.vstack((x, y, z))
    -Sigma = np.cov(W)
    -print(Sigma)
    -Eigvals, Eigvecs = np.linalg.eig(Sigma)
    -print(Eigvals)
    -

    +The Numpy function np.cov calculates the covariance elements using +the factor \( 1/(n-1) \) instead of \( 1/n \) since it assumes we do not have +the exact mean valu\ es. + +

    +The following simple function uses the np.vstack function which +takes each vector of dimension \( 1\times n \) and produces a \( 3\times n \) +matrix \( \hat{W} \) + +$$ +\hat{W} = \begin{bmatrix} x_0 & y_0 & z_0 \\ + x_1 & y_1 & z_1 \\ + x_2 & y_2 & z_2 \\ + \dots & \dots & \dots \\ + x_{n-2} & y_{n-2} & z_{n-2} \\ + x_{n-1} & y_{n-1} & z_{n-1} + \end{bmatrix}, +$$ + +

    +which in turn is converted into into the \( 3\times 3 \) covariance matrix +\( \hat{\Sigma} \) via the Numpy function np.cov(). We note that we can +also calculate the mean value of each set of samples \( \hat{x} \) etc +using the Numpy function np.mean(x). We can also extract the +eigenvalues of the covariance matrix through the np.linalg.eig() +function. - -

    import numpy as np
    -import matplotlib.pyplot as plt
    -from scipy import sparse
    -eye = np.eye(4)
    -print(eye)
    -sparse_mtx = sparse.csr_matrix(eye)
    -print(sparse_mtx)
    -x = np.linspace(-10,10,100)
    -y = np.sin(x)
    -plt.plot(x,y,marker='x')
    -plt.show()
    -

    @@ -445,7 +457,7 @@ plt.show()

  • 62
  • 63
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs054.html b/doc/pub/Regression/html/._Regression-bs054.html index deb8b2308..3fa25166b 100644 --- a/doc/pub/Regression/html/._Regression-bs054.html +++ b/doc/pub/Regression/html/._Regression-bs054.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,30 +385,42 @@ MathJax.Hub.Config({ -

    Statistics, independent variables

    -
    -
    -

    -If \( X_i \) and \( X_j \) are independent, we get -\( \langle x_i x_j\rangle =\langle x_i\rangle\langle x_j\rangle \), resulting in \( \mathrm{cov}(X_i, X_j) = 0\ \ (i\neq j) \). +

    Covariance in numpy

    -Also useful for us is the covariance of linear combinations of -stochastic variables. Let \( \{X_i\} \) and \( \{Y_i\} \) be two sets of -stochastic variables. Let also \( \{a_i\} \) and \( \{b_i\} \) be two sets of -scalars. Consider the linear combination: -$$ -U = \sum_i a_i X_i \qquad V = \sum_j b_j Y_j -$$ -By the linearity of the expectation value -$$ -\mathrm{cov}(U, V) = \sum_{i,j}a_i b_j \mathrm{cov}(X_i, Y_j) -$$ -

    -
    + +
    # Importing various packages
    +import numpy as np
     
    +n = 100
    +x = np.random.normal(size=n)
    +print(np.mean(x))
    +y = 4+3*x+np.random.normal(size=n)
    +print(np.mean(y))
    +z = x**3+np.random.normal(size=n)
    +print(np.mean(z))
    +W = np.vstack((x, y, z))
    +Sigma = np.cov(W)
    +print(Sigma)
    +Eigvals, Eigvecs = np.linalg.eig(Sigma)
    +print(Eigvals)
    +
    +

    + +

    import numpy as np
    +import matplotlib.pyplot as plt
    +from scipy import sparse
    +eye = np.eye(4)
    +print(eye)
    +sparse_mtx = sparse.csr_matrix(eye)
    +print(sparse_mtx)
    +x = np.linspace(-10,10,100)
    +y = np.sin(x)
    +plt.plot(x,y,marker='x')
    +plt.show()
    +

    @@ -433,7 +447,7 @@ $$

  • 63
  • 64
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs055.html b/doc/pub/Regression/html/._Regression-bs055.html index 09eddaf4f..cc3955608 100644 --- a/doc/pub/Regression/html/._Regression-bs055.html +++ b/doc/pub/Regression/html/._Regression-bs055.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,32 +385,26 @@ MathJax.Hub.Config({ -

    Statistics, more variance

    +

    Statistics, independent variables

    -Now, since the variance is just \( \mathrm{var}(X_i) = \mathrm{cov}(X_i, X_i) \), we get -the variance of the linear combination \( U = \sum_i a_i X_i \): +If \( X_i \) and \( X_j \) are independent, we get +\( \langle x_i x_j\rangle =\langle x_i\rangle\langle x_j\rangle \), resulting in \( \mathrm{cov}(X_i, X_j) = 0\ \ (i\neq j) \). + +

    +Also useful for us is the covariance of linear combinations of +stochastic variables. Let \( \{X_i\} \) and \( \{Y_i\} \) be two sets of +stochastic variables. Let also \( \{a_i\} \) and \( \{b_i\} \) be two sets of +scalars. Consider the linear combination: $$ -\begin{equation} -\mathrm{var}(U) = \sum_{i,j}a_i a_j \mathrm{cov}(X_i, X_j) -\tag{12} -\end{equation} +U = \sum_i a_i X_i \qquad V = \sum_j b_j Y_j $$ -And in the special case when the stochastic variables are -uncorrelated, the off-diagonal elements of the covariance are as we -know zero, resulting in: +By the linearity of the expectation value $$ -\mathrm{var}(U) = \sum_i a_i^2 \mathrm{cov}(X_i, X_i) = \sum_i a_i^2 \mathrm{var}(X_i) +\mathrm{cov}(U, V) = \sum_{i,j}a_i b_j \mathrm{cov}(X_i, Y_j) $$ - -$$ -\mathrm{var}(\sum_i a_i X_i) = \sum_i a_i^2 \mathrm{var}(X_i) -$$ - -which will become very useful in our study of the error in the mean -value of a set of measurements.

    @@ -439,7 +435,7 @@ value of a set of measurements.
  • 64
  • 65
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs056.html b/doc/pub/Regression/html/._Regression-bs056.html index 5ece4bfd0..a51d5a913 100644 --- a/doc/pub/Regression/html/._Regression-bs056.html +++ b/doc/pub/Regression/html/._Regression-bs056.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,28 +385,32 @@ MathJax.Hub.Config({ -

    Statistics and stochastic processes

    +

    Statistics, more variance

    -A stochastic process is a process that produces sequentially a -chain of values: +Now, since the variance is just \( \mathrm{var}(X_i) = \mathrm{cov}(X_i, X_i) \), we get +the variance of the linear combination \( U = \sum_i a_i X_i \): $$ -\{x_1, x_2,\dots\,x_k,\dots\}. +\begin{equation} +\mathrm{var}(U) = \sum_{i,j}a_i a_j \mathrm{cov}(X_i, X_j) +\tag{12} +\end{equation} $$ -We will call these -values our measurements and the entire set as our measured -sample. The action of measuring all the elements of a sample -we will call a stochastic experiment since, operationally, -they are often associated with results of empirical observation of -some physical or mathematical phenomena; precisely an experiment. We -assume that these values are distributed according to some -PDF \( p_X^{\phantom X}(x) \), where \( X \) is just the formal symbol for the -stochastic variable whose PDF is \( p_X^{\phantom X}(x) \). Instead of -trying to determine the full distribution \( p \) we are often only -interested in finding the few lowest moments, like the mean -\( \mu_X^{\phantom X} \) and the variance \( \sigma_X^{\phantom X} \). +And in the special case when the stochastic variables are +uncorrelated, the off-diagonal elements of the covariance are as we +know zero, resulting in: +$$ +\mathrm{var}(U) = \sum_i a_i^2 \mathrm{cov}(X_i, X_i) = \sum_i a_i^2 \mathrm{var}(X_i) +$$ + +$$ +\mathrm{var}(\sum_i a_i X_i) = \sum_i a_i^2 \mathrm{var}(X_i) +$$ + +which will become very useful in our study of the error in the mean +value of a set of measurements.

    @@ -435,7 +441,7 @@ interested in finding the few lowest moments, like the mean
  • 65
  • 66
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs057.html b/doc/pub/Regression/html/._Regression-bs057.html index 01bd4d7b1..8a6f6493b 100644 --- a/doc/pub/Regression/html/._Regression-bs057.html +++ b/doc/pub/Regression/html/._Regression-bs057.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -381,28 +383,30 @@ MathJax.Hub.Config({

     

     

     

    - + -

    Statistics and sample variables

    +

    Statistics and stochastic processes

    -In practical situations a sample is always of finite size. Let that -size be \( n \). The expectation value of a sample, the sample mean, is then defined as follows: +A stochastic process is a process that produces sequentially a +chain of values: $$ -\bar{x}_n \equiv \frac{1}{n}\sum_{k=1}^n x_k +\{x_1, x_2,\dots\,x_k,\dots\}. $$ -The sample variance is: -$$ -\mathrm{var}(x) \equiv \frac{1}{n}\sum_{k=1}^n (x_k - \bar{x}_n)^2 -$$ - -its square root being the standard deviation of the sample. The -sample covariance is: -$$ -\mathrm{cov}(x)\equiv\frac{1}{n}\sum_{kl}(x_k - \bar{x}_n)(x_l - \bar{x}_n) -$$ +We will call these +values our measurements and the entire set as our measured +sample. The action of measuring all the elements of a sample +we will call a stochastic experiment since, operationally, +they are often associated with results of empirical observation of +some physical or mathematical phenomena; precisely an experiment. We +assume that these values are distributed according to some +PDF \( p_X^{\phantom X}(x) \), where \( X \) is just the formal symbol for the +stochastic variable whose PDF is \( p_X^{\phantom X}(x) \). Instead of +trying to determine the full distribution \( p \) we are often only +interested in finding the few lowest moments, like the mean +\( \mu_X^{\phantom X} \) and the variance \( \sigma_X^{\phantom X} \).

    @@ -433,7 +437,7 @@ $$
  • 66
  • 67
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs058.html b/doc/pub/Regression/html/._Regression-bs058.html index 280ac6b3d..38aa90777 100644 --- a/doc/pub/Regression/html/._Regression-bs058.html +++ b/doc/pub/Regression/html/._Regression-bs058.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -381,23 +383,28 @@ MathJax.Hub.Config({

     

     

     

    - + -

    Statistics, sample variance and covariance

    +

    Statistics and sample variables

    -Note that the sample variance is the sample covariance without the -cross terms. In a similar manner as the covariance in Eq. (6) is a measure of the correlation between -two stochastic variables, the above defined sample covariance is a -measure of the sequential correlation between succeeding measurements -of a sample. +In practical situations a sample is always of finite size. Let that +size be \( n \). The expectation value of a sample, the sample mean, is then defined as follows: +$$ +\bar{x}_n \equiv \frac{1}{n}\sum_{k=1}^n x_k +$$ -

    -These quantities, being known experimental values, differ -significantly from and must not be confused with the similarly named -quantities for stochastic variables, mean \( \mu_X \), variance \( \mathrm{var}(X) \) -and covariance \( \mathrm{cov}(X,Y) \). +The sample variance is: +$$ +\mathrm{var}(x) \equiv \frac{1}{n}\sum_{k=1}^n (x_k - \bar{x}_n)^2 +$$ + +its square root being the standard deviation of the sample. The +sample covariance is: +$$ +\mathrm{cov}(x)\equiv\frac{1}{n}\sum_{kl}(x_k - \bar{x}_n)(x_l - \bar{x}_n) +$$

    @@ -428,7 +435,7 @@ and covariance \( \mathrm{cov}(X,Y) \).
  • 67
  • 68
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs059.html b/doc/pub/Regression/html/._Regression-bs059.html index bd53f2d50..0d6ac46d8 100644 --- a/doc/pub/Regression/html/._Regression-bs059.html +++ b/doc/pub/Regression/html/._Regression-bs059.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,32 +385,21 @@ MathJax.Hub.Config({ -

    Statistics, law of large numbers

    +

    Statistics, sample variance and covariance

    -The law of large numbers -states that as the size of our sample grows to infinity, the sample -mean approaches the true mean \( \mu_X^{\phantom X} \) of the chosen PDF: -$$ -\lim_{n\to\infty}\bar{x}_n = \mu_X^{\phantom X} -$$ - -The sample mean \( \bar{x}_n \) works therefore as an estimate of the true -mean \( \mu_X^{\phantom X} \). +Note that the sample variance is the sample covariance without the +cross terms. In a similar manner as the covariance in Eq. (6) is a measure of the correlation between +two stochastic variables, the above defined sample covariance is a +measure of the sequential correlation between succeeding measurements +of a sample.

    -What we need to find out is how good an approximation \( \bar{x}_n \) is to -\( \mu_X^{\phantom X} \). In any stochastic measurement, an estimated -mean is of no use to us without a measure of its error. A quantity -that tells us how well we can reproduce it in another experiment. We -are therefore interested in the PDF of the sample mean itself. Its -standard deviation will be a measure of the spread of sample means, -and we will simply call it the error of the sample mean, or -just sample error, and denote it by \( \mathrm{err}_X^{\phantom X} \). In -practice, we will only be able to produce an estimate of the -sample error since the exact value would require the knowledge of the -true PDFs behind, which we usually do not have. +These quantities, being known experimental values, differ +significantly from and must not be confused with the similarly named +quantities for stochastic variables, mean \( \mu_X \), variance \( \mathrm{var}(X) \) +and covariance \( \mathrm{cov}(X,Y) \).

    @@ -439,7 +430,7 @@ true PDFs behind, which we usually do not have.
  • 68
  • 69
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs060.html b/doc/pub/Regression/html/._Regression-bs060.html index db17155ca..8659d20c1 100644 --- a/doc/pub/Regression/html/._Regression-bs060.html +++ b/doc/pub/Regression/html/._Regression-bs060.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,22 +385,32 @@ MathJax.Hub.Config({ -

    Statistics, more on sample error

    +

    Statistics, law of large numbers

    -Let us first take a look at what happens to the sample error as the -size of the sample grows. In a sample, each of the measurements \( x_i \) -can be associated with its own stochastic variable \( X_i \). The -stochastic variable \( \overline X_n \) for the sample mean \( \bar{x}_n \) is -then just a linear combination, already familiar to us: +The law of large numbers +states that as the size of our sample grows to infinity, the sample +mean approaches the true mean \( \mu_X^{\phantom X} \) of the chosen PDF: $$ -\overline X_n = \frac{1}{n}\sum_{i=1}^n X_i +\lim_{n\to\infty}\bar{x}_n = \mu_X^{\phantom X} $$ -All the coefficients are just equal \( 1/n \). The PDF of \( \overline X_n \), -denoted by \( p_{\overline X_n}(x) \) is the desired PDF of the sample -means. +The sample mean \( \bar{x}_n \) works therefore as an estimate of the true +mean \( \mu_X^{\phantom X} \). + +

    +What we need to find out is how good an approximation \( \bar{x}_n \) is to +\( \mu_X^{\phantom X} \). In any stochastic measurement, an estimated +mean is of no use to us without a measure of its error. A quantity +that tells us how well we can reproduce it in another experiment. We +are therefore interested in the PDF of the sample mean itself. Its +standard deviation will be a measure of the spread of sample means, +and we will simply call it the error of the sample mean, or +just sample error, and denote it by \( \mathrm{err}_X^{\phantom X} \). In +practice, we will only be able to produce an estimate of the +sample error since the exact value would require the knowledge of the +true PDFs behind, which we usually do not have.

    @@ -429,7 +441,7 @@ means.
  • 69
  • 70
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs061.html b/doc/pub/Regression/html/._Regression-bs061.html index b7395a27f..f06c50795 100644 --- a/doc/pub/Regression/html/._Regression-bs061.html +++ b/doc/pub/Regression/html/._Regression-bs061.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,21 +385,22 @@ MathJax.Hub.Config({ -

    Statistics

    +

    Statistics, more on sample error

    -The probability density of obtaining a sample mean \( \bar x_n \) -is the product of probabilities of obtaining arbitrary values \( x_1, -x_2,\dots,x_n \) with the constraint that the mean of the set \( \{x_i\} \) -is \( \bar x_n \): +Let us first take a look at what happens to the sample error as the +size of the sample grows. In a sample, each of the measurements \( x_i \) +can be associated with its own stochastic variable \( X_i \). The +stochastic variable \( \overline X_n \) for the sample mean \( \bar{x}_n \) is +then just a linear combination, already familiar to us: $$ -p_{\overline X_n}(x) = \int p_X^{\phantom X}(x_1)\cdots -\int p_X^{\phantom X}(x_n)\ -\delta\!\left(x - \frac{x_1+x_2+\dots+x_n}{n}\right)dx_n \cdots dx_1 +\overline X_n = \frac{1}{n}\sum_{i=1}^n X_i $$ -And in particular we are interested in its variance \( \mathrm{var}(\overline X_n) \). +All the coefficients are just equal \( 1/n \). The PDF of \( \overline X_n \), +denoted by \( p_{\overline X_n}(x) \) is the desired PDF of the sample +means.

    @@ -428,7 +431,7 @@ And in particular we are interested in its variance \( \mathrm{var}(\overline X_
  • 70
  • 71
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs062.html b/doc/pub/Regression/html/._Regression-bs062.html index 34493f2e5..ae513e816 100644 --- a/doc/pub/Regression/html/._Regression-bs062.html +++ b/doc/pub/Regression/html/._Regression-bs062.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,25 +385,21 @@ MathJax.Hub.Config({ -

    Statistics, central limit theorem

    +

    Statistics

    -It is generally not possible to express \( p_{\overline X_n}(x) \) in a -closed form given an arbitrary PDF \( p_X^{\phantom X} \) and a number -\( n \). But for the limit \( n\to\infty \) it is possible to make an -approximation. The very important result is called the central limit theorem. It tells us that as \( n \) goes to infinity, -\( p_{\overline X_n}(x) \) approaches a Gaussian distribution whose mean -and variance equal the true mean and variance, \( \mu_{X}^{\phantom X} \) -and \( \sigma_{X}^{2} \), respectively: +The probability density of obtaining a sample mean \( \bar x_n \) +is the product of probabilities of obtaining arbitrary values \( x_1, +x_2,\dots,x_n \) with the constraint that the mean of the set \( \{x_i\} \) +is \( \bar x_n \): $$ -\begin{equation} -\lim_{n\to\infty} p_{\overline X_n}(x) = -\left(\frac{n}{2\pi\mathrm{var}(X)}\right)^{1/2} -e^{-\frac{n(x-\bar x_n)^2}{2\mathrm{var}(X)}} -\tag{13} -\end{equation} +p_{\overline X_n}(x) = \int p_X^{\phantom X}(x_1)\cdots +\int p_X^{\phantom X}(x_n)\ +\delta\!\left(x - \frac{x_1+x_2+\dots+x_n}{n}\right)dx_n \cdots dx_1 $$ + +And in particular we are interested in its variance \( \mathrm{var}(\overline X_n) \).

    @@ -432,7 +430,7 @@ $$
  • 71
  • 72
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs063.html b/doc/pub/Regression/html/._Regression-bs063.html index 533907a24..cb5e36fde 100644 --- a/doc/pub/Regression/html/._Regression-bs063.html +++ b/doc/pub/Regression/html/._Regression-bs063.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,29 +385,25 @@ MathJax.Hub.Config({ -

    Statistics, more technicalities

    +

    Statistics, central limit theorem

    -The desired variance -\( \mathrm{var}(\overline X_n) \), i.e. the sample error squared -\( \mathrm{err}_X^2 \), is given by: +It is generally not possible to express \( p_{\overline X_n}(x) \) in a +closed form given an arbitrary PDF \( p_X^{\phantom X} \) and a number +\( n \). But for the limit \( n\to\infty \) it is possible to make an +approximation. The very important result is called the central limit theorem. It tells us that as \( n \) goes to infinity, +\( p_{\overline X_n}(x) \) approaches a Gaussian distribution whose mean +and variance equal the true mean and variance, \( \mu_{X}^{\phantom X} \) +and \( \sigma_{X}^{2} \), respectively: $$ \begin{equation} -\mathrm{err}_X^2 = \mathrm{var}(\overline X_n) = \frac{1}{n^2} -\sum_{ij} \mathrm{cov}(X_i, X_j) -\tag{14} +\lim_{n\to\infty} p_{\overline X_n}(x) = +\left(\frac{n}{2\pi\mathrm{var}(X)}\right)^{1/2} +e^{-\frac{n(x-\bar x_n)^2}{2\mathrm{var}(X)}} +\tag{13} \end{equation} $$ - -We see now that in order to calculate the exact error of the sample -with the above expression, we would need the true means -\( \mu_{X_i}^{\phantom X} \) of the stochastic variables \( X_i \). To -calculate these requires that we know the true multivariate PDF of all -the \( X_i \). But this PDF is unknown to us, we have only got the measurements of -one sample. The best we can do is to let the sample itself be an -estimate of the PDF of each of the \( X_i \), estimating all properties of -\( X_i \) through the measurements of the sample.

    @@ -436,7 +434,7 @@ estimate of the PDF of each of the \( X_i \), estimating all properties of
  • 72
  • 73
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs064.html b/doc/pub/Regression/html/._Regression-bs064.html index 71b4a66b1..235c72a1a 100644 --- a/doc/pub/Regression/html/._Regression-bs064.html +++ b/doc/pub/Regression/html/._Regression-bs064.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,27 +385,29 @@ MathJax.Hub.Config({ -

    Statistics

    +

    Statistics, more technicalities

    -Our estimate of \( \mu_{X_i}^{\phantom X} \) is then the sample mean \( \bar x \) -itself, in accordance with the the central limit theorem: +The desired variance +\( \mathrm{var}(\overline X_n) \), i.e. the sample error squared +\( \mathrm{err}_X^2 \), is given by: $$ -\mu_{X_i}^{\phantom X} = \langle x_i\rangle \approx \frac{1}{n}\sum_{k=1}^n x_k = \bar x +\begin{equation} +\mathrm{err}_X^2 = \mathrm{var}(\overline X_n) = \frac{1}{n^2} +\sum_{ij} \mathrm{cov}(X_i, X_j) +\tag{14} +\end{equation} $$ -Using \( \bar x \) in place of \( \mu_{X_i}^{\phantom X} \) we can give an -estimate of the covariance in Eq. (14) -$$ -\mathrm{cov}(X_i, X_j) = \langle (x_i-\langle x_i\rangle)(x_j-\langle x_j\rangle)\rangle -\approx\langle (x_i - \bar x)(x_j - \bar{x})\rangle, -$$ - -resulting in -$$ -\frac{1}{n} \sum_{l}^n \left(\frac{1}{n}\sum_{k}^n (x_k -\bar x_n)(x_l - \bar x_n)\right)=\frac{1}{n}\frac{1}{n} \sum_{kl} (x_k -\bar x_n)(x_l - \bar x_n)=\frac{1}{n}\mathrm{cov}(x) -$$ +We see now that in order to calculate the exact error of the sample +with the above expression, we would need the true means +\( \mu_{X_i}^{\phantom X} \) of the stochastic variables \( X_i \). To +calculate these requires that we know the true multivariate PDF of all +the \( X_i \). But this PDF is unknown to us, we have only got the measurements of +one sample. The best we can do is to let the sample itself be an +estimate of the PDF of each of the \( X_i \), estimating all properties of +\( X_i \) through the measurements of the sample.

    @@ -434,7 +438,7 @@ $$
  • 73
  • 74
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs065.html b/doc/pub/Regression/html/._Regression-bs065.html index 552e00de3..758cda4b0 100644 --- a/doc/pub/Regression/html/._Regression-bs065.html +++ b/doc/pub/Regression/html/._Regression-bs065.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,39 +385,27 @@ MathJax.Hub.Config({ -

    Statistics and sample variance

    +

    Statistics

    -By the same procedure we can use the sample variance as an -estimate of the variance of any of the stochastic variables \( X_i \) +Our estimate of \( \mu_{X_i}^{\phantom X} \) is then the sample mean \( \bar x \) +itself, in accordance with the the central limit theorem: $$ -\mathrm{var}(X_i)=\langle x_i - \langle x_i\rangle\rangle \approx \langle x_i - \bar x_n\rangle\nonumber, +\mu_{X_i}^{\phantom X} = \langle x_i\rangle \approx \frac{1}{n}\sum_{k=1}^n x_k = \bar x $$ -which is approximated as +Using \( \bar x \) in place of \( \mu_{X_i}^{\phantom X} \) we can give an +estimate of the covariance in Eq. (14) $$ -\begin{equation} -\mathrm{var}(X_i)\approx \frac{1}{n}\sum_{k=1}^n (x_k - \bar x_n)=\mathrm{var}(x) -\tag{15} -\end{equation} +\mathrm{cov}(X_i, X_j) = \langle (x_i-\langle x_i\rangle)(x_j-\langle x_j\rangle)\rangle +\approx\langle (x_i - \bar x)(x_j - \bar{x})\rangle, $$ -

    -Now we can calculate an estimate of the error -\( \mathrm{err}_X^{\phantom X} \) of the sample mean \( \bar x_n \): +resulting in +$$ +\frac{1}{n} \sum_{l}^n \left(\frac{1}{n}\sum_{k}^n (x_k -\bar x_n)(x_l - \bar x_n)\right)=\frac{1}{n}\frac{1}{n} \sum_{kl} (x_k -\bar x_n)(x_l - \bar x_n)=\frac{1}{n}\mathrm{cov}(x) $$ -\begin{align} -\mathrm{err}_X^2 -&=\frac{1}{n^2}\sum_{ij} \mathrm{cov}(X_i, X_j) \nonumber \\ -&\approx&\frac{1}{n^2}\sum_{ij}\frac{1}{n}\mathrm{cov}(x) =\frac{1}{n^2}n^2\frac{1}{n}\mathrm{cov}(x)\nonumber\\ -&=\frac{1}{n}\mathrm{cov}(x) -\tag{16} -\end{align} -$$ - -which is nothing but the sample covariance divided by the number of -measurements in the sample.

    @@ -446,7 +436,7 @@ measurements in the sample.
  • 74
  • 75
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs066.html b/doc/pub/Regression/html/._Regression-bs066.html index 89800e2fa..11d88fe23 100644 --- a/doc/pub/Regression/html/._Regression-bs066.html +++ b/doc/pub/Regression/html/._Regression-bs066.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,35 +385,39 @@ MathJax.Hub.Config({ -

    Statistics, uncorrelated results

    +

    Statistics and sample variance

    - -

    -In the special case that the measurements of the sample are -uncorrelated (equivalently the stochastic variables \( X_i \) are -uncorrelated) we have that the off-diagonal elements of the covariance -are zero. This gives the following estimate of the sample error: +By the same procedure we can use the sample variance as an +estimate of the variance of any of the stochastic variables \( X_i \) $$ -\mathrm{err}_X^2=\frac{1}{n^2}\sum_{ij} \mathrm{cov}(X_i, X_j) = -\frac{1}{n^2} \sum_i \mathrm{var}(X_i), +\mathrm{var}(X_i)=\langle x_i - \langle x_i\rangle\rangle \approx \langle x_i - \bar x_n\rangle\nonumber, $$ -resulting in +which is approximated as $$ \begin{equation} -\mathrm{err}_X^2\approx \frac{1}{n^2} \sum_i \mathrm{var}(x)= \frac{1}{n}\mathrm{var}(x) -\tag{17} +\mathrm{var}(X_i)\approx \frac{1}{n}\sum_{k=1}^n (x_k - \bar x_n)=\mathrm{var}(x) +\tag{15} \end{equation} $$ -where in the second step we have used Eq. (15). -The error of the sample is then just its standard deviation divided by -the square root of the number of measurements the sample contains. -This is a very useful formula which is easy to compute. It acts as a -first approximation to the error, but in numerical experiments, we -cannot overlook the always present correlations. +

    +Now we can calculate an estimate of the error +\( \mathrm{err}_X^{\phantom X} \) of the sample mean \( \bar x_n \): +$$ +\begin{align} +\mathrm{err}_X^2 +&=\frac{1}{n^2}\sum_{ij} \mathrm{cov}(X_i, X_j) \nonumber \\ +&\approx&\frac{1}{n^2}\sum_{ij}\frac{1}{n}\mathrm{cov}(x) =\frac{1}{n^2}n^2\frac{1}{n}\mathrm{cov}(x)\nonumber\\ +&=\frac{1}{n}\mathrm{cov}(x) +\tag{16} +\end{align} +$$ + +which is nothing but the sample covariance divided by the number of +measurements in the sample.

    @@ -442,7 +448,7 @@ cannot overlook the always present correlations.
  • 75
  • 76
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs067.html b/doc/pub/Regression/html/._Regression-bs067.html index f94ac7265..40be051dd 100644 --- a/doc/pub/Regression/html/._Regression-bs067.html +++ b/doc/pub/Regression/html/._Regression-bs067.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,29 +385,35 @@ MathJax.Hub.Config({ -

    Statistics, computations

    +

    Statistics, uncorrelated results

    -For computational purposes one usually splits up the estimate of -\( \mathrm{err}_X^2 \), given by Eq. (16), into two -parts + +

    +In the special case that the measurements of the sample are +uncorrelated (equivalently the stochastic variables \( X_i \) are +uncorrelated) we have that the off-diagonal elements of the covariance +are zero. This gives the following estimate of the sample error: $$ -\mathrm{err}_X^2 = \frac{1}{n}\mathrm{var}(x) + \frac{1}{n}(\mathrm{cov}(x)-\mathrm{var}(x)), +\mathrm{err}_X^2=\frac{1}{n^2}\sum_{ij} \mathrm{cov}(X_i, X_j) = +\frac{1}{n^2} \sum_i \mathrm{var}(X_i), $$ -which equals +resulting in $$ \begin{equation} -\frac{1}{n^2}\sum_{k=1}^n (x_k - \bar x_n)^2 +\frac{2}{n^2}\sum_{k < l} (x_k - \bar x_n)(x_l - \bar x_n) -\tag{18} +\mathrm{err}_X^2\approx \frac{1}{n^2} \sum_i \mathrm{var}(x)= \frac{1}{n}\mathrm{var}(x) +\tag{17} \end{equation} $$ -The first term is the same as the error in the uncorrelated case, -Eq. (17). This means that the second -term accounts for the error correction due to correlation between the -measurements. For uncorrelated measurements this second term is zero. +where in the second step we have used Eq. (15). +The error of the sample is then just its standard deviation divided by +the square root of the number of measurements the sample contains. +This is a very useful formula which is easy to compute. It acts as a +first approximation to the error, but in numerical experiments, we +cannot overlook the always present correlations.

    @@ -436,7 +444,7 @@ measurements. For uncorrelated measurements this second term is zero.
  • 76
  • 77
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs068.html b/doc/pub/Regression/html/._Regression-bs068.html index 97ff76be5..b72e310e9 100644 --- a/doc/pub/Regression/html/._Regression-bs068.html +++ b/doc/pub/Regression/html/._Regression-bs068.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,22 +385,29 @@ MathJax.Hub.Config({ -

    Statistics, more on computations of errors

    +

    Statistics, computations

    -Computationally the uncorrelated first term is much easier to treat -efficiently than the second. +For computational purposes one usually splits up the estimate of +\( \mathrm{err}_X^2 \), given by Eq. (16), into two +parts $$ -\mathrm{var}(x) = \frac{1}{n}\sum_{k=1}^n (x_k - \bar x_n)^2 = -\left(\frac{1}{n}\sum_{k=1}^n x_k^2\right) - \bar x_n^2 +\mathrm{err}_X^2 = \frac{1}{n}\mathrm{var}(x) + \frac{1}{n}(\mathrm{cov}(x)-\mathrm{var}(x)), $$ -We just accumulate separately the values \( x^2 \) and \( x \) for every -measurement \( x \) we receive. The correlation term, though, has to be -calculated at the end of the experiment since we need all the -measurements to calculate the cross terms. Therefore, all measurements -have to be stored throughout the experiment. +which equals +$$ +\begin{equation} +\frac{1}{n^2}\sum_{k=1}^n (x_k - \bar x_n)^2 +\frac{2}{n^2}\sum_{k < l} (x_k - \bar x_n)(x_l - \bar x_n) +\tag{18} +\end{equation} +$$ + +The first term is the same as the error in the uncorrelated case, +Eq. (17). This means that the second +term accounts for the error correction due to correlation between the +measurements. For uncorrelated measurements this second term is zero.

    @@ -429,7 +438,7 @@ have to be stored throughout the experiment.
  • 77
  • 78
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs069.html b/doc/pub/Regression/html/._Regression-bs069.html index f7e050e27..1f9f35c4e 100644 --- a/doc/pub/Regression/html/._Regression-bs069.html +++ b/doc/pub/Regression/html/._Regression-bs069.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,33 +385,22 @@ MathJax.Hub.Config({ -

    Statistics, wrapping up 1

    +

    Statistics, more on computations of errors

    -Let us analyze the problem by splitting up the correlation term into -partial sums of the form: +Computationally the uncorrelated first term is much easier to treat +efficiently than the second. $$ -f_d = \frac{1}{n-d}\sum_{k=1}^{n-d}(x_k - \bar x_n)(x_{k+d} - \bar x_n) +\mathrm{var}(x) = \frac{1}{n}\sum_{k=1}^n (x_k - \bar x_n)^2 = +\left(\frac{1}{n}\sum_{k=1}^n x_k^2\right) - \bar x_n^2 $$ -The correlation term of the error can now be rewritten in terms of -\( f_d \) -$$ -\frac{2}{n}\sum_{k < l} (x_k - \bar x_n)(x_l - \bar x_n) = -2\sum_{d=1}^{n-1} f_d -$$ - -The value of \( f_d \) reflects the correlation between measurements -separated by the distance \( d \) in the sample samples. Notice that for -\( d=0 \), \( f \) is just the sample variance, \( \mathrm{var}(x) \). If we divide \( f_d \) -by \( \mathrm{var}(x) \), we arrive at the so called autocorrelation function -$$ -\kappa_d = \frac{f_d}{\mathrm{var}(x)} -$$ - -which gives us a useful measure of pairwise correlations -starting always at \( 1 \) for \( d=0 \). +We just accumulate separately the values \( x^2 \) and \( x \) for every +measurement \( x \) we receive. The correlation term, though, has to be +calculated at the end of the experiment since we need all the +measurements to calculate the cross terms. Therefore, all measurements +have to be stored throughout the experiment.

    @@ -440,7 +431,7 @@ starting always at \( 1 \) for \( d=0 \).
  • 78
  • 79
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs070.html b/doc/pub/Regression/html/._Regression-bs070.html index bd0dcd1f0..6550c0bc5 100644 --- a/doc/pub/Regression/html/._Regression-bs070.html +++ b/doc/pub/Regression/html/._Regression-bs070.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,33 +385,33 @@ MathJax.Hub.Config({ -

    Statistics, final expression

    +

    Statistics, wrapping up 1

    -The sample error (see eq. (18)) can now be -written in terms of the autocorrelation function: +Let us analyze the problem by splitting up the correlation term into +partial sums of the form: $$ -\begin{align} -\mathrm{err}_X^2 &= -\frac{1}{n}\mathrm{var}(x)+\frac{2}{n}\cdot\mathrm{var}(x)\sum_{d=1}^{n-1} -\frac{f_d}{\mathrm{var}(x)}\nonumber\\ &=& -\left(1+2\sum_{d=1}^{n-1}\kappa_d\right)\frac{1}{n}\mathrm{var}(x)\nonumber\\ -&=\frac{\tau}{n}\cdot\mathrm{var}(x) -\tag{19} -\end{align} +f_d = \frac{1}{n-d}\sum_{k=1}^{n-d}(x_k - \bar x_n)(x_{k+d} - \bar x_n) $$ -and we see that \( \mathrm{err}_X \) can be expressed in terms the -uncorrelated sample variance times a correction factor \( \tau \) which -accounts for the correlation between measurements. We call this -correction factor the autocorrelation time: +The correlation term of the error can now be rewritten in terms of +\( f_d \) $$ -\begin{equation} -\tau = 1+2\sum_{d=1}^{n-1}\kappa_d -\tag{20} -\end{equation} +\frac{2}{n}\sum_{k < l} (x_k - \bar x_n)(x_l - \bar x_n) = +2\sum_{d=1}^{n-1} f_d $$ + +The value of \( f_d \) reflects the correlation between measurements +separated by the distance \( d \) in the sample samples. Notice that for +\( d=0 \), \( f \) is just the sample variance, \( \mathrm{var}(x) \). If we divide \( f_d \) +by \( \mathrm{var}(x) \), we arrive at the so called autocorrelation function +$$ +\kappa_d = \frac{f_d}{\mathrm{var}(x)} +$$ + +which gives us a useful measure of pairwise correlations +starting always at \( 1 \) for \( d=0 \).

    @@ -440,7 +442,7 @@ $$
  • 79
  • 80
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs071.html b/doc/pub/Regression/html/._Regression-bs071.html index c8cada5d7..400f67d6f 100644 --- a/doc/pub/Regression/html/._Regression-bs071.html +++ b/doc/pub/Regression/html/._Regression-bs071.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,25 +385,33 @@ MathJax.Hub.Config({ -

    Statistics, effective number of correlations

    +

    Statistics, final expression

    -For a correlation free experiment, \( \tau \) -equals 1. From the point of view of -eq. (19) we can interpret a sequential -correlation as an effective reduction of the number of measurements by -a factor \( \tau \). The effective number of measurements becomes: +The sample error (see eq. (18)) can now be +written in terms of the autocorrelation function: $$ -n_\mathrm{eff} = \frac{n}{\tau} +\begin{align} +\mathrm{err}_X^2 &= +\frac{1}{n}\mathrm{var}(x)+\frac{2}{n}\cdot\mathrm{var}(x)\sum_{d=1}^{n-1} +\frac{f_d}{\mathrm{var}(x)}\nonumber\\ &=& +\left(1+2\sum_{d=1}^{n-1}\kappa_d\right)\frac{1}{n}\mathrm{var}(x)\nonumber\\ +&=\frac{\tau}{n}\cdot\mathrm{var}(x) +\tag{19} +\end{align} $$ -To neglect the autocorrelation time \( \tau \) will always cause our -simple uncorrelated estimate of \( \mathrm{err}_X^2\approx \mathrm{var}(x)/n \) to -be less than the true sample error. The estimate of the error will be -too good. On the other hand, the calculation of the full -autocorrelation time poses an efficiency problem if the set of -measurements is very large. +and we see that \( \mathrm{err}_X \) can be expressed in terms the +uncorrelated sample variance times a correction factor \( \tau \) which +accounts for the correlation between measurements. We call this +correction factor the autocorrelation time: +$$ +\begin{equation} +\tau = 1+2\sum_{d=1}^{n-1}\kappa_d +\tag{20} +\end{equation} +$$

    @@ -432,7 +442,7 @@ measurements is very large.
  • 80
  • 81
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs072.html b/doc/pub/Regression/html/._Regression-bs072.html index 07713ece8..72ff75380 100644 --- a/doc/pub/Regression/html/._Regression-bs072.html +++ b/doc/pub/Regression/html/._Regression-bs072.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -381,42 +383,30 @@ MathJax.Hub.Config({

     

     

     

    - + -

    Linking the regression analysis with a statistical interpretation

    - -

    -Finally, we are going to discuss several statistical properties which can be obtained in terms of analytical expressions. -The -advantage of doing linear regression is that we actually end up with -analytical expressions for several statistical quantities. -Standard least squares and Ridge regression allow us to -derive quantities like the variance and other expectation values in a -rather straightforward way. - -

    -It is assumed that \( \varepsilon_i -\sim \mathcal{N}(0, \sigma^2) \) and the \( \varepsilon_{i} \) are -independent, i.e.: +

    Statistics, effective number of correlations

    +
    +
    +

    +For a correlation free experiment, \( \tau \) +equals 1. From the point of view of +eq. (19) we can interpret a sequential +correlation as an effective reduction of the number of measurements by +a factor \( \tau \). The effective number of measurements becomes: $$ -\begin{align*} -\mbox{Cov}(\varepsilon_{i_1}, -\varepsilon_{i_2}) & = \left\{ \begin{array}{lcc} \sigma^2 & \mbox{if} -& i_1 = i_2, \\ 0 & \mbox{if} & i_1 \not= i_2. \end{array} \right. -\end{align*} +n_\mathrm{eff} = \frac{n}{\tau} $$ -The randomness of \( \varepsilon_i \) implies that -\( \mathbf{y}_i \) is also a random variable. In particular, -\( \mathbf{y}_i \) is normally distributed, because \( \varepsilon_i \sim -\mathcal{N}(0, \sigma^2) \) and \( \mathbf{X}_{i,\ast} \, \boldsymbol{\beta} \) is a -non-random scalar. To specify the parameters of the distribution of -\( \mathbf{y}_i \) we need to calculate its first two moments. +To neglect the autocorrelation time \( \tau \) will always cause our +simple uncorrelated estimate of \( \mathrm{err}_X^2\approx \mathrm{var}(x)/n \) to +be less than the true sample error. The estimate of the error will be +too good. On the other hand, the calculation of the full +autocorrelation time poses an efficiency problem if the set of +measurements is very large. +

    +
    -

    -Recall that \( \boldsymbol{X} \) is a matrix of dimensionality \( n\times p \). The -notation above \( \mathbf{X}_{i,\ast} \) means that we are looking at the -row number \( i \) and perform a sum over all values \( p \).

    @@ -444,7 +434,7 @@ row number \( i \) and perform a sum over all values \( p \).

  • 81
  • 82
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs073.html b/doc/pub/Regression/html/._Regression-bs073.html index ebcb6cf6c..cb69fa2c4 100644 --- a/doc/pub/Regression/html/._Regression-bs073.html +++ b/doc/pub/Regression/html/._Regression-bs073.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -381,25 +383,43 @@ MathJax.Hub.Config({

     

     

     

    - + -

    Assumptions made

    +

    Linking the regression analysis with a statistical interpretation

    -The assumption we have made here can be summarized as (and this is going to useful when we discuss the bias-variance trade off) -that there exists a function \( f(\boldsymbol{x}) \) and a normal distributed error \( \boldsymbol{\varepsilon}\sim \mathcal{N}(0, \sigma^2) \) -which describes our data -$$ -\boldsymbol{y} = f(\boldsymbol{x})+\boldsymbol{\varepsilon} -$$ +Finally, we are going to discuss several statistical properties which can be obtained in terms of analytical expressions. +The +advantage of doing linear regression is that we actually end up with +analytical expressions for several statistical quantities. +Standard least squares and Ridge regression allow us to +derive quantities like the variance and other expectation values in a +rather straightforward way.

    -We approximate this function with our model from the solution of the linear regression equations, that is our -function \( f \) is approximated by \( \boldsymbol{\tilde{y}} \) where we want to minimize \( (\boldsymbol{y}-\boldsymbol{\tilde{y}})^2 \), our MSE, with +It is assumed that \( \varepsilon_i +\sim \mathcal{N}(0, \sigma^2) \) and the \( \varepsilon_{i} \) are +independent, i.e.: $$ -\boldsymbol{\tilde{y}} = \boldsymbol{X}\boldsymbol{\beta}. +\begin{align*} +\mbox{Cov}(\varepsilon_{i_1}, +\varepsilon_{i_2}) & = \left\{ \begin{array}{lcc} \sigma^2 & \mbox{if} +& i_1 = i_2, \\ 0 & \mbox{if} & i_1 \not= i_2. \end{array} \right. +\end{align*} $$ +The randomness of \( \varepsilon_i \) implies that +\( \mathbf{y}_i \) is also a random variable. In particular, +\( \mathbf{y}_i \) is normally distributed, because \( \varepsilon_i \sim +\mathcal{N}(0, \sigma^2) \) and \( \mathbf{X}_{i,\ast} \, \boldsymbol{\beta} \) is a +non-random scalar. To specify the parameters of the distribution of +\( \mathbf{y}_i \) we need to calculate its first two moments. + +

    +Recall that \( \boldsymbol{X} \) is a matrix of dimensionality \( n\times p \). The +notation above \( \mathbf{X}_{i,\ast} \) means that we are looking at the +row number \( i \) and perform a sum over all values \( p \). +

    @@ -426,7 +446,7 @@ $$

  • 82
  • 83
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs074.html b/doc/pub/Regression/html/._Regression-bs074.html index 0732b2c11..6062209ce 100644 --- a/doc/pub/Regression/html/._Regression-bs074.html +++ b/doc/pub/Regression/html/._Regression-bs074.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,38 +385,23 @@ MathJax.Hub.Config({ -

    Expectation value and variance

    +

    Assumptions made

    -We can calculate the expectation value of \( \boldsymbol{y} \) for a given element \( i \) +The assumption we have made here can be summarized as (and this is going to useful when we discuss the bias-variance trade off) +that there exists a function \( f(\boldsymbol{x}) \) and a normal distributed error \( \boldsymbol{\varepsilon}\sim \mathcal{N}(0, \sigma^2) \) +which describes our data $$ -\begin{align*} -\mathbb{E}(y_i) & = -\mathbb{E}(\mathbf{X}_{i, \ast} \, \boldsymbol{\beta}) + \mathbb{E}(\varepsilon_i) -\, \, \, = \, \, \, \mathbf{X}_{i, \ast} \, \beta, -\end{align*} +\boldsymbol{y} = f(\boldsymbol{x})+\boldsymbol{\varepsilon} $$ -while -its variance is +

    +We approximate this function with our model from the solution of the linear regression equations, that is our +function \( f \) is approximated by \( \boldsymbol{\tilde{y}} \) where we want to minimize \( (\boldsymbol{y}-\boldsymbol{\tilde{y}})^2 \), our MSE, with $$ -\begin{align*} \mbox{Var}(y_i) & = \mathbb{E} \{ [y_i -- \mathbb{E}(y_i)]^2 \} \, \, \, = \, \, \, \mathbb{E} ( y_i^2 ) - -[\mathbb{E}(y_i)]^2 \\ & = \mathbb{E} [ ( \mathbf{X}_{i, \ast} \, -\beta + \varepsilon_i )^2] - ( \mathbf{X}_{i, \ast} \, \boldsymbol{\beta})^2 \\ & -= \mathbb{E} [ ( \mathbf{X}_{i, \ast} \, \boldsymbol{\beta})^2 + 2 \varepsilon_i -\mathbf{X}_{i, \ast} \, \boldsymbol{\beta} + \varepsilon_i^2 ] - ( \mathbf{X}_{i, -\ast} \, \beta)^2 \\ & = ( \mathbf{X}_{i, \ast} \, \boldsymbol{\beta})^2 + 2 -\mathbb{E}(\varepsilon_i) \mathbf{X}_{i, \ast} \, \boldsymbol{\beta} + -\mathbb{E}(\varepsilon_i^2 ) - ( \mathbf{X}_{i, \ast} \, \boldsymbol{\beta})^2 -\\ & = \mathbb{E}(\varepsilon_i^2 ) \, \, \, = \, \, \, -\mbox{Var}(\varepsilon_i) \, \, \, = \, \, \, \sigma^2. -\end{align*} +\boldsymbol{\tilde{y}} = \boldsymbol{X}\boldsymbol{\beta}. $$ -Hence, \( y_i \sim \mathcal{N}( \mathbf{X}_{i, \ast} \, \boldsymbol{\beta}, \sigma^2) \), that is \( \boldsymbol{y} \) follows a normal distribution with -mean value \( \boldsymbol{X}\boldsymbol{\beta} \) and variance \( \sigma^2 \) (not be confused with the singular values of the SVD). -

    @@ -441,7 +428,7 @@ mean value \( \boldsymbol{X}\boldsymbol{\beta} \) and variance \( \sigma^2 \) (n

  • 83
  • 84
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs075.html b/doc/pub/Regression/html/._Regression-bs075.html index 0af6f2aa2..66605e118 100644 --- a/doc/pub/Regression/html/._Regression-bs075.html +++ b/doc/pub/Regression/html/._Regression-bs075.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,87 +385,37 @@ MathJax.Hub.Config({ -

    Expectation value and variance for \( \boldsymbol{\beta} \)

    +

    Expectation value and variance

    -With the OLS expressions for the parameters \( \boldsymbol{\beta} \) we can evaluate the expectation value +We can calculate the expectation value of \( \boldsymbol{y} \) for a given element \( i \) $$ -\mathbb{E}(\boldsymbol{\beta}) = \mathbb{E}[ (\mathbf{X}^{\top} \mathbf{X})^{-1}\mathbf{X}^{T} \mathbf{Y}]=(\mathbf{X}^{T} \mathbf{X})^{-1}\mathbf{X}^{T} \mathbb{E}[ \mathbf{Y}]=(\mathbf{X}^{T} \mathbf{X})^{-1} \mathbf{X}^{T}\mathbf{X}\boldsymbol{\beta}=\boldsymbol{\beta}. +\begin{align*} +\mathbb{E}(y_i) & = +\mathbb{E}(\mathbf{X}_{i, \ast} \, \boldsymbol{\beta}) + \mathbb{E}(\varepsilon_i) +\, \, \, = \, \, \, \mathbf{X}_{i, \ast} \, \beta, +\end{align*} $$ -This means that the estimator of the regression parameters is unbiased. - -

    -We can also calculate the variance - -

    -The variance of \( \boldsymbol{\beta} \) is +while +its variance is $$ -\begin{eqnarray*} -\mbox{Var}(\boldsymbol{\beta}) & = & \mathbb{E} \{ [\boldsymbol{\beta} - \mathbb{E}(\boldsymbol{\beta})] [\boldsymbol{\beta} - \mathbb{E}(\boldsymbol{\beta})]^{T} \} -\\ -& = & \mathbb{E} \{ [(\mathbf{X}^{T} \mathbf{X})^{-1} \, \mathbf{X}^{T} \mathbf{Y} - \boldsymbol{\beta}] \, [(\mathbf{X}^{T} \mathbf{X})^{-1} \, \mathbf{X}^{T} \mathbf{Y} - \boldsymbol{\beta}]^{T} \} -\\ -% & = & \mathbb{E} \{ [(\mathbf{X}^{T} \mathbf{X})^{-1} \, \mathbf{X}^{T} \mathbf{Y}] \, [(\mathbf{X}^{T} \mathbf{X})^{-1} \, \mathbf{X}^{T} \mathbf{Y}]^{T} \} - \boldsymbol{\beta} \, \boldsymbol{\beta}^{T} -% \\ -% & = & \mathbb{E} \{ (\mathbf{X}^{T} \mathbf{X})^{-1} \, \mathbf{X}^{T} \mathbf{Y} \, \mathbf{Y}^{T} \, \mathbf{X} \, (\mathbf{X}^{T} \mathbf{X})^{-1} \} - \boldsymbol{\beta} \, \boldsymbol{\beta}^{T} -% \\ -& = & (\mathbf{X}^{T} \mathbf{X})^{-1} \, \mathbf{X}^{T} \, \mathbb{E} \{ \mathbf{Y} \, \mathbf{Y}^{T} \} \, \mathbf{X} \, (\mathbf{X}^{T} \mathbf{X})^{-1} - \boldsymbol{\beta} \, \boldsymbol{\beta}^{T} -\\ -& = & (\mathbf{X}^{T} \mathbf{X})^{-1} \, \mathbf{X}^{T} \, \{ \mathbf{X} \, \boldsymbol{\beta} \, \boldsymbol{\beta}^{T} \, \mathbf{X}^{T} + \sigma^2 \} \, \mathbf{X} \, (\mathbf{X}^{T} \mathbf{X})^{-1} - \boldsymbol{\beta} \, \boldsymbol{\beta}^{T} -% \\ -% & = & (\mathbf{X}^T \mathbf{X})^{-1} \, \mathbf{X}^T \, \mathbf{X} \, \boldsymbol{\beta} \, \boldsymbol{\beta}^T \, \mathbf{X}^T \, \mathbf{X} \, (\mathbf{X}^T % \mathbf{X})^{-1} -% \\ -% & & + \, \, \sigma^2 \, (\mathbf{X}^T \mathbf{X})^{-1} \, \mathbf{X}^T \, \mathbf{X} \, (\mathbf{X}^T \mathbf{X})^{-1} - \boldsymbol{\beta} \boldsymbol{\beta}^T -\\ -& = & \boldsymbol{\beta} \, \boldsymbol{\beta}^{T} + \sigma^2 \, (\mathbf{X}^{T} \mathbf{X})^{-1} - \boldsymbol{\beta} \, \boldsymbol{\beta}^{T} -\, \, \, = \, \, \, \sigma^2 \, (\mathbf{X}^{T} \mathbf{X})^{-1}, -\end{eqnarray*} +\begin{align*} \mbox{Var}(y_i) & = \mathbb{E} \{ [y_i +- \mathbb{E}(y_i)]^2 \} \, \, \, = \, \, \, \mathbb{E} ( y_i^2 ) - +[\mathbb{E}(y_i)]^2 \\ & = \mathbb{E} [ ( \mathbf{X}_{i, \ast} \, +\beta + \varepsilon_i )^2] - ( \mathbf{X}_{i, \ast} \, \boldsymbol{\beta})^2 \\ & += \mathbb{E} [ ( \mathbf{X}_{i, \ast} \, \boldsymbol{\beta})^2 + 2 \varepsilon_i +\mathbf{X}_{i, \ast} \, \boldsymbol{\beta} + \varepsilon_i^2 ] - ( \mathbf{X}_{i, +\ast} \, \beta)^2 \\ & = ( \mathbf{X}_{i, \ast} \, \boldsymbol{\beta})^2 + 2 +\mathbb{E}(\varepsilon_i) \mathbf{X}_{i, \ast} \, \boldsymbol{\beta} + +\mathbb{E}(\varepsilon_i^2 ) - ( \mathbf{X}_{i, \ast} \, \boldsymbol{\beta})^2 +\\ & = \mathbb{E}(\varepsilon_i^2 ) \, \, \, = \, \, \, +\mbox{Var}(\varepsilon_i) \, \, \, = \, \, \, \sigma^2. +\end{align*} $$ -

    -where we have used that \( \mathbb{E} (\mathbf{Y} \mathbf{Y}^{T}) = -\mathbf{X} \, \boldsymbol{\beta} \, \boldsymbol{\beta}^{T} \, \mathbf{X}^{T} + -\sigma^2 \, \mathbf{I}_{nn} \). From \( \mbox{Var}(\boldsymbol{\beta}) = \sigma^2 -\, (\mathbf{X}^{T} \mathbf{X})^{-1} \), one obtains an estimate of the -variance of the estimate of the \( j \)-th regression coefficient: -\( \hat{\sigma}^2 (\hat{\beta}_j ) = \hat{\sigma}^2 \sqrt{ -[(\mathbf{X}^{T} \mathbf{X})^{-1}]_{jj} } \). This may be used to -construct a confidence interval for the estimates. - -

    -In a similar way, we cna obtain analytical expressions for say the -expectation values of the parameters \( \boldsymbol{\beta} \) and their variance -when we employ Ridge regression, and thereby a confidence interval. - -

    -It is rather straightforward to show that -$$ -\mathbb{E} \big[ \boldsymbol{\beta}^{\mathrm{Ridge}} \big]=(\mathbf{X}^{T} \mathbf{X} + \lambda \mathbf{I}_{pp})^{-1} (\mathbf{X}^{\top} \mathbf{X})\boldsymbol{\beta}^{\mathrm{OLS}}. -$$ - -We see clearly that -\( \mathbb{E} \big[ \boldsymbol{\beta}^{\mathrm{Ridge}} \big] \not= \boldsymbol{\beta}^{\mathrm{OLS}} \) for any \( \lambda > 0 \). We say then that the ridge estimator is biased. - -

    -We can also compute the variance as - -$$ -\mbox{Var}[\boldsymbol{\beta}^{\mathrm{Ridge}}]=\sigma^2[ \mathbf{X}^{T} \mathbf{X} + \lambda \mathbf{I} ]^{-1} \mathbf{X}^{T} \mathbf{X} \{ [ \mathbf{X}^{\top} \mathbf{X} + \lambda \mathbf{I} ]^{-1}\}^{T}, -$$ - -and it is easy to see that if the parameter \( \lambda \) goes to infinity then the variance of Ridge parameters \( \boldsymbol{\beta} \) goes to zero. - -

    -With this, we can compute the difference - -$$ -\mbox{Var}[\boldsymbol{\beta}^{\mathrm{OLS}}]-\mbox{Var}(\boldsymbol{\beta}^{\mathrm{Ridge}})=\sigma^2 [ \mathbf{X}^{T} \mathbf{X} + \lambda \mathbf{I} ]^{-1}[ 2\lambda\mathbf{I} + \lambda^2 (\mathbf{X}^{T} \mathbf{X})^{-1} ] \{ [ \mathbf{X}^{T} \mathbf{X} + \lambda \mathbf{I} ]^{-1}\}^{T}. -$$ - -The difference is non-negative definite since each component of the -matrix product is non-negative definite. -This means the variance we obtain with the standard OLS will always for \( \lambda > 0 \) be larger than the variance of \( \boldsymbol{\beta} \) obtained with the Ridge estimator. This has interesting consequences when we discuss the so-called bias-variance trade-off below. +Hence, \( y_i \sim \mathcal{N}( \mathbf{X}_{i, \ast} \, \boldsymbol{\beta}, \sigma^2) \), that is \( \boldsymbol{y} \) follows a normal distribution with +mean value \( \boldsymbol{X}\boldsymbol{\beta} \) and variance \( \sigma^2 \) (not be confused with the singular values of the SVD).

    @@ -491,7 +443,7 @@ This means the variance we obtain with the standard OLS will always for \( \lamb

  • 84
  • 85
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs076.html b/doc/pub/Regression/html/._Regression-bs076.html index 435769825..9cf35b596 100644 --- a/doc/pub/Regression/html/._Regression-bs076.html +++ b/doc/pub/Regression/html/._Regression-bs076.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -381,38 +383,89 @@ MathJax.Hub.Config({

     

     

     

    - + -

    Cross-validation

    +

    Expectation value and variance for \( \boldsymbol{\beta} \)

    -Instead of choosing the penalty parameter to balance model fit with -model complexity, cross-validation requires it (i.e. the penalty -parameter) to yield a model with good prediction -performance. Commonly, this performance is evaluated on novel -data. Novel data need not be easy to come by and one has to make do -with the data at hand. +With the OLS expressions for the parameters \( \boldsymbol{\beta} \) we can evaluate the expectation value +$$ +\mathbb{E}(\boldsymbol{\beta}) = \mathbb{E}[ (\mathbf{X}^{\top} \mathbf{X})^{-1}\mathbf{X}^{T} \mathbf{Y}]=(\mathbf{X}^{T} \mathbf{X})^{-1}\mathbf{X}^{T} \mathbb{E}[ \mathbf{Y}]=(\mathbf{X}^{T} \mathbf{X})^{-1} \mathbf{X}^{T}\mathbf{X}\boldsymbol{\beta}=\boldsymbol{\beta}. +$$ + +This means that the estimator of the regression parameters is unbiased.

    -The setting of original and novel data is -then mimicked by sample splitting: the data set is divided into two -(groups of samples). One of these two data sets, called the -training set, plays the role of original data on which the model is -built. The second of these data sets, called the test set, plays the -role of the novel data and is used to evaluate the prediction -performance (often operationalized as the log-likelihood or the -prediction error or its square or the R2 score) of the model built on the training data set. This -procedure (model building and prediction evaluation on training and -test set, respectively) is done for a collection of possible penalty -parameter choices. The penalty parameter that yields the model with -the best prediction performance is to be preferred. The thus obtained -performance evaluation depends on the actual split of the data set. To -remove this dependence the data set is split many times into a -training and test set. For each split the model parameters are -estimated for all choices of \( \lambda \) using the training data and -estimated parameters are evaluated on the corresponding test set. The -penalty parameter that on average over the test sets performs best (in -some sense) is then selected. +We can also calculate the variance + +

    +The variance of \( \boldsymbol{\beta} \) is +$$ +\begin{eqnarray*} +\mbox{Var}(\boldsymbol{\beta}) & = & \mathbb{E} \{ [\boldsymbol{\beta} - \mathbb{E}(\boldsymbol{\beta})] [\boldsymbol{\beta} - \mathbb{E}(\boldsymbol{\beta})]^{T} \} +\\ +& = & \mathbb{E} \{ [(\mathbf{X}^{T} \mathbf{X})^{-1} \, \mathbf{X}^{T} \mathbf{Y} - \boldsymbol{\beta}] \, [(\mathbf{X}^{T} \mathbf{X})^{-1} \, \mathbf{X}^{T} \mathbf{Y} - \boldsymbol{\beta}]^{T} \} +\\ +% & = & \mathbb{E} \{ [(\mathbf{X}^{T} \mathbf{X})^{-1} \, \mathbf{X}^{T} \mathbf{Y}] \, [(\mathbf{X}^{T} \mathbf{X})^{-1} \, \mathbf{X}^{T} \mathbf{Y}]^{T} \} - \boldsymbol{\beta} \, \boldsymbol{\beta}^{T} +% \\ +% & = & \mathbb{E} \{ (\mathbf{X}^{T} \mathbf{X})^{-1} \, \mathbf{X}^{T} \mathbf{Y} \, \mathbf{Y}^{T} \, \mathbf{X} \, (\mathbf{X}^{T} \mathbf{X})^{-1} \} - \boldsymbol{\beta} \, \boldsymbol{\beta}^{T} +% \\ +& = & (\mathbf{X}^{T} \mathbf{X})^{-1} \, \mathbf{X}^{T} \, \mathbb{E} \{ \mathbf{Y} \, \mathbf{Y}^{T} \} \, \mathbf{X} \, (\mathbf{X}^{T} \mathbf{X})^{-1} - \boldsymbol{\beta} \, \boldsymbol{\beta}^{T} +\\ +& = & (\mathbf{X}^{T} \mathbf{X})^{-1} \, \mathbf{X}^{T} \, \{ \mathbf{X} \, \boldsymbol{\beta} \, \boldsymbol{\beta}^{T} \, \mathbf{X}^{T} + \sigma^2 \} \, \mathbf{X} \, (\mathbf{X}^{T} \mathbf{X})^{-1} - \boldsymbol{\beta} \, \boldsymbol{\beta}^{T} +% \\ +% & = & (\mathbf{X}^T \mathbf{X})^{-1} \, \mathbf{X}^T \, \mathbf{X} \, \boldsymbol{\beta} \, \boldsymbol{\beta}^T \, \mathbf{X}^T \, \mathbf{X} \, (\mathbf{X}^T % \mathbf{X})^{-1} +% \\ +% & & + \, \, \sigma^2 \, (\mathbf{X}^T \mathbf{X})^{-1} \, \mathbf{X}^T \, \mathbf{X} \, (\mathbf{X}^T \mathbf{X})^{-1} - \boldsymbol{\beta} \boldsymbol{\beta}^T +\\ +& = & \boldsymbol{\beta} \, \boldsymbol{\beta}^{T} + \sigma^2 \, (\mathbf{X}^{T} \mathbf{X})^{-1} - \boldsymbol{\beta} \, \boldsymbol{\beta}^{T} +\, \, \, = \, \, \, \sigma^2 \, (\mathbf{X}^{T} \mathbf{X})^{-1}, +\end{eqnarray*} +$$ + +

    +where we have used that \( \mathbb{E} (\mathbf{Y} \mathbf{Y}^{T}) = +\mathbf{X} \, \boldsymbol{\beta} \, \boldsymbol{\beta}^{T} \, \mathbf{X}^{T} + +\sigma^2 \, \mathbf{I}_{nn} \). From \( \mbox{Var}(\boldsymbol{\beta}) = \sigma^2 +\, (\mathbf{X}^{T} \mathbf{X})^{-1} \), one obtains an estimate of the +variance of the estimate of the \( j \)-th regression coefficient: +\( \hat{\sigma}^2 (\hat{\beta}_j ) = \hat{\sigma}^2 \sqrt{ +[(\mathbf{X}^{T} \mathbf{X})^{-1}]_{jj} } \). This may be used to +construct a confidence interval for the estimates. + +

    +In a similar way, we cna obtain analytical expressions for say the +expectation values of the parameters \( \boldsymbol{\beta} \) and their variance +when we employ Ridge regression, and thereby a confidence interval. + +

    +It is rather straightforward to show that +$$ +\mathbb{E} \big[ \boldsymbol{\beta}^{\mathrm{Ridge}} \big]=(\mathbf{X}^{T} \mathbf{X} + \lambda \mathbf{I}_{pp})^{-1} (\mathbf{X}^{\top} \mathbf{X})\boldsymbol{\beta}^{\mathrm{OLS}}. +$$ + +We see clearly that +\( \mathbb{E} \big[ \boldsymbol{\beta}^{\mathrm{Ridge}} \big] \not= \boldsymbol{\beta}^{\mathrm{OLS}} \) for any \( \lambda > 0 \). We say then that the ridge estimator is biased. + +

    +We can also compute the variance as + +$$ +\mbox{Var}[\boldsymbol{\beta}^{\mathrm{Ridge}}]=\sigma^2[ \mathbf{X}^{T} \mathbf{X} + \lambda \mathbf{I} ]^{-1} \mathbf{X}^{T} \mathbf{X} \{ [ \mathbf{X}^{\top} \mathbf{X} + \lambda \mathbf{I} ]^{-1}\}^{T}, +$$ + +and it is easy to see that if the parameter \( \lambda \) goes to infinity then the variance of Ridge parameters \( \boldsymbol{\beta} \) goes to zero. + +

    +With this, we can compute the difference + +$$ +\mbox{Var}[\boldsymbol{\beta}^{\mathrm{OLS}}]-\mbox{Var}(\boldsymbol{\beta}^{\mathrm{Ridge}})=\sigma^2 [ \mathbf{X}^{T} \mathbf{X} + \lambda \mathbf{I} ]^{-1}[ 2\lambda\mathbf{I} + \lambda^2 (\mathbf{X}^{T} \mathbf{X})^{-1} ] \{ [ \mathbf{X}^{T} \mathbf{X} + \lambda \mathbf{I} ]^{-1}\}^{T}. +$$ + +The difference is non-negative definite since each component of the +matrix product is non-negative definite. +This means the variance we obtain with the standard OLS will always for \( \lambda > 0 \) be larger than the variance of \( \boldsymbol{\beta} \) obtained with the Ridge estimator. This has interesting consequences when we discuss the so-called bias-variance trade-off below.

    @@ -440,7 +493,7 @@ some sense) is then selected.

  • 85
  • 86
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs077.html b/doc/pub/Regression/html/._Regression-bs077.html index 61ce3a51d..c70cc9b54 100644 --- a/doc/pub/Regression/html/._Regression-bs077.html +++ b/doc/pub/Regression/html/._Regression-bs077.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -381,18 +383,40 @@ MathJax.Hub.Config({

     

     

     

    - + -

    Computationally expensive

    +

    Cross-validation

    -The validation set approach is conceptually simple and is easy to implement. But it has two potential drawbacks: +Instead of choosing the penalty parameter to balance model fit with +model complexity, cross-validation requires it (i.e. the penalty +parameter) to yield a model with good prediction +performance. Commonly, this performance is evaluated on novel +data. Novel data need not be easy to come by and one has to make do +with the data at hand. -

    +

    +The setting of original and novel data is +then mimicked by sample splitting: the data set is divided into two +(groups of samples). One of these two data sets, called the +training set, plays the role of original data on which the model is +built. The second of these data sets, called the test set, plays the +role of the novel data and is used to evaluate the prediction +performance (often operationalized as the log-likelihood or the +prediction error or its square or the R2 score) of the model built on the training data set. This +procedure (model building and prediction evaluation on training and +test set, respectively) is done for a collection of possible penalty +parameter choices. The penalty parameter that yields the model with +the best prediction performance is to be preferred. The thus obtained +performance evaluation depends on the actual split of the data set. To +remove this dependence the data set is split many times into a +training and test set. For each split the model parameters are +estimated for all choices of \( \lambda \) using the training data and +estimated parameters are evaluated on the corresponding test set. The +penalty parameter that on average over the test sets performs best (in +some sense) is then selected. +

    diff --git a/doc/pub/Regression/html/._Regression-bs078.html b/doc/pub/Regression/html/._Regression-bs078.html index 355b00f66..2cd3ee925 100644 --- a/doc/pub/Regression/html/._Regression-bs078.html +++ b/doc/pub/Regression/html/._Regression-bs078.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -381,27 +383,18 @@ MathJax.Hub.Config({

     

     

     

    - + -

    Various steps in cross-validation

    +

    Computationally expensive

    -When the repetitive splitting of the data set is done randomly, -samples may accidently end up in a fast majority of the splits in -either training or test set. Such samples may have an unbalanced -influence on either model building or prediction evaluation. To avoid -this \( k \)-fold cross-validation structures the data splitting. The -samples are divided into \( k \) more or less equally sized exhaustive and -mutually exclusive subsets. In turn (at each split) one of these -subsets plays the role of the test set while the union of the -remaining subsets constitutes the training set. Such a splitting -warrants a balanced representation of each sample in both training and -test set over the splits. Still the division into the \( k \) subsets -involves a degree of randomness. This may be fully excluded when -choosing \( k=n \). This particular case is referred to as leave-one-out -cross-validation (LOOCV). +The validation set approach is conceptually simple and is easy to implement. But it has two potential drawbacks: + +

    -

    diff --git a/doc/pub/Regression/html/._Regression-bs079.html b/doc/pub/Regression/html/._Regression-bs079.html index b0555066c..00856fbe6 100644 --- a/doc/pub/Regression/html/._Regression-bs079.html +++ b/doc/pub/Regression/html/._Regression-bs079.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,40 +385,25 @@ MathJax.Hub.Config({ -

    How to set up the cross-validation for Ridge and/or Lasso

    +

    Various steps in cross-validation

    - - -$$ -\begin{align*} -\boldsymbol{\beta}_{-i}(\lambda) & = ( \boldsymbol{X}_{-i, \ast}^{T} -\boldsymbol{X}_{-i, \ast} + \lambda \boldsymbol{I}_{pp})^{-1} -\boldsymbol{X}_{-i, \ast}^{T} \boldsymbol{y}_{-i} -\end{align*} -$$ - - - - -$$ -\begin{align*} -\frac{1}{n} \sum_{i = 1}^n \log\{L[y_i, \mathbf{X}_{i, \ast}; \boldsymbol{\beta}_{-i}(\lambda), \boldsymbol{\sigma}_{-i}^2(\lambda)]\}. -\end{align*} -$$ - - - +

    +When the repetitive splitting of the data set is done randomly, +samples may accidently end up in a fast majority of the splits in +either training or test set. Such samples may have an unbalanced +influence on either model building or prediction evaluation. To avoid +this \( k \)-fold cross-validation structures the data splitting. The +samples are divided into \( k \) more or less equally sized exhaustive and +mutually exclusive subsets. In turn (at each split) one of these +subsets plays the role of the test set while the union of the +remaining subsets constitutes the training set. Such a splitting +warrants a balanced representation of each sample in both training and +test set over the splits. Still the division into the \( k \) subsets +involves a degree of randomness. This may be fully excluded when +choosing \( k=n \). This particular case is referred to as leave-one-out +cross-validation (LOOCV). +

    diff --git a/doc/pub/Regression/html/._Regression-bs080.html b/doc/pub/Regression/html/._Regression-bs080.html index 96c416585..66a645338 100644 --- a/doc/pub/Regression/html/._Regression-bs080.html +++ b/doc/pub/Regression/html/._Regression-bs080.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -381,29 +383,42 @@ MathJax.Hub.Config({

     

     

     

    - + -

    Resampling methods: Jackknife and Bootstrap

    +

    How to set up the cross-validation for Ridge and/or Lasso

    -

    -Two famous -resampling methods are the independent bootstrap and the jackknife. +

    -

    -The jackknife is a special case of the independent bootstrap. Still, the jackknife was made -popular prior to the independent bootstrap. And as the popularity of -the independent bootstrap soared, new variants, such as the dependent bootstrap. +$$ +\begin{align*} +\boldsymbol{\beta}_{-i}(\lambda) & = ( \boldsymbol{X}_{-i, \ast}^{T} +\boldsymbol{X}_{-i, \ast} + \lambda \boldsymbol{I}_{pp})^{-1} +\boldsymbol{X}_{-i, \ast}^{T} \boldsymbol{y}_{-i} +\end{align*} +$$ -

    -The Jackknife and independent bootstrap work for -independent, identically distributed random variables. -If these conditions are not -satisfied, the methods will fail. Yet, it should be said that if the data are -independent, identically distributed, and we only want to estimate the -variance of \( \overline{X} \) (which often is the case), then there is no -need for bootstrapping. -

    +

    + +$$ +\begin{align*} +\frac{1}{n} \sum_{i = 1}^n \log\{L[y_i, \mathbf{X}_{i, \ast}; \boldsymbol{\beta}_{-i}(\lambda), \boldsymbol{\sigma}_{-i}^2(\lambda)]\}. +\end{align*} +$$ + + + +

    diff --git a/doc/pub/Regression/html/._Regression-bs081.html b/doc/pub/Regression/html/._Regression-bs081.html index c2ff2409d..ca53b079c 100644 --- a/doc/pub/Regression/html/._Regression-bs081.html +++ b/doc/pub/Regression/html/._Regression-bs081.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,21 +385,25 @@ MathJax.Hub.Config({ -

    Resampling methods: Jackknife

    +

    Resampling methods: Jackknife and Bootstrap

    -The Jackknife works by making many replicas of the estimator \( \widehat{\theta} \). -The jackknife is a resampling method where we systematically leave out one observation from the vector of observed values \( \boldsymbol{x} = (x_1,x_2,\cdots,X_n) \). -Let \( \boldsymbol{x}_i \) denote the vector -$$ -\boldsymbol{x}_i = (x_1,x_2,\cdots,x_{i-1},x_{i+1},\cdots,x_n), -$$ +Two famous +resampling methods are the independent bootstrap and the jackknife.

    -which equals the vector \( \boldsymbol{x} \) with the exception that observation -number \( i \) is left out. Using this notation, define -\( \widehat{\theta}_i \) to be the estimator -\( \widehat{\theta} \) computed using \( \vec{X}_i \). +The jackknife is a special case of the independent bootstrap. Still, the jackknife was made +popular prior to the independent bootstrap. And as the popularity of +the independent bootstrap soared, new variants, such as the dependent bootstrap. + +

    +The Jackknife and independent bootstrap work for +independent, identically distributed random variables. +If these conditions are not +satisfied, the methods will fail. Yet, it should be said that if the data are +independent, identically distributed, and we only want to estimate the +variance of \( \overline{X} \) (which often is the case), then there is no +need for bootstrapping.

    @@ -425,7 +431,7 @@ number \( i \) is left out. Using this notation, define

  • 90
  • 91
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs082.html b/doc/pub/Regression/html/._Regression-bs082.html index c6510e35b..24108f0c7 100644 --- a/doc/pub/Regression/html/._Regression-bs082.html +++ b/doc/pub/Regression/html/._Regression-bs082.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,39 +385,22 @@ MathJax.Hub.Config({ -

    Jackknife code example

    +

    Resampling methods: Jackknife

    +

    +The Jackknife works by making many replicas of the estimator \( \widehat{\theta} \). +The jackknife is a resampling method where we systematically leave out one observation from the vector of observed values \( \boldsymbol{x} = (x_1,x_2,\cdots,X_n) \). +Let \( \boldsymbol{x}_i \) denote the vector +$$ +\boldsymbol{x}_i = (x_1,x_2,\cdots,x_{i-1},x_{i+1},\cdots,x_n), +$$ - -

    from numpy import *
    -from numpy.random import randint, randn
    -from time import time
    +

    +which equals the vector \( \boldsymbol{x} \) with the exception that observation +number \( i \) is left out. Using this notation, define +\( \widehat{\theta}_i \) to be the estimator +\( \widehat{\theta} \) computed using \( \vec{X}_i \). -def jackknife(data, stat): - n = len(data);t = zeros(n); inds = arange(n); t0 = time() - ## 'jackknifing' by leaving out an observation for each i - for i in range(n): - t[i] = stat(delete(data,i) ) - - # analysis - print("Runtime: %g sec" % (time()-t0)); print("Jackknife Statistics :") - print("original bias std. error") - print("%8g %14g %15g" % (stat(data),(n-1)*mean(t)/n, (n*var(t))**.5)) - - return t - - -# Returns mean of data samples -def stat(data): - return mean(data) - - -mu, sigma = 100, 15 -datapoints = 10000 -x = mu + sigma*random.randn(datapoints) -# jackknife returns the data sample -t = jackknife(x, stat) -

    @@ -442,7 +427,7 @@ t = jackknife(x, stat)

  • 91
  • 92
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs083.html b/doc/pub/Regression/html/._Regression-bs083.html index 45bf09ab0..be4e51fb7 100644 --- a/doc/pub/Regression/html/._Regression-bs083.html +++ b/doc/pub/Regression/html/._Regression-bs083.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,25 +385,39 @@ MathJax.Hub.Config({ -

    Resampling methods: Bootstrap

    -
    -
    -

    -Bootstrapping is a nonparametric approach to statistical inference -that substitutes computation for more traditional distributional -assumptions and asymptotic results. Bootstrapping offers a number of -advantages: +

    Jackknife code example

    +

    -

      -
    1. The bootstrap is quite general, although there are some cases in which it fails.
    2. -
    3. Because it does not require distributional assumptions (such as normally distributed errors), the bootstrap can provide more accurate inferences when the data are not well behaved or when the sample size is small.
    4. -
    5. It is possible to apply the bootstrap to statistics with sampling distributions that are difficult to derive, even asymptotically.
    6. -
    7. It is relatively simple to apply the bootstrap to complex data-collection plans (such as stratified and clustered samples).
    8. -
    -
    -
    + +
    from numpy import *
    +from numpy.random import randint, randn
    +from time import time
    +
    +def jackknife(data, stat):
    +    n = len(data);t = zeros(n); inds = arange(n); t0 = time()
    +    ## 'jackknifing' by leaving out an observation for each i                                                                                                                      
    +    for i in range(n):
    +        t[i] = stat(delete(data,i) )
    +
    +    # analysis                                                                                                                                                                     
    +    print("Runtime: %g sec" % (time()-t0)); print("Jackknife Statistics :")
    +    print("original           bias      std. error")
    +    print("%8g %14g %15g" % (stat(data),(n-1)*mean(t)/n, (n*var(t))**.5))
    +
    +    return t
     
     
    +# Returns mean of data samples                                                                                                                                                     
    +def stat(data):
    +    return mean(data)
    +
    +
    +mu, sigma = 100, 15
    +datapoints = 10000
    +x = mu + sigma*random.randn(datapoints)
    +# jackknife returns the data sample                                                                                                                                                
    +t = jackknife(x, stat)
    +

    @@ -428,7 +444,7 @@ advantages:

  • 92
  • 93
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs084.html b/doc/pub/Regression/html/._Regression-bs084.html index 9ca496c44..6c49558c1 100644 --- a/doc/pub/Regression/html/._Regression-bs084.html +++ b/doc/pub/Regression/html/._Regression-bs084.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,18 +385,24 @@ MathJax.Hub.Config({ -

    Resampling methods: Bootstrap background

    +

    Resampling methods: Bootstrap

    +
    +
    +

    +Bootstrapping is a nonparametric approach to statistical inference +that substitutes computation for more traditional distributional +assumptions and asymptotic results. Bootstrapping offers a number of +advantages: + +

      +
    1. The bootstrap is quite general, although there are some cases in which it fails.
    2. +
    3. Because it does not require distributional assumptions (such as normally distributed errors), the bootstrap can provide more accurate inferences when the data are not well behaved or when the sample size is small.
    4. +
    5. It is possible to apply the bootstrap to statistics with sampling distributions that are difficult to derive, even asymptotically.
    6. +
    7. It is relatively simple to apply the bootstrap to complex data-collection plans (such as stratified and clustered samples).
    8. +
    +
    +
    -

    -Since \( \widehat{\theta} = \widehat{\theta}(\boldsymbol{X}) \) is a function of random variables, -\( \widehat{\theta} \) itself must be a random variable. Thus it has -a pdf, call this function \( p(\boldsymbol{t}) \). The aim of the bootstrap is to -estimate \( p(\boldsymbol{t}) \) by the relative frequency of -\( \widehat{\theta} \). You can think of this as using a histogram -in the place of \( p(\boldsymbol{t}) \). If the relative frequency closely -resembles \( p(\vec{t}) \), then using numerics, it is straight forward to -estimate all the interesting parameters of \( p(\boldsymbol{t}) \) using point -estimators.

    @@ -422,7 +430,7 @@ estimators.

  • 93
  • 94
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs085.html b/doc/pub/Regression/html/._Regression-bs085.html index 603c58d33..c39d94c72 100644 --- a/doc/pub/Regression/html/._Regression-bs085.html +++ b/doc/pub/Regression/html/._Regression-bs085.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,24 +385,18 @@ MathJax.Hub.Config({ -

    Resampling methods: More Bootstrap background

    +

    Resampling methods: Bootstrap background

    -In the case that \( \widehat{\theta} \) has -more than one component, and the components are independent, we use the -same estimator on each component separately. If the probability -density function of \( X_i \), \( p(x) \), had been known, then it would have -been straight forward to do this by: - -

      -
    1. Drawing lots of numbers from \( p(x) \), suppose we call one such set of numbers \( (X_1^*, X_2^*, \cdots, X_n^*) \).
    2. -
    3. Then using these numbers, we could compute a replica of \( \widehat{\theta} \) called \( \widehat{\theta}^* \).
    4. -
    - -By repeated use of (1) and (2), many -estimates of \( \widehat{\theta} \) could have been obtained. The -idea is to use the relative frequency of \( \widehat{\theta}^* \) -(think of a histogram) as an estimate of \( p(\boldsymbol{t}) \). +Since \( \widehat{\theta} = \widehat{\theta}(\boldsymbol{X}) \) is a function of random variables, +\( \widehat{\theta} \) itself must be a random variable. Thus it has +a pdf, call this function \( p(\boldsymbol{t}) \). The aim of the bootstrap is to +estimate \( p(\boldsymbol{t}) \) by the relative frequency of +\( \widehat{\theta} \). You can think of this as using a histogram +in the place of \( p(\boldsymbol{t}) \). If the relative frequency closely +resembles \( p(\vec{t}) \), then using numerics, it is straight forward to +estimate all the interesting parameters of \( p(\boldsymbol{t}) \) using point +estimators.

    @@ -428,7 +424,7 @@ idea is to use the relative frequency of \( \widehat{\theta}^* \)

  • 94
  • 95
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs086.html b/doc/pub/Regression/html/._Regression-bs086.html index efe41fa8a..067661900 100644 --- a/doc/pub/Regression/html/._Regression-bs086.html +++ b/doc/pub/Regression/html/._Regression-bs086.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,23 +385,24 @@ MathJax.Hub.Config({ -

    Resampling methods: Bootstrap approach

    +

    Resampling methods: More Bootstrap background

    -But -unless there is enough information available about the process that -generated \( X_1,X_2,\cdots,X_n \), \( p(x) \) is in general -unknown. Therefore, Efron in 1979 asked the -question: What if we replace \( p(x) \) by the relative frequency -of the observation \( X_i \); if we draw observations in accordance with -the relative frequency of the observations, will we obtain the same -result in some asymptotic sense? The answer is yes. +In the case that \( \widehat{\theta} \) has +more than one component, and the components are independent, we use the +same estimator on each component separately. If the probability +density function of \( X_i \), \( p(x) \), had been known, then it would have +been straight forward to do this by: -

    -Instead of generating the histogram for the relative -frequency of the observation \( X_i \), just draw the values -\( (X_1^*,X_2^*,\cdots,X_n^*) \) with replacement from the vector -\( \boldsymbol{X} \). +

      +
    1. Drawing lots of numbers from \( p(x) \), suppose we call one such set of numbers \( (X_1^*, X_2^*, \cdots, X_n^*) \).
    2. +
    3. Then using these numbers, we could compute a replica of \( \widehat{\theta} \) called \( \widehat{\theta}^* \).
    4. +
    + +By repeated use of (1) and (2), many +estimates of \( \widehat{\theta} \) could have been obtained. The +idea is to use the relative frequency of \( \widehat{\theta}^* \) +(think of a histogram) as an estimate of \( p(\boldsymbol{t}) \).

    @@ -427,7 +430,7 @@ frequency of the observation \( X_i \), just draw the values

  • 95
  • 96
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs087.html b/doc/pub/Regression/html/._Regression-bs087.html index c52711bcb..d8d62a9ff 100644 --- a/doc/pub/Regression/html/._Regression-bs087.html +++ b/doc/pub/Regression/html/._Regression-bs087.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,27 +385,23 @@ MathJax.Hub.Config({ -

    Resampling methods: Bootstrap steps

    +

    Resampling methods: Bootstrap approach

    -The independent bootstrap works like this: +But +unless there is enough information available about the process that +generated \( X_1,X_2,\cdots,X_n \), \( p(x) \) is in general +unknown. Therefore, Efron in 1979 asked the +question: What if we replace \( p(x) \) by the relative frequency +of the observation \( X_i \); if we draw observations in accordance with +the relative frequency of the observations, will we obtain the same +result in some asymptotic sense? The answer is yes. -

      -
    1. Draw with replacement \( n \) numbers for the observed variables \( \boldsymbol{x} = (x_1,x_2,\cdots,x_n) \).
    2. -
    3. Define a vector \( \boldsymbol{x}^* \) containing the values which were drawn from \( \boldsymbol{x} \).
    4. -
    5. Using the vector \( \boldsymbol{x}^* \) compute \( \widehat{\theta}^* \) by evaluating \( \widehat \theta \) under the observations \( \boldsymbol{x}^* \).
    6. -
    7. Repeat this process \( k \) times.
    8. -
    - -When you are done, you can draw a histogram of the relative frequency -of \( \widehat \theta^* \). This is your estimate of the probability -distribution \( p(t) \). Using this probability distribution you can -estimate any statistics thereof. In principle you never draw the -histogram of the relative frequency of \( \widehat{\theta}^* \). Instead -you use the estimators corresponding to the statistic of interest. For -example, if you are interested in estimating the variance of \( \widehat -\theta \), apply the etsimator \( \widehat \sigma^2 \) to the values -\( \widehat \theta ^* \). +

    +Instead of generating the histogram for the relative +frequency of the observation \( X_i \), just draw the values +\( (X_1^*,X_2^*,\cdots,X_n^*) \) with replacement from the vector +\( \boldsymbol{X} \).

    @@ -431,7 +429,7 @@ example, if you are interested in estimating the variance of \( \widehat

  • 96
  • 97
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs088.html b/doc/pub/Regression/html/._Regression-bs088.html index 24600b562..05352dbe2 100644 --- a/doc/pub/Regression/html/._Regression-bs088.html +++ b/doc/pub/Regression/html/._Regression-bs088.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,67 +385,28 @@ MathJax.Hub.Config({ -

    Code example for the Bootstrap method

    +

    Resampling methods: Bootstrap steps

    -The following code starts with a Gaussian distribution with mean value -\( \mu =100 \) and variance \( \sigma=15 \). We use this to generate the data -used in the bootstrap analysis. The bootstrap analysis returns a data -set after a given number of bootstrap operations (as many as we have -data points). This data set consists of estimated mean values for each -bootstrap operation. The histogram generated by the bootstrap method -shows that the distribution for these mean values is also a Gaussian, -centered around the mean value \( \mu=100 \) but with standard deviation -\( \sigma/\sqrt{n} \), where \( n \) is the number of bootstrap samples (in -this case the same as the number of original data points). The value -of the standard deviation is what we expect from the central limit -theorem. +The independent bootstrap works like this: -

    +

      +
    1. Draw with replacement \( n \) numbers for the observed variables \( \boldsymbol{x} = (x_1,x_2,\cdots,x_n) \).
    2. +
    3. Define a vector \( \boldsymbol{x}^* \) containing the values which were drawn from \( \boldsymbol{x} \).
    4. +
    5. Using the vector \( \boldsymbol{x}^* \) compute \( \widehat{\theta}^* \) by evaluating \( \widehat \theta \) under the observations \( \boldsymbol{x}^* \).
    6. +
    7. Repeat this process \( k \) times.
    8. +
    - -
    from numpy import *
    -from numpy.random import randint, randn
    -from time import time
    -import matplotlib.mlab as mlab
    -import matplotlib.pyplot as plt
    +When you are done, you can draw a histogram of the relative frequency
    +of \( \widehat \theta^* \). This is your estimate of the probability
    +distribution \( p(t) \). Using this probability distribution you can
    +estimate any statistics thereof. In principle you never draw the
    +histogram of the relative frequency of \( \widehat{\theta}^* \). Instead
    +you use the estimators corresponding to the statistic of interest. For
    +example, if you are interested in estimating the variance of \( \widehat
    +\theta \), apply the etsimator \( \widehat \sigma^2 \) to the values
    +\( \widehat \theta ^* \).
     
    -# Returns mean of bootstrap samples                                                                                                                                                
    -def stat(data):
    -    return mean(data)
    -
    -# Bootstrap algorithm
    -def bootstrap(data, statistic, R):
    -    t = zeros(R); n = len(data); inds = arange(n); t0 = time()
    -    # non-parametric bootstrap         
    -    for i in range(R):
    -        t[i] = statistic(data[randint(0,n,n)])
    -
    -    # analysis    
    -    print("Runtime: %g sec" % (time()-t0)); print("Bootstrap Statistics :")
    -    print("original           bias      std. error")
    -    print("%8g %8g %14g %15g" % (statistic(data), std(data),mean(t),std(t)))
    -    return t
    -
    -
    -mu, sigma = 100, 15
    -datapoints = 10000
    -x = mu + sigma*random.randn(datapoints)
    -# bootstrap returns the data sample                                    
    -t = bootstrap(x, stat, datapoints)
    -# the histogram of the bootstrapped  data                                                                                                    
    -n, binsboot, patches = plt.hist(t, 50, normed=1, facecolor='red', alpha=0.75)
    -
    -# add a 'best fit' line  
    -y = mlab.normpdf( binsboot, mean(t), std(t))
    -lt = plt.plot(binsboot, y, 'r--', linewidth=1)
    -plt.xlabel('Smarts')
    -plt.ylabel('Probability')
    -plt.axis([99.5, 100.6, 0, 3.0])
    -plt.grid(True)
    -
    -plt.show()
    -

    @@ -470,7 +433,7 @@ plt.show()

  • 97
  • 98
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs089.html b/doc/pub/Regression/html/._Regression-bs089.html index 8c221d91b..d1cf4186c 100644 --- a/doc/pub/Regression/html/._Regression-bs089.html +++ b/doc/pub/Regression/html/._Regression-bs089.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,100 +385,64 @@ MathJax.Hub.Config({ -

    Code Example for Cross-validation and \( k \)-fold Cross-validation

    +

    Code example for the Bootstrap method

    -The code here uses Ridge regression with cross-validation (CV) resampling and \( k \)-fold CV in order to fit a specific polynomial. +The following code starts with a Gaussian distribution with mean value +\( \mu =100 \) and variance \( \sigma=15 \). We use this to generate the data +used in the bootstrap analysis. The bootstrap analysis returns a data +set after a given number of bootstrap operations (as many as we have +data points). This data set consists of estimated mean values for each +bootstrap operation. The histogram generated by the bootstrap method +shows that the distribution for these mean values is also a Gaussian, +centered around the mean value \( \mu=100 \) but with standard deviation +\( \sigma/\sqrt{n} \), where \( n \) is the number of bootstrap samples (in +this case the same as the number of original data points). The value +of the standard deviation is what we expect from the central limit +theorem. +

    -

    import numpy as np
    +
    from numpy import *
    +from numpy.random import randint, randn
    +from time import time
    +import matplotlib.mlab as mlab
     import matplotlib.pyplot as plt
    -from sklearn.model_selection import KFold
    -from sklearn.linear_model import Ridge
    -from sklearn.model_selection import cross_val_score
    -from sklearn.preprocessing import PolynomialFeatures
     
    -# A seed just to ensure that the random numbers are the same for every run.
    -# Useful for eventual debugging.
    -np.random.seed(3155)
    +# Returns mean of bootstrap samples                                                                                                                                                
    +def stat(data):
    +    return mean(data)
     
    -# Generate the data.
    -nsamples = 100
    -x = np.random.randn(nsamples)
    -y = 3*x**2 + np.random.randn(nsamples)
    +# Bootstrap algorithm
    +def bootstrap(data, statistic, R):
    +    t = zeros(R); n = len(data); inds = arange(n); t0 = time()
    +    # non-parametric bootstrap         
    +    for i in range(R):
    +        t[i] = statistic(data[randint(0,n,n)])
     
    -## Cross-validation on Ridge regression using KFold only
    -
    -# Decide degree on polynomial to fit
    -poly = PolynomialFeatures(degree = 6)
    -
    -# Decide which values of lambda to use
    -nlambdas = 500
    -lambdas = np.logspace(-3, 5, nlambdas)
    -
    -# Initialize a KFold instance
    -k = 5
    -kfold = KFold(n_splits = k)
    -
    -# Perform the cross-validation to estimate MSE
    -scores_KFold = np.zeros((nlambdas, k))
    -
    -i = 0
    -for lmb in lambdas:
    -    ridge = Ridge(alpha = lmb)
    -    j = 0
    -    for train_inds, test_inds in kfold.split(x):
    -        xtrain = x[train_inds]
    -        ytrain = y[train_inds]
    -
    -        xtest = x[test_inds]
    -        ytest = y[test_inds]
    -
    -        Xtrain = poly.fit_transform(xtrain[:, np.newaxis])
    -        ridge.fit(Xtrain, ytrain[:, np.newaxis])
    -
    -        Xtest = poly.fit_transform(xtest[:, np.newaxis])
    -        ypred = ridge.predict(Xtest)
    -
    -        scores_KFold[i,j] = np.sum((ypred - ytest[:, np.newaxis])**2)/np.size(ypred)
    -
    -        j += 1
    -    i += 1
    +    # analysis    
    +    print("Runtime: %g sec" % (time()-t0)); print("Bootstrap Statistics :")
    +    print("original           bias      std. error")
    +    print("%8g %8g %14g %15g" % (statistic(data), std(data),mean(t),std(t)))
    +    return t
     
     
    -estimated_mse_KFold = np.mean(scores_KFold, axis = 1)
    +mu, sigma = 100, 15
    +datapoints = 10000
    +x = mu + sigma*random.randn(datapoints)
    +# bootstrap returns the data sample                                    
    +t = bootstrap(x, stat, datapoints)
    +# the histogram of the bootstrapped  data                                                                                                    
    +n, binsboot, patches = plt.hist(t, 50, normed=1, facecolor='red', alpha=0.75)
     
    -## Cross-validation using cross_val_score from sklearn along with KFold
    -
    -# kfold is an instance initialized above as:
    -# kfold = KFold(n_splits = k)
    -
    -estimated_mse_sklearn = np.zeros(nlambdas)
    -i = 0
    -for lmb in lambdas:
    -    ridge = Ridge(alpha = lmb)
    -
    -    X = poly.fit_transform(x[:, np.newaxis])
    -    estimated_mse_folds = cross_val_score(ridge, X, y[:, np.newaxis], scoring='neg_mean_squared_error', cv=kfold)
    -
    -    # cross_val_score return an array containing the estimated negative mse for every fold.
    -    # we have to the the mean of every array in order to get an estimate of the mse of the model
    -    estimated_mse_sklearn[i] = np.mean(-estimated_mse_folds)
    -
    -    i += 1
    -
    -## Plot and compare the slightly different ways to perform cross-validation
    -
    -plt.figure()
    -
    -plt.plot(np.log10(lambdas), estimated_mse_sklearn, label = 'cross_val_score')
    -plt.plot(np.log10(lambdas), estimated_mse_KFold, 'r--', label = 'KFold')
    -
    -plt.xlabel('log10(lambda)')
    -plt.ylabel('mse')
    -
    -plt.legend()
    +# add a 'best fit' line  
    +y = mlab.normpdf( binsboot, mean(t), std(t))
    +lt = plt.plot(binsboot, y, 'r--', linewidth=1)
    +plt.xlabel('Smarts')
    +plt.ylabel('Probability')
    +plt.axis([99.5, 100.6, 0, 3.0])
    +plt.grid(True)
     
     plt.show()
     
    @@ -506,7 +472,7 @@ plt.show()
  • 98
  • 99
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs090.html b/doc/pub/Regression/html/._Regression-bs090.html index b02a9ad7b..871a6f929 100644 --- a/doc/pub/Regression/html/._Regression-bs090.html +++ b/doc/pub/Regression/html/._Regression-bs090.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,69 +385,103 @@ MathJax.Hub.Config({ -

    The bias-variance tradeoff

    +

    Code Example for Cross-validation and \( k \)-fold Cross-validation

    -We will discuss the bias-variance tradeoff in the context of -continuous predictions such as regression. However, many of the -intuitions and ideas discussed here also carry over to classification -tasks. Consider a dataset \( \mathcal{L} \) consisting of the data -\( \mathbf{X}_\mathcal{L}=\{(y_j, \boldsymbol{x}_j), j=0\ldots n-1\} \). - +The code here uses Ridge regression with cross-validation (CV) resampling and \( k \)-fold CV in order to fit a specific polynomial.

    -Let us assume that the true data is generated from a noisy model -$$ -\boldsymbol{y}=f(\boldsymbol{x}) + \boldsymbol{\epsilon} -$$ + +

    import numpy as np
    +import matplotlib.pyplot as plt
    +from sklearn.model_selection import KFold
    +from sklearn.linear_model import Ridge
    +from sklearn.model_selection import cross_val_score
    +from sklearn.preprocessing import PolynomialFeatures
     
    -

    -where \( \epsilon \) is normally distributed with mean zero and standard deviation \( \sigma^2 \). +# A seed just to ensure that the random numbers are the same for every run. +# Useful for eventual debugging. +np.random.seed(3155) -

    -In our derivation of the ordinary least squares method we defined then -an approximation to the function \( f \) in terms of the parameters -\( \boldsymbol{\beta} \) and the design matrix \( \boldsymbol{X} \) which embody our model, -that is \( \boldsymbol{\tilde{y}}=\boldsymbol{X}\boldsymbol{\beta} \). +# Generate the data. +nsamples = 100 +x = np.random.randn(nsamples) +y = 3*x**2 + np.random.randn(nsamples) -

    -Thereafter we found the parameters \( \boldsymbol{\beta} \) by optimizing the means squared error via the so-called cost function -$$ -C(\boldsymbol{X},\boldsymbol{\beta}) =\frac{1}{n}\sum_{i=0}^{n-1}(y_i-\tilde{y}_i)^2=\mathbb{E}\left[(\boldsymbol{y}-\boldsymbol{\tilde{y}})^2\right]. -$$ +## Cross-validation on Ridge regression using KFold only -

    -We can rewrite this as -$$ -\mathbb{E}\left[(\boldsymbol{y}-\boldsymbol{\tilde{y}})^2\right]=\frac{1}{n}\sum_i(f_i-\mathbb{E}\left[\boldsymbol{\tilde{y}}\right])^2+\frac{1}{n}\sum_i(\tilde{y}_i-\mathbb{E}\left[\boldsymbol{\tilde{y}}\right])^2+\sigma^2. -$$ +# Decide degree on polynomial to fit +poly = PolynomialFeatures(degree = 6) -

    -The three terms represent the square of the bias of the learning -method, which can be thought of as the error caused by the simplifying -assumptions built into the method. The second term represents the -variance of the chosen model and finally the last terms is variance of -the error \( \boldsymbol{\epsilon} \). +# Decide which values of lambda to use +nlambdas = 500 +lambdas = np.logspace(-3, 5, nlambdas) -

    -To derive this equation, we need to recall that the variance of \( \boldsymbol{y} \) and \( \boldsymbol{\epsilon} \) are both equal to \( \sigma^2 \). The mean value of \( \boldsymbol{\epsilon} \) is by definition equal to zero. Furthermore, the function \( f \) is not a stochastics variable, idem for \( \boldsymbol{\tilde{y}} \). -We use a more compact notation in terms of the expectation value -$$ -\mathbb{E}\left[(\boldsymbol{y}-\boldsymbol{\tilde{y}})^2\right]=\mathbb{E}\left[(\boldsymbol{f}+\boldsymbol{\epsilon}-\boldsymbol{\tilde{y}})^2\right], -$$ +# Initialize a KFold instance +k = 5 +kfold = KFold(n_splits = k) -and adding and subtracting \( \mathbb{E}\left[\boldsymbol{\tilde{y}}\right] \) we get -$$ -\mathbb{E}\left[(\boldsymbol{y}-\boldsymbol{\tilde{y}})^2\right]=\mathbb{E}\left[(\boldsymbol{f}+\boldsymbol{\epsilon}-\boldsymbol{\tilde{y}}+\mathbb{E}\left[\boldsymbol{\tilde{y}}\right]-\mathbb{E}\left[\boldsymbol{\tilde{y}}\right])^2\right], -$$ +# Perform the cross-validation to estimate MSE +scores_KFold = np.zeros((nlambdas, k)) -which, using the abovementioned expectation values can be rewritten as -$$ -\mathbb{E}\left[(\boldsymbol{y}-\boldsymbol{\tilde{y}})^2\right]=\mathbb{E}\left[(\boldsymbol{y}-\mathbb{E}\left[\boldsymbol{\tilde{y}}\right])^2\right]+\mathrm{Var}\left[\boldsymbol{\tilde{y}}\right]+\sigma^2, -$$ +i = 0 +for lmb in lambdas: + ridge = Ridge(alpha = lmb) + j = 0 + for train_inds, test_inds in kfold.split(x): + xtrain = x[train_inds] + ytrain = y[train_inds] -that is the rewriting in terms of the so-called bias, the variance of the model \( \boldsymbol{\tilde{y}} \) and the variance of \( \boldsymbol{\epsilon} \). + xtest = x[test_inds] + ytest = y[test_inds] + Xtrain = poly.fit_transform(xtrain[:, np.newaxis]) + ridge.fit(Xtrain, ytrain[:, np.newaxis]) + + Xtest = poly.fit_transform(xtest[:, np.newaxis]) + ypred = ridge.predict(Xtest) + + scores_KFold[i,j] = np.sum((ypred - ytest[:, np.newaxis])**2)/np.size(ypred) + + j += 1 + i += 1 + + +estimated_mse_KFold = np.mean(scores_KFold, axis = 1) + +## Cross-validation using cross_val_score from sklearn along with KFold + +# kfold is an instance initialized above as: +# kfold = KFold(n_splits = k) + +estimated_mse_sklearn = np.zeros(nlambdas) +i = 0 +for lmb in lambdas: + ridge = Ridge(alpha = lmb) + + X = poly.fit_transform(x[:, np.newaxis]) + estimated_mse_folds = cross_val_score(ridge, X, y[:, np.newaxis], scoring='neg_mean_squared_error', cv=kfold) + + # cross_val_score return an array containing the estimated negative mse for every fold. + # we have to the the mean of every array in order to get an estimate of the mse of the model + estimated_mse_sklearn[i] = np.mean(-estimated_mse_folds) + + i += 1 + +## Plot and compare the slightly different ways to perform cross-validation + +plt.figure() + +plt.plot(np.log10(lambdas), estimated_mse_sklearn, label = 'cross_val_score') +plt.plot(np.log10(lambdas), estimated_mse_KFold, 'r--', label = 'KFold') + +plt.xlabel('log10(lambda)') +plt.ylabel('mse') + +plt.legend() + +plt.show() +

    @@ -472,7 +508,7 @@ that is the rewriting in terms of the so-called bias, the variance of the model

  • 99
  • 100
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs091.html b/doc/pub/Regression/html/._Regression-bs091.html index 04bca014d..82eac22da 100644 --- a/doc/pub/Regression/html/._Regression-bs091.html +++ b/doc/pub/Regression/html/._Regression-bs091.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,65 +385,69 @@ MathJax.Hub.Config({ -

    Example code for Bias-Variance tradeoff

    +

    The bias-variance tradeoff

    +

    +We will discuss the bias-variance tradeoff in the context of +continuous predictions such as regression. However, many of the +intuitions and ideas discussed here also carry over to classification +tasks. Consider a dataset \( \mathcal{L} \) consisting of the data +\( \mathbf{X}_\mathcal{L}=\{(y_j, \boldsymbol{x}_j), j=0\ldots n-1\} \). - -

    import matplotlib.pyplot as plt
    -import numpy as np
    -from sklearn.linear_model import LinearRegression, Ridge, Lasso
    -from sklearn.preprocessing import PolynomialFeatures
    -from sklearn.model_selection import train_test_split
    -from sklearn.pipeline import make_pipeline
    -from sklearn.utils import resample
    +

    +Let us assume that the true data is generated from a noisy model -np.random.seed(2018) +$$ +\boldsymbol{y}=f(\boldsymbol{x}) + \boldsymbol{\epsilon} +$$ -n = 500 -n_boostraps = 100 -degree = 18 # A quite high value, just to show. -noise = 0.1 +

    +where \( \epsilon \) is normally distributed with mean zero and standard deviation \( \sigma^2 \). -# Make data set. -x = np.linspace(-1, 3, n).reshape(-1, 1) -y = np.exp(-x**2) + 1.5 * np.exp(-(x-2)**2) + np.random.normal(0, 0.1, x.shape) +

    +In our derivation of the ordinary least squares method we defined then +an approximation to the function \( f \) in terms of the parameters +\( \boldsymbol{\beta} \) and the design matrix \( \boldsymbol{X} \) which embody our model, +that is \( \boldsymbol{\tilde{y}}=\boldsymbol{X}\boldsymbol{\beta} \). -# Hold out some test data that is never used in training. -x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.2) +

    +Thereafter we found the parameters \( \boldsymbol{\beta} \) by optimizing the means squared error via the so-called cost function +$$ +C(\boldsymbol{X},\boldsymbol{\beta}) =\frac{1}{n}\sum_{i=0}^{n-1}(y_i-\tilde{y}_i)^2=\mathbb{E}\left[(\boldsymbol{y}-\boldsymbol{\tilde{y}})^2\right]. +$$ -# Combine x transformation and model into one operation. -# Not neccesary, but convenient. -model = make_pipeline(PolynomialFeatures(degree=degree), LinearRegression(fit_intercept=False)) +

    +We can rewrite this as +$$ +\mathbb{E}\left[(\boldsymbol{y}-\boldsymbol{\tilde{y}})^2\right]=\frac{1}{n}\sum_i(f_i-\mathbb{E}\left[\boldsymbol{\tilde{y}}\right])^2+\frac{1}{n}\sum_i(\tilde{y}_i-\mathbb{E}\left[\boldsymbol{\tilde{y}}\right])^2+\sigma^2. +$$ -# The following (m x n_bootstraps) matrix holds the column vectors y_pred -# for each bootstrap iteration. -y_pred = np.empty((y_test.shape[0], n_boostraps)) -for i in range(n_boostraps): - x_, y_ = resample(x_train, y_train) +

    +The three terms represent the square of the bias of the learning +method, which can be thought of as the error caused by the simplifying +assumptions built into the method. The second term represents the +variance of the chosen model and finally the last terms is variance of +the error \( \boldsymbol{\epsilon} \). - # Evaluate the new model on the same test data each time. - y_pred[:, i] = model.fit(x_, y_).predict(x_test).ravel() +

    +To derive this equation, we need to recall that the variance of \( \boldsymbol{y} \) and \( \boldsymbol{\epsilon} \) are both equal to \( \sigma^2 \). The mean value of \( \boldsymbol{\epsilon} \) is by definition equal to zero. Furthermore, the function \( f \) is not a stochastics variable, idem for \( \boldsymbol{\tilde{y}} \). +We use a more compact notation in terms of the expectation value +$$ +\mathbb{E}\left[(\boldsymbol{y}-\boldsymbol{\tilde{y}})^2\right]=\mathbb{E}\left[(\boldsymbol{f}+\boldsymbol{\epsilon}-\boldsymbol{\tilde{y}})^2\right], +$$ -# Note: Expectations and variances taken w.r.t. different training -# data sets, hence the axis=1. Subsequent means are taken across the test data -# set in order to obtain a total value, but before this we have error/bias/variance -# calculated per data point in the test set. -# Note 2: The use of keepdims=True is important in the calculation of bias as this -# maintains the column vector form. Dropping this yields very unexpected results. -error = np.mean( np.mean((y_test - y_pred)**2, axis=1, keepdims=True) ) -bias = np.mean( (y_test - np.mean(y_pred, axis=1, keepdims=True))**2 ) -variance = np.mean( np.var(y_pred, axis=1, keepdims=True) ) -print('Error:', error) -print('Bias^2:', bias) -print('Var:', variance) -print('{} >= {} + {} = {}'.format(error, bias, variance, bias+variance)) +and adding and subtracting \( \mathbb{E}\left[\boldsymbol{\tilde{y}}\right] \) we get +$$ +\mathbb{E}\left[(\boldsymbol{y}-\boldsymbol{\tilde{y}})^2\right]=\mathbb{E}\left[(\boldsymbol{f}+\boldsymbol{\epsilon}-\boldsymbol{\tilde{y}}+\mathbb{E}\left[\boldsymbol{\tilde{y}}\right]-\mathbb{E}\left[\boldsymbol{\tilde{y}}\right])^2\right], +$$ + +which, using the abovementioned expectation values can be rewritten as +$$ +\mathbb{E}\left[(\boldsymbol{y}-\boldsymbol{\tilde{y}})^2\right]=\mathbb{E}\left[(\boldsymbol{y}-\mathbb{E}\left[\boldsymbol{\tilde{y}}\right])^2\right]+\mathrm{Var}\left[\boldsymbol{\tilde{y}}\right]+\sigma^2, +$$ + +that is the rewriting in terms of the so-called bias, the variance of the model \( \boldsymbol{\tilde{y}} \) and the variance of \( \boldsymbol{\epsilon} \). -plt.plot(x[::5, :], y[::5, :], label='f(x)') -plt.scatter(x_test, y_test, label='Data points') -plt.scatter(x_test, np.mean(y_pred, axis=1), label='Pred') -plt.legend() -plt.show() -

    @@ -468,7 +474,7 @@ plt.show()

  • 100
  • 101
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs092.html b/doc/pub/Regression/html/._Regression-bs092.html index 83aa75bc5..eb52c4221 100644 --- a/doc/pub/Regression/html/._Regression-bs092.html +++ b/doc/pub/Regression/html/._Regression-bs092.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,7 +385,7 @@ MathJax.Hub.Config({ -

    Understanding what happens

    +

    Example code for Bias-Variance tradeoff

    @@ -397,40 +399,48 @@ MathJax.Hub.Config({ np.random.seed(2018) -n = 40 +n = 500 n_boostraps = 100 -maxdegree = 14 - +degree = 18 # A quite high value, just to show. +noise = 0.1 # Make data set. -x = np.linspace(-3, 3, n).reshape(-1, 1) -y = np.exp(-x**2) + 1.5 * np.exp(-(x-2)**2)+ np.random.normal(0, 0.1, x.shape) -error = np.zeros(maxdegree) -bias = np.zeros(maxdegree) -variance = np.zeros(maxdegree) -polydegree = np.zeros(maxdegree) +x = np.linspace(-1, 3, n).reshape(-1, 1) +y = np.exp(-x**2) + 1.5 * np.exp(-(x-2)**2) + np.random.normal(0, 0.1, x.shape) + +# Hold out some test data that is never used in training. x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.2) -for degree in range(maxdegree): - model = make_pipeline(PolynomialFeatures(degree=degree), LinearRegression(fit_intercept=False)) - y_pred = np.empty((y_test.shape[0], n_boostraps)) - for i in range(n_boostraps): - x_, y_ = resample(x_train, y_train) - y_pred[:, i] = model.fit(x_, y_).predict(x_test).ravel() +# Combine x transformation and model into one operation. +# Not neccesary, but convenient. +model = make_pipeline(PolynomialFeatures(degree=degree), LinearRegression(fit_intercept=False)) - polydegree[degree] = degree - error[degree] = np.mean( np.mean((y_test - y_pred)**2, axis=1, keepdims=True) ) - bias[degree] = np.mean( (y_test - np.mean(y_pred, axis=1, keepdims=True))**2 ) - variance[degree] = np.mean( np.var(y_pred, axis=1, keepdims=True) ) - print('Polynomial degree:', degree) - print('Error:', error[degree]) - print('Bias^2:', bias[degree]) - print('Var:', variance[degree]) - print('{} >= {} + {} = {}'.format(error[degree], bias[degree], variance[degree], bias[degree]+variance[degree])) +# The following (m x n_bootstraps) matrix holds the column vectors y_pred +# for each bootstrap iteration. +y_pred = np.empty((y_test.shape[0], n_boostraps)) +for i in range(n_boostraps): + x_, y_ = resample(x_train, y_train) -plt.plot(polydegree, error, label='Error') -plt.plot(polydegree, bias, label='bias') -plt.plot(polydegree, variance, label='Variance') + # Evaluate the new model on the same test data each time. + y_pred[:, i] = model.fit(x_, y_).predict(x_test).ravel() + +# Note: Expectations and variances taken w.r.t. different training +# data sets, hence the axis=1. Subsequent means are taken across the test data +# set in order to obtain a total value, but before this we have error/bias/variance +# calculated per data point in the test set. +# Note 2: The use of keepdims=True is important in the calculation of bias as this +# maintains the column vector form. Dropping this yields very unexpected results. +error = np.mean( np.mean((y_test - y_pred)**2, axis=1, keepdims=True) ) +bias = np.mean( (y_test - np.mean(y_pred, axis=1, keepdims=True))**2 ) +variance = np.mean( np.var(y_pred, axis=1, keepdims=True) ) +print('Error:', error) +print('Bias^2:', bias) +print('Var:', variance) +print('{} >= {} + {} = {}'.format(error, bias, variance, bias+variance)) + +plt.plot(x[::5, :], y[::5, :], label='f(x)') +plt.scatter(x_test, y_test, label='Data points') +plt.scatter(x_test, np.mean(y_pred, axis=1), label='Pred') plt.legend() plt.show()

    @@ -460,7 +470,7 @@ plt.show()
  • 101
  • 102
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs093.html b/doc/pub/Regression/html/._Regression-bs093.html index e97039030..4ea6d458c 100644 --- a/doc/pub/Regression/html/._Regression-bs093.html +++ b/doc/pub/Regression/html/._Regression-bs093.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -381,39 +383,59 @@ MathJax.Hub.Config({

     

     

     

    - - -

    Summing up

    + +

    Understanding what happens

    -The bias-variance tradeoff summarizes the fundamental tension in -machine learning, particularly supervised learning, between the -complexity of a model and the amount of training data needed to train -it. Since data is often limited, in practice it is often useful to -use a less-complex model with higher bias, that is a model whose asymptotic -performance is worse than another model because it is easier to -train and less sensitive to sampling noise arising from having a -finite-sized training dataset (smaller variance). -

    -The above equations tell us that in -order to minimize the expected test error, we need to select a -statistical learning method that simultaneously achieves low variance -and low bias. Note that variance is inherently a nonnegative quantity, -and squared bias is also nonnegative. Hence, we see that the expected -test MSE can never lie below \( Var(\epsilon) \), the irreducible error. + +

    import matplotlib.pyplot as plt
    +import numpy as np
    +from sklearn.linear_model import LinearRegression, Ridge, Lasso
    +from sklearn.preprocessing import PolynomialFeatures
    +from sklearn.model_selection import train_test_split
    +from sklearn.pipeline import make_pipeline
    +from sklearn.utils import resample
     
    -

    -What do we mean by the variance and bias of a statistical learning -method? The variance refers to the amount by which our model would change if we -estimated it using a different training data set. Since the training -data are used to fit the statistical learning method, different -training data sets will result in a different estimate. But ideally the -estimate for our model should not vary too much between training -sets. However, if a method has high variance then small changes in -the training data can result in large changes in the model. In general, more -flexible statistical methods have higher variance. +np.random.seed(2018) +n = 40 +n_boostraps = 100 +maxdegree = 14 + + +# Make data set. +x = np.linspace(-3, 3, n).reshape(-1, 1) +y = np.exp(-x**2) + 1.5 * np.exp(-(x-2)**2)+ np.random.normal(0, 0.1, x.shape) +error = np.zeros(maxdegree) +bias = np.zeros(maxdegree) +variance = np.zeros(maxdegree) +polydegree = np.zeros(maxdegree) +x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.2) + +for degree in range(maxdegree): + model = make_pipeline(PolynomialFeatures(degree=degree), LinearRegression(fit_intercept=False)) + y_pred = np.empty((y_test.shape[0], n_boostraps)) + for i in range(n_boostraps): + x_, y_ = resample(x_train, y_train) + y_pred[:, i] = model.fit(x_, y_).predict(x_test).ravel() + + polydegree[degree] = degree + error[degree] = np.mean( np.mean((y_test - y_pred)**2, axis=1, keepdims=True) ) + bias[degree] = np.mean( (y_test - np.mean(y_pred, axis=1, keepdims=True))**2 ) + variance[degree] = np.mean( np.var(y_pred, axis=1, keepdims=True) ) + print('Polynomial degree:', degree) + print('Error:', error[degree]) + print('Bias^2:', bias[degree]) + print('Var:', variance[degree]) + print('{} >= {} + {} = {}'.format(error[degree], bias[degree], variance[degree], bias[degree]+variance[degree])) + +plt.plot(polydegree, error, label='Error') +plt.plot(polydegree, bias, label='bias') +plt.plot(polydegree, variance, label='Variance') +plt.legend() +plt.show() +

    @@ -440,7 +462,7 @@ flexible statistical methods have higher variance.

  • 102
  • 103
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs094.html b/doc/pub/Regression/html/._Regression-bs094.html index bee332626..cc9102f35 100644 --- a/doc/pub/Regression/html/._Regression-bs094.html +++ b/doc/pub/Regression/html/._Regression-bs094.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -381,84 +383,39 @@ MathJax.Hub.Config({

     

     

     

    - + + +

    Summing up

    -

    Another Example rom Scikit-Learn's Repository

    +The bias-variance tradeoff summarizes the fundamental tension in +machine learning, particularly supervised learning, between the +complexity of a model and the amount of training data needed to train +it. Since data is often limited, in practice it is often useful to +use a less-complex model with higher bias, that is a model whose asymptotic +performance is worse than another model because it is easier to +train and less sensitive to sampling noise arising from having a +finite-sized training dataset (smaller variance). - -

    """
    -============================
    -Underfitting vs. Overfitting
    -============================
    +

    +The above equations tell us that in +order to minimize the expected test error, we need to select a +statistical learning method that simultaneously achieves low variance +and low bias. Note that variance is inherently a nonnegative quantity, +and squared bias is also nonnegative. Hence, we see that the expected +test MSE can never lie below \( Var(\epsilon) \), the irreducible error. -This example demonstrates the problems of underfitting and overfitting and -how we can use linear regression with polynomial features to approximate -nonlinear functions. The plot shows the function that we want to approximate, -which is a part of the cosine function. In addition, the samples from the -real function and the approximations of different models are displayed. The -models have polynomial features of different degrees. We can see that a -linear function (polynomial with degree 1) is not sufficient to fit the -training samples. This is called **underfitting**. A polynomial of degree 4 -approximates the true function almost perfectly. However, for higher degrees -the model will **overfit** the training data, i.e. it learns the noise of the -training data. -We evaluate quantitatively **overfitting** / **underfitting** by using -cross-validation. We calculate the mean squared error (MSE) on the validation -set, the higher, the less likely the model generalizes correctly from the -training data. -""" +

    +What do we mean by the variance and bias of a statistical learning +method? The variance refers to the amount by which our model would change if we +estimated it using a different training data set. Since the training +data are used to fit the statistical learning method, different +training data sets will result in a different estimate. But ideally the +estimate for our model should not vary too much between training +sets. However, if a method has high variance then small changes in +the training data can result in large changes in the model. In general, more +flexible statistical methods have higher variance. -print(__doc__) - -import numpy as np -import matplotlib.pyplot as plt -from sklearn.pipeline import Pipeline -from sklearn.preprocessing import PolynomialFeatures -from sklearn.linear_model import LinearRegression -from sklearn.model_selection import cross_val_score - - -def true_fun(X): - return np.cos(1.5 * np.pi * X) - -np.random.seed(0) - -n_samples = 30 -degrees = [1, 4, 15] - -X = np.sort(np.random.rand(n_samples)) -y = true_fun(X) + np.random.randn(n_samples) * 0.1 - -plt.figure(figsize=(14, 5)) -for i in range(len(degrees)): - ax = plt.subplot(1, len(degrees), i + 1) - plt.setp(ax, xticks=(), yticks=()) - - polynomial_features = PolynomialFeatures(degree=degrees[i], - include_bias=False) - linear_regression = LinearRegression() - pipeline = Pipeline([("polynomial_features", polynomial_features), - ("linear_regression", linear_regression)]) - pipeline.fit(X[:, np.newaxis], y) - - # Evaluate the models using crossvalidation - scores = cross_val_score(pipeline, X[:, np.newaxis], y, - scoring="neg_mean_squared_error", cv=10) - - X_test = np.linspace(0, 1, 100) - plt.plot(X_test, pipeline.predict(X_test[:, np.newaxis]), label="Model") - plt.plot(X_test, true_fun(X_test), label="True function") - plt.scatter(X, y, edgecolor='b', s=20, label="Samples") - plt.xlabel("x") - plt.ylabel("y") - plt.xlim((0, 1)) - plt.ylim((-2, 2)) - plt.legend(loc="best") - plt.title("Degree {}\nMSE = {:.2e}(+/- {:.2e})".format( - degrees[i], -scores.mean(), scores.std())) -plt.show() -

    @@ -484,6 +441,8 @@ plt.show()

  • 102
  • 103
  • 104
  • +
  • ...
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs095.html b/doc/pub/Regression/html/._Regression-bs095.html index 66f3b7357..0efe3dcbf 100644 --- a/doc/pub/Regression/html/._Regression-bs095.html +++ b/doc/pub/Regression/html/._Regression-bs095.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,60 +385,82 @@ MathJax.Hub.Config({ -

    The Ising model

    - -

    -The one-dimensional Ising model with nearest neighbor interaction, no -external field and a constant coupling constant \( J \) is given by - -$$ -\begin{align} - H = -J \sum_{k}^L s_k s_{k + 1}, -\tag{21} -\end{align} -$$ - -

    -where \( s_i \in \{-1, 1\} \) and \( s_{N + 1} = s_1 \). The number of spins -in the system is determined by \( L \). For the one-dimensional system -there is no phase transition. - -

    -We will look at a system of \( L = 40 \) spins with a coupling constant of -\( J = 1 \). To get enough training data we will generate 10000 states -with their respective energies. - +

    Another Example rom Scikit-Learn's Repository

    -

    import numpy as np
    +
    """
    +============================
    +Underfitting vs. Overfitting
    +============================
    +
    +This example demonstrates the problems of underfitting and overfitting and
    +how we can use linear regression with polynomial features to approximate
    +nonlinear functions. The plot shows the function that we want to approximate,
    +which is a part of the cosine function. In addition, the samples from the
    +real function and the approximations of different models are displayed. The
    +models have polynomial features of different degrees. We can see that a
    +linear function (polynomial with degree 1) is not sufficient to fit the
    +training samples. This is called **underfitting**. A polynomial of degree 4
    +approximates the true function almost perfectly. However, for higher degrees
    +the model will **overfit** the training data, i.e. it learns the noise of the
    +training data.
    +We evaluate quantitatively **overfitting** / **underfitting** by using
    +cross-validation. We calculate the mean squared error (MSE) on the validation
    +set, the higher, the less likely the model generalizes correctly from the
    +training data.
    +"""
    +
    +print(__doc__)
    +
    +import numpy as np
     import matplotlib.pyplot as plt
    -from mpl_toolkits.axes_grid1 import make_axes_locatable
    -import seaborn as sns
    -import scipy.linalg as scl
    -from sklearn.model_selection import train_test_split
    -import tqdm
    -sns.set(color_codes=True)
    -cmap_args=dict(vmin=-1., vmax=1., cmap='seismic')
    +from sklearn.pipeline import Pipeline
    +from sklearn.preprocessing import PolynomialFeatures
    +from sklearn.linear_model import LinearRegression
    +from sklearn.model_selection import cross_val_score
     
    -L = 40
    -n = int(1e4)
     
    -spins = np.random.choice([-1, 1], size=(n, L))
    -J = 1.0
    +def true_fun(X):
    +    return np.cos(1.5 * np.pi * X)
     
    -energies = np.zeros(n)
    +np.random.seed(0)
     
    -for i in range(n):
    -    energies[i] = - J * np.dot(spins[i], np.roll(spins[i], 1))
    +n_samples = 30
    +degrees = [1, 4, 15]
    +
    +X = np.sort(np.random.rand(n_samples))
    +y = true_fun(X) + np.random.randn(n_samples) * 0.1
    +
    +plt.figure(figsize=(14, 5))
    +for i in range(len(degrees)):
    +    ax = plt.subplot(1, len(degrees), i + 1)
    +    plt.setp(ax, xticks=(), yticks=())
    +
    +    polynomial_features = PolynomialFeatures(degree=degrees[i],
    +                                             include_bias=False)
    +    linear_regression = LinearRegression()
    +    pipeline = Pipeline([("polynomial_features", polynomial_features),
    +                         ("linear_regression", linear_regression)])
    +    pipeline.fit(X[:, np.newaxis], y)
    +
    +    # Evaluate the models using crossvalidation
    +    scores = cross_val_score(pipeline, X[:, np.newaxis], y,
    +                             scoring="neg_mean_squared_error", cv=10)
    +
    +    X_test = np.linspace(0, 1, 100)
    +    plt.plot(X_test, pipeline.predict(X_test[:, np.newaxis]), label="Model")
    +    plt.plot(X_test, true_fun(X_test), label="True function")
    +    plt.scatter(X, y, edgecolor='b', s=20, label="Samples")
    +    plt.xlabel("x")
    +    plt.ylabel("y")
    +    plt.xlim((0, 1))
    +    plt.ylim((-2, 2))
    +    plt.legend(loc="best")
    +    plt.title("Degree {}\nMSE = {:.2e}(+/- {:.2e})".format(
    +        degrees[i], -scores.mean(), scores.std()))
    +plt.show()
     
    -

    -Here we use ordinary least squares -regression to predict the energy for the nearest neighbor -one-dimensional Ising model on a ring, i.e., the endpoints wrap -around. We will use linear regression to fit a value for -the coupling constant to achieve this. -

    @@ -461,6 +485,7 @@ the coupling constant to achieve this.

  • 102
  • 103
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs096.html b/doc/pub/Regression/html/._Regression-bs096.html index 79bd7416f..78657b453 100644 --- a/doc/pub/Regression/html/._Regression-bs096.html +++ b/doc/pub/Regression/html/._Regression-bs096.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,53 +385,60 @@ MathJax.Hub.Config({ -

    Reformulating the problem to suit regression

    +

    The Ising model

    -A more general form for the one-dimensional Ising model is +The one-dimensional Ising model with nearest neighbor interaction, no +external field and a constant coupling constant \( J \) is given by $$ \begin{align} - H = - \sum_j^L \sum_k^L s_j s_k J_{jk}. -\tag{22} + H = -J \sum_{k}^L s_k s_{k + 1}, +\tag{21} \end{align} $$

    -Here we allow for interactions beyond the nearest neighbors and a state dependent -coupling constant. This latter expression can be formulated as -a matrix-product -$$ -\begin{align} - \boldsymbol{H} = \boldsymbol{X} J, -\tag{23} -\end{align} -$$ +where \( s_i \in \{-1, 1\} \) and \( s_{N + 1} = s_1 \). The number of spins +in the system is determined by \( L \). For the one-dimensional system +there is no phase transition.

    -where \( X_{jk} = s_j s_k \) and \( J \) is a matrix which consists of the -elements \( -J_{jk} \). This form of writing the energy fits perfectly -with the form utilized in linear regression, that is - -$$ -\begin{align} - \boldsymbol{y} = \boldsymbol{X}\boldsymbol{\beta} + \boldsymbol{\epsilon}, -\tag{24} -\end{align} -$$ - -

    -We split the data in training and test data as discussed in the previous example +We will look at a system of \( L = 40 \) spins with a coupling constant of +\( J = 1 \). To get enough training data we will generate 10000 states +with their respective energies.

    -

    X = np.zeros((n, L ** 2))
    +
    import numpy as np
    +import matplotlib.pyplot as plt
    +from mpl_toolkits.axes_grid1 import make_axes_locatable
    +import seaborn as sns
    +import scipy.linalg as scl
    +from sklearn.model_selection import train_test_split
    +import tqdm
    +sns.set(color_codes=True)
    +cmap_args=dict(vmin=-1., vmax=1., cmap='seismic')
    +
    +L = 40
    +n = int(1e4)
    +
    +spins = np.random.choice([-1, 1], size=(n, L))
    +J = 1.0
    +
    +energies = np.zeros(n)
    +
     for i in range(n):
    -    X[i] = np.outer(spins[i], spins[i]).ravel()
    -y = energies
    -X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)
    +    energies[i] = - J * np.dot(spins[i], np.roll(spins[i], 1))
     
    +

    +Here we use ordinary least squares +regression to predict the energy for the nearest neighbor +one-dimensional Ising model on a ring, i.e., the endpoints wrap +around. We will use linear regression to fit a value for +the coupling constant to achieve this. +

    @@ -453,6 +462,7 @@ X_train, X_test, y_train, y_test = train_tes

  • 102
  • 103
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs097.html b/doc/pub/Regression/html/._Regression-bs097.html index 548459001..0602d66f5 100644 --- a/doc/pub/Regression/html/._Regression-bs097.html +++ b/doc/pub/Regression/html/._Regression-bs097.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,50 +385,52 @@ MathJax.Hub.Config({ -

    Linear regression

    +

    Reformulating the problem to suit regression

    -In the ordinary least squares method we choose the cost function +A more general form for the one-dimensional Ising model is $$ \begin{align} - C(\boldsymbol{X}, \boldsymbol{\beta})= \frac{1}{n}\left\{(\boldsymbol{X}\boldsymbol{\beta} - \boldsymbol{y})^T(\boldsymbol{X}\boldsymbol{\beta} - \boldsymbol{y})\right\}. -\tag{25} + H = - \sum_j^L \sum_k^L s_j s_k J_{jk}. +\tag{22} \end{align} $$

    -We then find the extremal point of \( C \) by taking the derivative with respect to \( \boldsymbol{\beta} \) as discussed above. -This yields the expression for \( \boldsymbol{\beta} \) to be - +Here we allow for interactions beyond the nearest neighbors and a state dependent +coupling constant. This latter expression can be formulated as +a matrix-product $$ - \boldsymbol{\beta} = \frac{\boldsymbol{X}^T \boldsymbol{y}}{\boldsymbol{X}^T \boldsymbol{X}}, +\begin{align} + \boldsymbol{H} = \boldsymbol{X} J, +\tag{23} +\end{align} $$

    -which immediately imposes some requirements on \( \boldsymbol{X} \) as there must exist -an inverse of \( \boldsymbol{X}^T \boldsymbol{X} \). If the expression we are modeling contains an -intercept, i.e., a constant term, we must make sure that the -first column of \( \boldsymbol{X} \) consists of \( 1 \). We do this here +where \( X_{jk} = s_j s_k \) and \( J \) is a matrix which consists of the +elements \( -J_{jk} \). This form of writing the energy fits perfectly +with the form utilized in linear regression, that is + +$$ +\begin{align} + \boldsymbol{y} = \boldsymbol{X}\boldsymbol{\beta} + \boldsymbol{\epsilon}, +\tag{24} +\end{align} +$$ + +

    +We split the data in training and test data as discussed in the previous example

    -

    X_train_own = np.concatenate(
    -    (np.ones(len(X_train))[:, np.newaxis], X_train),
    -    axis=1
    -)
    -X_test_own = np.concatenate(
    -    (np.ones(len(X_test))[:, np.newaxis], X_test),
    -    axis=1
    -)
    -
    -

    - - -

    def ols_inv(x: np.ndarray, y: np.ndarray) -> np.ndarray:
    -    return scl.inv(x.T @ x) @ (x.T @ y)
    -beta = ols_inv(X_train_own, y_train)
    +
    X = np.zeros((n, L ** 2))
    +for i in range(n):
    +    X[i] = np.outer(spins[i], spins[i]).ravel()
    +y = energies
    +X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)
     

    @@ -450,6 +454,7 @@ beta = ols_inv(X_train_own, y_train)

  • 102
  • 103
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs098.html b/doc/pub/Regression/html/._Regression-bs098.html index 0dd8464db..dc8407dfa 100644 --- a/doc/pub/Regression/html/._Regression-bs098.html +++ b/doc/pub/Regression/html/._Regression-bs098.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,90 +385,51 @@ MathJax.Hub.Config({ -

    Singular Value decomposition

    +

    Linear regression

    -Doing the inversion directly turns out to be a bad idea since the matrix -\( \boldsymbol{X}^T\boldsymbol{X} \) is singular. An alternative approach is to use the singular -value decomposition. Using the definition of the Moore-Penrose -pseudoinverse we can write the equation for \( \boldsymbol{\beta} \) as +In the ordinary least squares method we choose the cost function -$$ - \boldsymbol{\beta} = \boldsymbol{X}^{+}\boldsymbol{y}, -$$ - -

    -where the pseudoinverse of \( \boldsymbol{X} \) is given by - -$$ - \boldsymbol{X}^{+} = \frac{\boldsymbol{X}^T}{\boldsymbol{X}^T\boldsymbol{X}}. -$$ - -

    -Using singular value decomposition we can decompose the matrix \( \boldsymbol{X} = \boldsymbol{U}\boldsymbol{\Sigma} \boldsymbol{V}^T \), -where \( \boldsymbol{U} \) and \( \boldsymbol{V} \) are orthogonal(unitary) matrices and \( \boldsymbol{\Sigma} \) contains the singular values (more details below). -where \( X^{+} = V\Sigma^{+} U^T \). This reduces the equation for -\( \omega \) to $$ \begin{align} - \boldsymbol{\beta} = \boldsymbol{V}\boldsymbol{\Sigma}^{+} \boldsymbol{U}^T \boldsymbol{y}. -\tag{26} + C(\boldsymbol{X}, \boldsymbol{\beta})= \frac{1}{n}\left\{(\boldsymbol{X}\boldsymbol{\beta} - \boldsymbol{y})^T(\boldsymbol{X}\boldsymbol{\beta} - \boldsymbol{y})\right\}. +\tag{25} \end{align} $$

    -Note that solving this equation by actually doing the pseudoinverse -(which is what we will do) is not a good idea as this operation scales -as \( \mathcal{O}(n^3) \), where \( n \) is the number of elements in a -general matrix. Instead, doing \( QR \)-factorization and solving the -linear system as an equation would reduce this down to -\( \mathcal{O}(n^2) \) operations. +We then find the extremal point of \( C \) by taking the derivative with respect to \( \boldsymbol{\beta} \) as discussed above. +This yields the expression for \( \boldsymbol{\beta} \) to be + +$$ + \boldsymbol{\beta} = \frac{\boldsymbol{X}^T \boldsymbol{y}}{\boldsymbol{X}^T \boldsymbol{X}}, +$$ + +

    +which immediately imposes some requirements on \( \boldsymbol{X} \) as there must exist +an inverse of \( \boldsymbol{X}^T \boldsymbol{X} \). If the expression we are modeling contains an +intercept, i.e., a constant term, we must make sure that the +first column of \( \boldsymbol{X} \) consists of \( 1 \). We do this here

    -

    def ols_svd(x: np.ndarray, y: np.ndarray) -> np.ndarray:
    -    u, s, v = scl.svd(x)
    -    return v.T @ scl.pinv(scl.diagsvd(s, u.shape[0], v.shape[0])) @ u.T @ y
    +
    X_train_own = np.concatenate(
    +    (np.ones(len(X_train))[:, np.newaxis], X_train),
    +    axis=1
    +)
    +X_test_own = np.concatenate(
    +    (np.ones(len(X_test))[:, np.newaxis], X_test),
    +    axis=1
    +)
     

    -

    beta = ols_svd(X_train_own,y_train)
    +
    def ols_inv(x: np.ndarray, y: np.ndarray) -> np.ndarray:
    +    return scl.inv(x.T @ x) @ (x.T @ y)
    +beta = ols_inv(X_train_own, y_train)
     
    -

    -When extracting the \( J \)-matrix we need to make sure that we remove the intercept, as is done here - -

    - - -

    J = beta[1:].reshape(L, L)
    -
    -

    -A way of looking at the coefficients in \( J \) is to plot the matrices as images. - -

    - - -

    fig = plt.figure(figsize=(20, 14))
    -im = plt.imshow(J, **cmap_args)
    -plt.title("OLS", fontsize=18)
    -plt.xticks(fontsize=18)
    -plt.yticks(fontsize=18)
    -cb = fig.colorbar(im)
    -cb.ax.set_yticklabels(cb.ax.get_yticklabels(), fontsize=18)
    -plt.show()
    -
    -

    -It is interesting to note that OLS -considers both \( J_{j, j + 1} = -0.5 \) and \( J_{j, j - 1} = -0.5 \) as -valid matrix elements for \( J \). -In our discussion below on hyperparameters and Ridge and Lasso regression we will see that -this problem can be removed, partly and only with Lasso regression. - -

    -In this case our matrix inversion was actually possible. The obvious question now is what is the mathematics behind the SVD? -

    @@ -488,6 +451,7 @@ In this case our matrix inversion was actually possible. The obvious question no

  • 102
  • 103
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs099.html b/doc/pub/Regression/html/._Regression-bs099.html index fcf2eeaf6..638295d91 100644 --- a/doc/pub/Regression/html/._Regression-bs099.html +++ b/doc/pub/Regression/html/._Regression-bs099.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,128 +385,74 @@ MathJax.Hub.Config({ -

    The one-dimensional Ising model

    +

    Singular Value decomposition

    -Let us bring back the Ising model again, but now with an additional -focus on Ridge and Lasso regression as well. We repeat some of the -basic parts of the Ising model and the setup of the training and test -data. The one-dimensional Ising model with nearest neighbor -interaction, no external field and a constant coupling constant \( J \) is -given by +Doing the inversion directly turns out to be a bad idea since the matrix +\( \boldsymbol{X}^T\boldsymbol{X} \) is singular. An alternative approach is to use the singular +value decomposition. Using the definition of the Moore-Penrose +pseudoinverse we can write the equation for \( \boldsymbol{\beta} \) as +$$ + \boldsymbol{\beta} = \boldsymbol{X}^{+}\boldsymbol{y}, +$$ + +

    +where the pseudoinverse of \( \boldsymbol{X} \) is given by + +$$ + \boldsymbol{X}^{+} = \frac{\boldsymbol{X}^T}{\boldsymbol{X}^T\boldsymbol{X}}. +$$ + +

    +Using singular value decomposition we can decompose the matrix \( \boldsymbol{X} = \boldsymbol{U}\boldsymbol{\Sigma} \boldsymbol{V}^T \), +where \( \boldsymbol{U} \) and \( \boldsymbol{V} \) are orthogonal(unitary) matrices and \( \boldsymbol{\Sigma} \) contains the singular values (more details below). +where \( X^{+} = V\Sigma^{+} U^T \). This reduces the equation for +\( \omega \) to $$ \begin{align} - H = -J \sum_{k}^L s_k s_{k + 1}, -\tag{27} -\end{align} -$$ - -where \( s_i \in \{-1, 1\} \) and \( s_{N + 1} = s_1 \). The number of spins in the system is determined by \( L \). For the one-dimensional system there is no phase transition. - -

    -We will look at a system of \( L = 40 \) spins with a coupling constant of \( J = 1 \). To get enough training data we will generate 10000 states with their respective energies. - -

    - - -

    import numpy as np
    -import matplotlib.pyplot as plt
    -from mpl_toolkits.axes_grid1 import make_axes_locatable
    -import seaborn as sns
    -import scipy.linalg as scl
    -from sklearn.model_selection import train_test_split
    -import sklearn.linear_model as skl
    -import tqdm
    -sns.set(color_codes=True)
    -cmap_args=dict(vmin=-1., vmax=1., cmap='seismic')
    -
    -L = 40
    -n = int(1e4)
    -
    -spins = np.random.choice([-1, 1], size=(n, L))
    -J = 1.0
    -
    -energies = np.zeros(n)
    -
    -for i in range(n):
    -    energies[i] = - J * np.dot(spins[i], np.roll(spins[i], 1))
    -
    -

    -A more general form for the one-dimensional Ising model is - -$$ -\begin{align} - H = - \sum_j^L \sum_k^L s_j s_k J_{jk}. -\tag{28} + \boldsymbol{\beta} = \boldsymbol{V}\boldsymbol{\Sigma}^{+} \boldsymbol{U}^T \boldsymbol{y}. +\tag{26} \end{align} $$

    -Here we allow for interactions beyond the nearest neighbors and a more -adaptive coupling matrix. This latter expression can be formulated as -a matrix-product on the form -$$ -\begin{align} - H = X J, -\tag{29} -\end{align} -$$ - -

    -where \( X_{jk} = s_j s_k \) and \( J \) is the matrix consisting of the -elements \( -J_{jk} \). This form of writing the energy fits perfectly -with the form utilized in linear regression, viz. -$$ -\begin{align} - \boldsymbol{y} = \boldsymbol{X}\boldsymbol{\beta} + \boldsymbol{\epsilon}. -\tag{30} -\end{align} -$$ - -We organize the data as we did above -

    - - -

    X = np.zeros((n, L ** 2))
    -for i in range(n):
    -    X[i] = np.outer(spins[i], spins[i]).ravel()
    -y = energies
    -X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.96)
    -
    -X_train_own = np.concatenate(
    -    (np.ones(len(X_train))[:, np.newaxis], X_train),
    -    axis=1
    -)
    -
    -X_test_own = np.concatenate(
    -    (np.ones(len(X_test))[:, np.newaxis], X_test),
    -    axis=1
    -)
    -
    -

    -We will do all fitting with Scikit-Learn, +Note that solving this equation by actually doing the pseudoinverse +(which is what we will do) is not a good idea as this operation scales +as \( \mathcal{O}(n^3) \), where \( n \) is the number of elements in a +general matrix. Instead, doing \( QR \)-factorization and solving the +linear system as an equation would reduce this down to +\( \mathcal{O}(n^2) \) operations.

    -

    clf = skl.LinearRegression().fit(X_train, y_train)
    +
    def ols_svd(x: np.ndarray, y: np.ndarray) -> np.ndarray:
    +    u, s, v = scl.svd(x)
    +    return v.T @ scl.pinv(scl.diagsvd(s, u.shape[0], v.shape[0])) @ u.T @ y
     

    -When extracting the \( J \)-matrix we make sure to remove the intercept -

    -

    J_sk = clf.coef_.reshape(L, L)
    +
    beta = ols_svd(X_train_own,y_train)
     

    -And then we plot the results +When extracting the \( J \)-matrix we need to make sure that we remove the intercept, as is done here + +

    + + +

    J = beta[1:].reshape(L, L)
    +
    +

    +A way of looking at the coefficients in \( J \) is to plot the matrices as images. +

    fig = plt.figure(figsize=(20, 14))
    -im = plt.imshow(J_sk, **cmap_args)
    -plt.title("LinearRegression from Scikit-learn", fontsize=18)
    +im = plt.imshow(J, **cmap_args)
    +plt.title("OLS", fontsize=18)
     plt.xticks(fontsize=18)
     plt.yticks(fontsize=18)
     cb = fig.colorbar(im)
    @@ -512,7 +460,14 @@ cb.ax.se
     plt.show()
     

    -The results perfectly with our previous discussion where we used our own code. +It is interesting to note that OLS +considers both \( J_{j, j + 1} = -0.5 \) and \( J_{j, j - 1} = -0.5 \) as +valid matrix elements for \( J \). +In our discussion below on hyperparameters and Ridge and Lasso regression we will see that +this problem can be removed, partly and only with Lasso regression. + +

    +In this case our matrix inversion was actually possible. The obvious question now is what is the mathematics behind the SVD?

    @@ -534,6 +489,7 @@ The results perfectly with our previous discussion where we used our own code.

  • 102
  • 103
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs100.html b/doc/pub/Regression/html/._Regression-bs100.html index c4fd86968..a90edcf83 100644 --- a/doc/pub/Regression/html/._Regression-bs100.html +++ b/doc/pub/Regression/html/._Regression-bs100.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,38 +385,137 @@ MathJax.Hub.Config({ -

    Ridge regression

    +

    The one-dimensional Ising model

    -Having explored the ordinary least squares we move on to ridge -regression. In ridge regression we include a regularizer. This -involves a new cost function which leads to a new estimate for the -weights \( \boldsymbol{\beta} \). This results in a penalized regression problem. The -cost function is given by +Let us bring back the Ising model again, but now with an additional +focus on Ridge and Lasso regression as well. We repeat some of the +basic parts of the Ising model and the setup of the training and test +data. The one-dimensional Ising model with nearest neighbor +interaction, no external field and a constant coupling constant \( J \) is +given by $$ \begin{align} - C(\boldsymbol{X}, \boldsymbol{\beta}; \lambda) = (\boldsymbol{X}\boldsymbol{\beta} - \boldsymbol{y})^T(\boldsymbol{X}\boldsymbol{\beta} - \boldsymbol{y}) + \lambda \boldsymbol{\beta}^T\boldsymbol{\beta}. -\tag{31} + H = -J \sum_{k}^L s_k s_{k + 1}, +\tag{27} \end{align} $$ +where \( s_i \in \{-1, 1\} \) and \( s_{N + 1} = s_1 \). The number of spins in the system is determined by \( L \). For the one-dimensional system there is no phase transition. + +

    +We will look at a system of \( L = 40 \) spins with a coupling constant of \( J = 1 \). To get enough training data we will generate 10000 states with their respective energies. +

    -

    _lambda = 0.1
    -clf_ridge = skl.Ridge(alpha=_lambda).fit(X_train, y_train)
    -J_ridge_sk = clf_ridge.coef_.reshape(L, L)
    -fig = plt.figure(figsize=(20, 14))
    -im = plt.imshow(J_ridge_sk, **cmap_args)
    -plt.title("Ridge from Scikit-learn", fontsize=18)
    +
    import numpy as np
    +import matplotlib.pyplot as plt
    +from mpl_toolkits.axes_grid1 import make_axes_locatable
    +import seaborn as sns
    +import scipy.linalg as scl
    +from sklearn.model_selection import train_test_split
    +import sklearn.linear_model as skl
    +import tqdm
    +sns.set(color_codes=True)
    +cmap_args=dict(vmin=-1., vmax=1., cmap='seismic')
    +
    +L = 40
    +n = int(1e4)
    +
    +spins = np.random.choice([-1, 1], size=(n, L))
    +J = 1.0
    +
    +energies = np.zeros(n)
    +
    +for i in range(n):
    +    energies[i] = - J * np.dot(spins[i], np.roll(spins[i], 1))
    +
    +

    +A more general form for the one-dimensional Ising model is + +$$ +\begin{align} + H = - \sum_j^L \sum_k^L s_j s_k J_{jk}. +\tag{28} +\end{align} +$$ + +

    +Here we allow for interactions beyond the nearest neighbors and a more +adaptive coupling matrix. This latter expression can be formulated as +a matrix-product on the form +$$ +\begin{align} + H = X J, +\tag{29} +\end{align} +$$ + +

    +where \( X_{jk} = s_j s_k \) and \( J \) is the matrix consisting of the +elements \( -J_{jk} \). This form of writing the energy fits perfectly +with the form utilized in linear regression, viz. +$$ +\begin{align} + \boldsymbol{y} = \boldsymbol{X}\boldsymbol{\beta} + \boldsymbol{\epsilon}. +\tag{30} +\end{align} +$$ + +We organize the data as we did above +

    + + +

    X = np.zeros((n, L ** 2))
    +for i in range(n):
    +    X[i] = np.outer(spins[i], spins[i]).ravel()
    +y = energies
    +X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.96)
    +
    +X_train_own = np.concatenate(
    +    (np.ones(len(X_train))[:, np.newaxis], X_train),
    +    axis=1
    +)
    +
    +X_test_own = np.concatenate(
    +    (np.ones(len(X_test))[:, np.newaxis], X_test),
    +    axis=1
    +)
    +
    +

    +We will do all fitting with Scikit-Learn, + +

    + + +

    clf = skl.LinearRegression().fit(X_train, y_train)
    +
    +

    +When extracting the \( J \)-matrix we make sure to remove the intercept +

    + + +

    J_sk = clf.coef_.reshape(L, L)
    +
    +

    +And then we plot the results +

    + + +

    fig = plt.figure(figsize=(20, 14))
    +im = plt.imshow(J_sk, **cmap_args)
    +plt.title("LinearRegression from Scikit-learn", fontsize=18)
     plt.xticks(fontsize=18)
     plt.yticks(fontsize=18)
     cb = fig.colorbar(im)
     cb.ax.set_yticklabels(cb.ax.get_yticklabels(), fontsize=18)
    -
     plt.show()
     
    +

    +The results perfectly with our previous discussion where we used our own code. +

    @@ -434,6 +535,7 @@ plt.show()

  • 102
  • 103
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs101.html b/doc/pub/Regression/html/._Regression-bs101.html index 4ee0509a5..1defa4905 100644 --- a/doc/pub/Regression/html/._Regression-bs101.html +++ b/doc/pub/Regression/html/._Regression-bs101.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,29 +385,31 @@ MathJax.Hub.Config({ -

    LASSO regression

    +

    Ridge regression

    -In the Least Absolute Shrinkage and Selection Operator (LASSO)-method we get a third cost function. +Having explored the ordinary least squares we move on to ridge +regression. In ridge regression we include a regularizer. This +involves a new cost function which leads to a new estimate for the +weights \( \boldsymbol{\beta} \). This results in a penalized regression problem. The +cost function is given by $$ \begin{align} - C(\boldsymbol{X}, \boldsymbol{\beta}; \lambda) = (\boldsymbol{X}\boldsymbol{\beta} - \boldsymbol{y})^T(\boldsymbol{X}\boldsymbol{\beta} - \boldsymbol{y}) + \lambda \sqrt{\boldsymbol{\beta}^T\boldsymbol{\beta}}. -\tag{32} + C(\boldsymbol{X}, \boldsymbol{\beta}; \lambda) = (\boldsymbol{X}\boldsymbol{\beta} - \boldsymbol{y})^T(\boldsymbol{X}\boldsymbol{\beta} - \boldsymbol{y}) + \lambda \boldsymbol{\beta}^T\boldsymbol{\beta}. +\tag{31} \end{align} $$ -

    -Finding the extremal point of this cost function is not so straight-forward as in least squares and ridge. We will therefore rely solely on the function ``Lasso`` from Scikit-Learn. -

    -

    clf_lasso = skl.Lasso(alpha=_lambda).fit(X_train, y_train)
    -J_lasso_sk = clf_lasso.coef_.reshape(L, L)
    +
    _lambda = 0.1
    +clf_ridge = skl.Ridge(alpha=_lambda).fit(X_train, y_train)
    +J_ridge_sk = clf_ridge.coef_.reshape(L, L)
     fig = plt.figure(figsize=(20, 14))
    -im = plt.imshow(J_lasso_sk, **cmap_args)
    -plt.title("Lasso from Scikit-learn", fontsize=18)
    +im = plt.imshow(J_ridge_sk, **cmap_args)
    +plt.title("Ridge from Scikit-learn", fontsize=18)
     plt.xticks(fontsize=18)
     plt.yticks(fontsize=18)
     cb = fig.colorbar(im)
    @@ -413,11 +417,6 @@ cb.ax.se
     
     plt.show()
     
    -

    -It is quite striking how LASSO breaks the symmetry of the coupling -constant as opposed to ridge and OLS. We get a sparse solution with -\( J_{j, j + 1} = -1 \). -

    @@ -436,6 +435,7 @@ constant as opposed to ridge and OLS. We get a sparse solution with

  • 102
  • 103
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs102.html b/doc/pub/Regression/html/._Regression-bs102.html index 2b93c0821..29c7de263 100644 --- a/doc/pub/Regression/html/._Regression-bs102.html +++ b/doc/pub/Regression/html/._Regression-bs102.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,56 +385,40 @@ MathJax.Hub.Config({ -

    Performance as function of the regularization parameter

    +

    LASSO regression

    -We see how the different models perform for a different set of values for \( \lambda \). +In the Least Absolute Shrinkage and Selection Operator (LASSO)-method we get a third cost function. + +$$ +\begin{align} + C(\boldsymbol{X}, \boldsymbol{\beta}; \lambda) = (\boldsymbol{X}\boldsymbol{\beta} - \boldsymbol{y})^T(\boldsymbol{X}\boldsymbol{\beta} - \boldsymbol{y}) + \lambda \sqrt{\boldsymbol{\beta}^T\boldsymbol{\beta}}. +\tag{32} +\end{align} +$$ + +

    +Finding the extremal point of this cost function is not so straight-forward as in least squares and ridge. We will therefore rely solely on the function ``Lasso`` from Scikit-Learn.

    -

    lambdas = np.logspace(-4, 5, 10)
    -
    -train_errors = {
    -    "ols_sk": np.zeros(lambdas.size),
    -    "ridge_sk": np.zeros(lambdas.size),
    -    "lasso_sk": np.zeros(lambdas.size)
    -}
    -
    -test_errors = {
    -    "ols_sk": np.zeros(lambdas.size),
    -    "ridge_sk": np.zeros(lambdas.size),
    -    "lasso_sk": np.zeros(lambdas.size)
    -}
    -
    -plot_counter = 1
    -
    -fig = plt.figure(figsize=(32, 54))
    -
    -for i, _lambda in enumerate(tqdm.tqdm(lambdas)):
    -    for key, method in zip(
    -        ["ols_sk", "ridge_sk", "lasso_sk"],
    -        [skl.LinearRegression(), skl.Ridge(alpha=_lambda), skl.Lasso(alpha=_lambda)]
    -    ):
    -        method = method.fit(X_train, y_train)
    -
    -        train_errors[key][i] = method.score(X_train, y_train)
    -        test_errors[key][i] = method.score(X_test, y_test)
    -
    -        omega = method.coef_.reshape(L, L)
    -
    -        plt.subplot(10, 5, plot_counter)
    -        plt.imshow(omega, **cmap_args)
    -        plt.title(r"%s, $\lambda = %.4f$" % (key, _lambda))
    -        plot_counter += 1
    +
    clf_lasso = skl.Lasso(alpha=_lambda).fit(X_train, y_train)
    +J_lasso_sk = clf_lasso.coef_.reshape(L, L)
    +fig = plt.figure(figsize=(20, 14))
    +im = plt.imshow(J_lasso_sk, **cmap_args)
    +plt.title("Lasso from Scikit-learn", fontsize=18)
    +plt.xticks(fontsize=18)
    +plt.yticks(fontsize=18)
    +cb = fig.colorbar(im)
    +cb.ax.set_yticklabels(cb.ax.get_yticklabels(), fontsize=18)
     
     plt.show()
     

    -We see that LASSO reaches a good solution for low -values of \( \lambda \), but will "wither" when we increase \( \lambda \) too -much. Ridge is more stable over a larger range of values for -\( \lambda \), but eventually also fades away. +It is quite striking how LASSO breaks the symmetry of the coupling +constant as opposed to ridge and OLS. We get a sparse solution with +\( J_{j, j + 1} = -1 \).

    @@ -451,6 +437,7 @@ much. Ridge is more stable over a larger range of values for

  • 102
  • 103
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs103.html b/doc/pub/Regression/html/._Regression-bs103.html index f14984238..a2a6b9e32 100644 --- a/doc/pub/Regression/html/._Regression-bs103.html +++ b/doc/pub/Regression/html/._Regression-bs103.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -383,57 +385,58 @@ MathJax.Hub.Config({ -

    Finding the optimal value of \( \lambda \)

    +

    Performance as function of the regularization parameter

    -To determine which value of \( \lambda \) is best we plot the accuracy of -the models when predicting the training and the testing set. We expect -the accuracy of the training set to be quite good, but if the accuracy -of the testing set is much lower this tells us that we might be -subject to an overfit model. The ideal scenario is an accuracy on the -testing set that is close to the accuracy of the training set. +We see how the different models perform for a different set of values for \( \lambda \).

    -

    fig = plt.figure(figsize=(20, 14))
    +
    lambdas = np.logspace(-4, 5, 10)
     
    -colors = {
    -    "ols_sk": "r",
    -    "ridge_sk": "y",
    -    "lasso_sk": "c"
    +train_errors = {
    +    "ols_sk": np.zeros(lambdas.size),
    +    "ridge_sk": np.zeros(lambdas.size),
    +    "lasso_sk": np.zeros(lambdas.size)
     }
     
    -for key in train_errors:
    -    plt.semilogx(
    -        lambdas,
    -        train_errors[key],
    -        colors[key],
    -        label="Train {0}".format(key),
    -        linewidth=4.0
    -    )
    +test_errors = {
    +    "ols_sk": np.zeros(lambdas.size),
    +    "ridge_sk": np.zeros(lambdas.size),
    +    "lasso_sk": np.zeros(lambdas.size)
    +}
    +
    +plot_counter = 1
    +
    +fig = plt.figure(figsize=(32, 54))
    +
    +for i, _lambda in enumerate(tqdm.tqdm(lambdas)):
    +    for key, method in zip(
    +        ["ols_sk", "ridge_sk", "lasso_sk"],
    +        [skl.LinearRegression(), skl.Ridge(alpha=_lambda), skl.Lasso(alpha=_lambda)]
    +    ):
    +        method = method.fit(X_train, y_train)
    +
    +        train_errors[key][i] = method.score(X_train, y_train)
    +        test_errors[key][i] = method.score(X_test, y_test)
    +
    +        omega = method.coef_.reshape(L, L)
    +
    +        plt.subplot(10, 5, plot_counter)
    +        plt.imshow(omega, **cmap_args)
    +        plt.title(r"%s, $\lambda = %.4f$" % (key, _lambda))
    +        plot_counter += 1
     
    -for key in test_errors:
    -    plt.semilogx(
    -        lambdas,
    -        test_errors[key],
    -        colors[key] + "--",
    -        label="Test {0}".format(key),
    -        linewidth=4.0
    -    )
    -plt.legend(loc="best", fontsize=18)
    -plt.xlabel(r"$\lambda$", fontsize=18)
    -plt.ylabel(r"$R^2$", fontsize=18)
    -plt.tick_params(labelsize=18)
     plt.show()
     

    -From the above figure we can see that LASSO with \( \lambda = 10^{-2} \) -achieves a very good accuracy on the test set. This by far surpasses the -other models for all values of \( \lambda \). +We see that LASSO reaches a good solution for low +values of \( \lambda \), but will "wither" when we increase \( \lambda \) too +much. Ridge is more stable over a larger range of values for +\( \lambda \), but eventually also fades away.

    -

      @@ -449,6 +452,8 @@ other models for all values of \( \lambda \).
    • 102
    • 103
    • 104
    • +
    • 105
    • +
    • »
    diff --git a/doc/pub/Regression/html/._Regression-bs104.html b/doc/pub/Regression/html/._Regression-bs104.html index 8ab42cd7c..5e2247c2c 100644 --- a/doc/pub/Regression/html/._Regression-bs104.html +++ b/doc/pub/Regression/html/._Regression-bs104.html @@ -6,6 +6,7 @@ Automatically generated HTML file from DocOnce source + Data Analysis and Machine Learning: Linear Regression and more Advanced Regression Analysis @@ -40,215 +41,194 @@ Automatically generated HTML file from DocOnce source @@ -286,119 +266,110 @@ MathJax.Hub.Config({ @@ -414,60 +385,57 @@ MathJax.Hub.Config({ -

    Reformulating the problem to suit regression

    +

    Finding the optimal value of \( \lambda \)

    -A more general form for the one-dimensional Ising model is - -$$ -\begin{align} - H = - \sum_j^L \sum_k^L s_j s_k J_{jk}. -\tag{31} -\end{align} -$$ - -

    -Here we allow for interactions beyond the nearest neighbors and a more -adaptive coupling matrix. This latter expression can be formulated as -a matrix-product on the form -$$ -\begin{align} - H = X J, -\tag{32} -\end{align} -$$ - -

    -where \( X_{jk} = s_j s_k \) and \( J \) is the matrix consisting of the -elements \( -J_{jk} \). This form of writing the energy fits perfectly -with the form utilized in linear regression, viz. -$$ -\begin{align} - y = X\omega + \epsilon, -\tag{33} -\end{align} -$$ +To determine which value of \( \lambda \) is best we plot the accuracy of +the models when predicting the training and the testing set. We expect +the accuracy of the training set to be quite good, but if the accuracy +of the testing set is much lower this tells us that we might be +subject to an overfit model. The ideal scenario is an accuracy on the +testing set that is close to the accuracy of the training set.

    -

    X = np.zeros((n, L ** 2))
    -for i in range(n):
    -    X[i] = np.outer(spins[i], spins[i]).ravel()
    -y = energies
    -X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.96)
    +
    fig = plt.figure(figsize=(20, 14))
     
    -X_train_own = np.concatenate(
    -    (np.ones(len(X_train))[:, np.newaxis], X_train),
    -    axis=1
    -)
    +colors = {
    +    "ols_sk": "r",
    +    "ridge_sk": "y",
    +    "lasso_sk": "c"
    +}
     
    -X_test_own = np.concatenate(
    -    (np.ones(len(X_test))[:, np.newaxis], X_test),
    -    axis=1
    -)
    +for key in train_errors:
    +    plt.semilogx(
    +        lambdas,
    +        train_errors[key],
    +        colors[key],
    +        label="Train {0}".format(key),
    +        linewidth=4.0
    +    )
    +
    +for key in test_errors:
    +    plt.semilogx(
    +        lambdas,
    +        test_errors[key],
    +        colors[key] + "--",
    +        label="Test {0}".format(key),
    +        linewidth=4.0
    +    )
    +plt.legend(loc="best", fontsize=18)
    +plt.xlabel(r"$\lambda$", fontsize=18)
    +plt.ylabel(r"$R^2$", fontsize=18)
    +plt.tick_params(labelsize=18)
    +plt.show()
     

    +From the above figure we can see that LASSO with \( \lambda = 10^{-2} \) +achieves a very good accuracy on the test set. This by far surpasses the +other models for all values of \( \lambda \). + +

    +

    diff --git a/doc/pub/Regression/html/Regression-bs.html b/doc/pub/Regression/html/Regression-bs.html index 24bc1d993..cd3e72be9 100644 --- a/doc/pub/Regression/html/Regression-bs.html +++ b/doc/pub/Regression/html/Regression-bs.html @@ -122,112 +122,113 @@ Automatically generated HTML file from DocOnce source ('More on Ridge Regression', 2, None, '___sec38'), ('Interpreting the Ridge results', 2, None, '___sec39'), ('More interpretations', 2, None, '___sec40'), - ('Where are we going?', 2, None, '___sec41'), - ('Resampling methods', 2, None, '___sec42'), + ('Some simple codes for the SVD', 2, None, '___sec41'), + ('Where are we going?', 2, None, '___sec42'), + ('Resampling methods', 2, None, '___sec43'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec43'), - ('Why resampling methods ?', 2, None, '___sec44'), - ('Statistical analysis', 2, None, '___sec45'), - ('Statistics', 2, None, '___sec46'), - ('Statistics, moments', 2, None, '___sec47'), - ('Statistics, central moments', 2, None, '___sec48'), - ('Statistics, covariance', 2, None, '___sec49'), - ('Statistics, more covariance', 2, None, '___sec50'), - ('Covariance example', 2, None, '___sec51'), - ('Covariance in numpy', 2, None, '___sec52'), - ('Statistics, independent variables', 2, None, '___sec53'), - ('Statistics, more variance', 2, None, '___sec54'), - ('Statistics and stochastic processes', 2, None, '___sec55'), - ('Statistics and sample variables', 2, None, '___sec56'), + '___sec44'), + ('Why resampling methods ?', 2, None, '___sec45'), + ('Statistical analysis', 2, None, '___sec46'), + ('Statistics', 2, None, '___sec47'), + ('Statistics, moments', 2, None, '___sec48'), + ('Statistics, central moments', 2, None, '___sec49'), + ('Statistics, covariance', 2, None, '___sec50'), + ('Statistics, more covariance', 2, None, '___sec51'), + ('Covariance example', 2, None, '___sec52'), + ('Covariance in numpy', 2, None, '___sec53'), + ('Statistics, independent variables', 2, None, '___sec54'), + ('Statistics, more variance', 2, None, '___sec55'), + ('Statistics and stochastic processes', 2, None, '___sec56'), + ('Statistics and sample variables', 2, None, '___sec57'), ('Statistics, sample variance and covariance', 2, None, - '___sec57'), - ('Statistics, law of large numbers', 2, None, '___sec58'), - ('Statistics, more on sample error', 2, None, '___sec59'), - ('Statistics', 2, None, '___sec60'), - ('Statistics, central limit theorem', 2, None, '___sec61'), - ('Statistics, more technicalities', 2, None, '___sec62'), - ('Statistics', 2, None, '___sec63'), - ('Statistics and sample variance', 2, None, '___sec64'), - ('Statistics, uncorrelated results', 2, None, '___sec65'), - ('Statistics, computations', 2, None, '___sec66'), + '___sec58'), + ('Statistics, law of large numbers', 2, None, '___sec59'), + ('Statistics, more on sample error', 2, None, '___sec60'), + ('Statistics', 2, None, '___sec61'), + ('Statistics, central limit theorem', 2, None, '___sec62'), + ('Statistics, more technicalities', 2, None, '___sec63'), + ('Statistics', 2, None, '___sec64'), + ('Statistics and sample variance', 2, None, '___sec65'), + ('Statistics, uncorrelated results', 2, None, '___sec66'), + ('Statistics, computations', 2, None, '___sec67'), ('Statistics, more on computations of errors', 2, None, - '___sec67'), - ('Statistics, wrapping up 1', 2, None, '___sec68'), - ('Statistics, final expression', 2, None, '___sec69'), + '___sec68'), + ('Statistics, wrapping up 1', 2, None, '___sec69'), + ('Statistics, final expression', 2, None, '___sec70'), ('Statistics, effective number of correlations', 2, None, - '___sec70'), + '___sec71'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec71'), - ('Assumptions made', 2, None, '___sec72'), - ('Expectation value and variance', 2, None, '___sec73'), + '___sec72'), + ('Assumptions made', 2, None, '___sec73'), + ('Expectation value and variance', 2, None, '___sec74'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec74'), - ('Cross-validation', 2, None, '___sec75'), - ('Computationally expensive', 2, None, '___sec76'), - ('Various steps in cross-validation', 2, None, '___sec77'), + '___sec75'), + ('Cross-validation', 2, None, '___sec76'), + ('Computationally expensive', 2, None, '___sec77'), + ('Various steps in cross-validation', 2, None, '___sec78'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec78'), + '___sec79'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec79'), - ('Resampling methods: Jackknife', 2, None, '___sec80'), - ('Jackknife code example', 2, None, '___sec81'), - ('Resampling methods: Bootstrap', 2, None, '___sec82'), - ('Resampling methods: Bootstrap background', 2, None, '___sec83'), + '___sec80'), + ('Resampling methods: Jackknife', 2, None, '___sec81'), + ('Jackknife code example', 2, None, '___sec82'), + ('Resampling methods: Bootstrap', 2, None, '___sec83'), + ('Resampling methods: Bootstrap background', 2, None, '___sec84'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec84'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec85'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec86'), - ('Code example for the Bootstrap method', 2, None, '___sec87'), + '___sec85'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec86'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec87'), + ('Code example for the Bootstrap method', 2, None, '___sec88'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec88'), - ('The bias-variance tradeoff', 2, None, '___sec89'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec90'), - ('Understanding what happens', 2, None, '___sec91'), - ('Summing up', 2, None, '___sec92'), + '___sec89'), + ('The bias-variance tradeoff', 2, None, '___sec90'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec91'), + ('Understanding what happens', 2, None, '___sec92'), + ('Summing up', 2, None, '___sec93'), ("Another Example rom Scikit-Learn's Repository", 2, None, - '___sec93'), - ('The Ising model', 2, None, '___sec94'), + '___sec94'), + ('The Ising model', 2, None, '___sec95'), ('Reformulating the problem to suit regression', 2, None, - '___sec95'), - ('Linear regression', 2, None, '___sec96'), - ('Singular Value decomposition', 2, None, '___sec97'), - ('The one-dimensional Ising model', 2, None, '___sec98'), - ('Ridge regression', 2, None, '___sec99'), - ('LASSO regression', 2, None, '___sec100'), + '___sec96'), + ('Linear regression', 2, None, '___sec97'), + ('Singular Value decomposition', 2, None, '___sec98'), + ('The one-dimensional Ising model', 2, None, '___sec99'), + ('Ridge regression', 2, None, '___sec100'), + ('LASSO regression', 2, None, '___sec101'), ('Performance as function of the regularization parameter', 2, None, - '___sec101'), + '___sec102'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec102')]} + '___sec103')]} end of tocinfo --> @@ -306,68 +307,69 @@ MathJax.Hub.Config({
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Where are we going?
  • -
  • Resampling methods
  • -
  • Resampling approaches can be computationally expensive
  • -
  • Why resampling methods ?
  • -
  • Statistical analysis
  • -
  • Statistics
  • -
  • Statistics, moments
  • -
  • Statistics, central moments
  • -
  • Statistics, covariance
  • -
  • Statistics, more covariance
  • -
  • Covariance example
  • -
  • Covariance in numpy
  • -
  • Statistics, independent variables
  • -
  • Statistics, more variance
  • -
  • Statistics and stochastic processes
  • -
  • Statistics and sample variables
  • -
  • Statistics, sample variance and covariance
  • -
  • Statistics, law of large numbers
  • -
  • Statistics, more on sample error
  • -
  • Statistics
  • -
  • Statistics, central limit theorem
  • -
  • Statistics, more technicalities
  • -
  • Statistics
  • -
  • Statistics and sample variance
  • -
  • Statistics, uncorrelated results
  • -
  • Statistics, computations
  • -
  • Statistics, more on computations of errors
  • -
  • Statistics, wrapping up 1
  • -
  • Statistics, final expression
  • -
  • Statistics, effective number of correlations
  • -
  • Linking the regression analysis with a statistical interpretation
  • -
  • Assumptions made
  • -
  • Expectation value and variance
  • -
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • -
  • Cross-validation
  • -
  • Computationally expensive
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Resampling methods: Jackknife and Bootstrap
  • -
  • Resampling methods: Jackknife
  • -
  • Jackknife code example
  • -
  • Resampling methods: Bootstrap
  • -
  • Resampling methods: Bootstrap background
  • -
  • Resampling methods: More Bootstrap background
  • -
  • Resampling methods: Bootstrap approach
  • -
  • Resampling methods: Bootstrap steps
  • -
  • Code example for the Bootstrap method
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example rom Scikit-Learn's Repository
  • -
  • The Ising model
  • -
  • Reformulating the problem to suit regression
  • -
  • Linear regression
  • -
  • Singular Value decomposition
  • -
  • The one-dimensional Ising model
  • -
  • Ridge regression
  • -
  • LASSO regression
  • -
  • Performance as function of the regularization parameter
  • -
  • Finding the optimal value of \( \lambda \)
  • +
  • Some simple codes for the SVD
  • +
  • Where are we going?
  • +
  • Resampling methods
  • +
  • Resampling approaches can be computationally expensive
  • +
  • Why resampling methods ?
  • +
  • Statistical analysis
  • +
  • Statistics
  • +
  • Statistics, moments
  • +
  • Statistics, central moments
  • +
  • Statistics, covariance
  • +
  • Statistics, more covariance
  • +
  • Covariance example
  • +
  • Covariance in numpy
  • +
  • Statistics, independent variables
  • +
  • Statistics, more variance
  • +
  • Statistics and stochastic processes
  • +
  • Statistics and sample variables
  • +
  • Statistics, sample variance and covariance
  • +
  • Statistics, law of large numbers
  • +
  • Statistics, more on sample error
  • +
  • Statistics
  • +
  • Statistics, central limit theorem
  • +
  • Statistics, more technicalities
  • +
  • Statistics
  • +
  • Statistics and sample variance
  • +
  • Statistics, uncorrelated results
  • +
  • Statistics, computations
  • +
  • Statistics, more on computations of errors
  • +
  • Statistics, wrapping up 1
  • +
  • Statistics, final expression
  • +
  • Statistics, effective number of correlations
  • +
  • Linking the regression analysis with a statistical interpretation
  • +
  • Assumptions made
  • +
  • Expectation value and variance
  • +
  • Expectation value and variance for \( \boldsymbol{\beta} \)
  • +
  • Cross-validation
  • +
  • Computationally expensive
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Resampling methods: Jackknife and Bootstrap
  • +
  • Resampling methods: Jackknife
  • +
  • Jackknife code example
  • +
  • Resampling methods: Bootstrap
  • +
  • Resampling methods: Bootstrap background
  • +
  • Resampling methods: More Bootstrap background
  • +
  • Resampling methods: Bootstrap approach
  • +
  • Resampling methods: Bootstrap steps
  • +
  • Code example for the Bootstrap method
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example rom Scikit-Learn's Repository
  • +
  • The Ising model
  • +
  • Reformulating the problem to suit regression
  • +
  • Linear regression
  • +
  • Singular Value decomposition
  • +
  • The one-dimensional Ising model
  • +
  • Ridge regression
  • +
  • LASSO regression
  • +
  • Performance as function of the regularization parameter
  • +
  • Finding the optimal value of \( \lambda \)
  • @@ -402,7 +404,7 @@ MathJax.Hub.Config({
    [2] Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

    -

    Sep 2, 2019

    +

    Sep 5, 2019


    @@ -426,7 +428,7 @@ MathJax.Hub.Config({

  • 9
  • 10
  • ...
  • -
  • 104
  • +
  • 105
  • »
  • diff --git a/doc/pub/Regression/html/Regression-reveal.html b/doc/pub/Regression/html/Regression-reveal.html index a907915af..987d5103b 100644 --- a/doc/pub/Regression/html/Regression-reveal.html +++ b/doc/pub/Regression/html/Regression-reveal.html @@ -148,7 +148,7 @@ MathJax.Hub.Config({
    [2] Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

     
    -

    Sep 2, 2019

    +

    Sep 5, 2019


    @@ -2022,7 +2022,46 @@ Similarly, Mehta et a

    -

    Where are we going?

    +

    Some simple codes for the SVD

    + +

    + + +

    import numpy as np
    +# SVD inversion
    +def SVDinv(A):
    +    ''' Takes as input a numpy matrix A and returns inv(A) based on singular value decomposition (SVD).
    +    SVD is numerically more stable than the inversion algorithms provided by
    +    numpy and scipy.linalg at the cost of being slower.
    +    '''
    +    U, s, VT = np.linalg.svd(A)
    +    print(U)
    +    print(s)
    +    print(VT)
    +    D = np.zeros((len(U),len(VT)))
    +    for i in range(0,len(VT)):
    +        D[i,i]=s[i]
    +    UT = np.transpose(U); V = np.transpose(VT); invD = np.linalg.inv(D)
    +    return np.matmul(V,np.matmul(invD,UT))
    +
    +
    +X = np.array([ [1.0, -1.0, 2.0], [1.0, 0.0, 1.0], [1.0, 2.0, -1.0], [1.0, 1.0, 0.0] ])
    +print(X)
    +A = np.transpose(X) @ X
    +print(A)
    +# Brute force inversion of super-collinear matrix
    +#B = np.linalg.inv(A)
    +#print(B)
    +C = SVDinv(A)
    +print(C)
    +
    +

    +The matrix \( \boldsymbol{X} \) has columns that are linearly dependent. The column is the row-wise sum of the other two columns. The rank of a matrix (the column rank) is the dimension of space spanned by the column vectors. The rank of the matrix is the number of linearly independent columns, in this case just \( 2 \). We see this from the singular values when running the above code. Running the standard inversion algorithm for matrix inversion with \( \boldsymbol{X}^T\boldsymbol{X} \) results in the program terminating due to a singular matrix. +

    + + +
    +

    Where are we going?

    Before we proceed, we need to rethink what we have been doing. In our @@ -2040,7 +2079,7 @@ This will allow us to link the standard linear algebra methods we have discussed

    -

    Resampling methods

    +

    Resampling methods

    @@ -2059,7 +2098,7 @@ once using the original training sample.

    -

    Resampling approaches can be computationally expensive

    +

    Resampling approaches can be computationally expensive

    @@ -2085,7 +2124,7 @@ bootstrap is widely used.

    -

    Why resampling methods ?

    +

    Why resampling methods ?

    Statistical analysis.