From a6f462e86f276c3c50230e1d24ef8d08fba7b57c Mon Sep 17 00:00:00 2001 From: mhjensen Date: Fri, 11 Sep 2020 11:19:35 +0200 Subject: [PATCH] typos in reg slides --- .../Regression/html/._Regression-bs000.html | 312 ++++++------ .../Regression/html/._Regression-bs001.html | 312 ++++++------ .../Regression/html/._Regression-bs002.html | 312 ++++++------ .../Regression/html/._Regression-bs003.html | 312 ++++++------ .../Regression/html/._Regression-bs004.html | 312 ++++++------ .../Regression/html/._Regression-bs005.html | 312 ++++++------ .../Regression/html/._Regression-bs006.html | 312 ++++++------ .../Regression/html/._Regression-bs007.html | 312 ++++++------ .../Regression/html/._Regression-bs008.html | 312 ++++++------ .../Regression/html/._Regression-bs009.html | 312 ++++++------ .../Regression/html/._Regression-bs010.html | 312 ++++++------ .../Regression/html/._Regression-bs011.html | 312 ++++++------ .../Regression/html/._Regression-bs012.html | 312 ++++++------ .../Regression/html/._Regression-bs013.html | 312 ++++++------ .../Regression/html/._Regression-bs014.html | 312 ++++++------ .../Regression/html/._Regression-bs015.html | 312 ++++++------ .../Regression/html/._Regression-bs016.html | 312 ++++++------ .../Regression/html/._Regression-bs017.html | 312 ++++++------ .../Regression/html/._Regression-bs018.html | 312 ++++++------ .../Regression/html/._Regression-bs019.html | 312 ++++++------ .../Regression/html/._Regression-bs020.html | 312 ++++++------ .../Regression/html/._Regression-bs021.html | 312 ++++++------ .../Regression/html/._Regression-bs022.html | 312 ++++++------ .../Regression/html/._Regression-bs023.html | 312 ++++++------ .../Regression/html/._Regression-bs024.html | 312 ++++++------ .../Regression/html/._Regression-bs025.html | 312 ++++++------ .../Regression/html/._Regression-bs026.html | 312 ++++++------ .../Regression/html/._Regression-bs027.html | 312 ++++++------ .../Regression/html/._Regression-bs028.html | 312 ++++++------ .../Regression/html/._Regression-bs029.html | 312 ++++++------ .../Regression/html/._Regression-bs030.html | 312 ++++++------ .../Regression/html/._Regression-bs031.html | 312 ++++++------ .../Regression/html/._Regression-bs032.html | 312 ++++++------ .../Regression/html/._Regression-bs033.html | 312 ++++++------ .../Regression/html/._Regression-bs034.html | 314 ++++++------ .../Regression/html/._Regression-bs035.html | 312 ++++++------ .../Regression/html/._Regression-bs036.html | 312 ++++++------ .../Regression/html/._Regression-bs037.html | 312 ++++++------ .../Regression/html/._Regression-bs038.html | 333 +++++++------ .../Regression/html/._Regression-bs039.html | 355 +++++++------- .../Regression/html/._Regression-bs040.html | 370 +++++++------- .../Regression/html/._Regression-bs041.html | 312 ++++++------ .../Regression/html/._Regression-bs042.html | 312 ++++++------ .../Regression/html/._Regression-bs043.html | 312 ++++++------ .../Regression/html/._Regression-bs044.html | 312 ++++++------ .../Regression/html/._Regression-bs045.html | 312 ++++++------ .../Regression/html/._Regression-bs046.html | 368 +++++++------- .../Regression/html/._Regression-bs047.html | 337 +++++++------ .../Regression/html/._Regression-bs048.html | 367 +++++++------- .../Regression/html/._Regression-bs049.html | 388 ++++++++------- .../Regression/html/._Regression-bs050.html | 392 +++++++-------- .../Regression/html/._Regression-bs051.html | 374 +++++++------- .../Regression/html/._Regression-bs052.html | 356 +++++++------- .../Regression/html/._Regression-bs053.html | 378 +++++++------- .../Regression/html/._Regression-bs054.html | 402 +++++++-------- .../Regression/html/._Regression-bs055.html | 351 ++++++------- .../Regression/html/._Regression-bs056.html | 325 ++++++------ .../Regression/html/._Regression-bs057.html | 343 ++++++------- .../Regression/html/._Regression-bs058.html | 348 +++++++------ .../Regression/html/._Regression-bs059.html | 337 ++++++------- .../Regression/html/._Regression-bs060.html | 326 ++++++------ .../Regression/html/._Regression-bs061.html | 343 ++++++------- .../Regression/html/._Regression-bs062.html | 338 +++++++------ .../Regression/html/._Regression-bs063.html | 345 ++++++------- .../Regression/html/._Regression-bs064.html | 353 +++++++------ .../Regression/html/._Regression-bs065.html | 349 +++++++------ .../Regression/html/._Regression-bs066.html | 384 ++++++++------- .../Regression/html/._Regression-bs067.html | 382 +++++++------- .../Regression/html/._Regression-bs068.html | 362 +++++++------- .../Regression/html/._Regression-bs069.html | 342 ++++++------- .../Regression/html/._Regression-bs070.html | 348 +++++++------ .../Regression/html/._Regression-bs071.html | 344 +++++++------ .../Regression/html/._Regression-bs072.html | 341 +++++++------ .../Regression/html/._Regression-bs073.html | 343 ++++++------- .../Regression/html/._Regression-bs074.html | 342 +++++++------ .../Regression/html/._Regression-bs075.html | 331 +++++++------ .../Regression/html/._Regression-bs076.html | 336 ++++++------- .../Regression/html/._Regression-bs077.html | 340 ++++++------- .../Regression/html/._Regression-bs078.html | 344 +++++++------ .../Regression/html/._Regression-bs079.html | 346 ++++++------- .../Regression/html/._Regression-bs080.html | 352 +++++++------ .../Regression/html/._Regression-bs081.html | 342 +++++++------ .../Regression/html/._Regression-bs082.html | 339 +++++++------ .../Regression/html/._Regression-bs083.html | 343 ++++++------- .../Regression/html/._Regression-bs084.html | 350 +++++++------ .../Regression/html/._Regression-bs085.html | 346 +++++++------ .../Regression/html/._Regression-bs086.html | 362 +++++++------- .../Regression/html/._Regression-bs087.html | 352 +++++++------ .../Regression/html/._Regression-bs088.html | 345 ++++++------- .../Regression/html/._Regression-bs089.html | 408 ++++++++------- .../Regression/html/._Regression-bs090.html | 402 +++++++-------- .../Regression/html/._Regression-bs091.html | 344 +++++++------ .../Regression/html/._Regression-bs092.html | 338 +++++++------ .../Regression/html/._Regression-bs093.html | 355 +++++++------- .../Regression/html/._Regression-bs094.html | 358 +++++++------- .../Regression/html/._Regression-bs095.html | 340 +++++++------ .../Regression/html/._Regression-bs096.html | 338 ++++++------- .../Regression/html/._Regression-bs097.html | 341 +++++++------ .../Regression/html/._Regression-bs098.html | 344 ++++++------- .../Regression/html/._Regression-bs099.html | 385 ++++++++------- .../Regression/html/._Regression-bs100.html | 387 +++++++-------- .../Regression/html/._Regression-bs101.html | 355 +++++++------- .../Regression/html/._Regression-bs102.html | 360 +++++++------- .../Regression/html/._Regression-bs103.html | 418 +++++++++------- .../Regression/html/._Regression-bs104.html | 444 ++++++++--------- .../Regression/html/._Regression-bs105.html | 412 ++++++++-------- .../Regression/html/._Regression-bs106.html | 376 +++++++------- .../Regression/html/._Regression-bs107.html | 389 +++++++-------- .../Regression/html/._Regression-bs108.html | 414 +++++++++------- .../Regression/html/._Regression-bs109.html | 440 +++++++++-------- .../Regression/html/._Regression-bs110.html | 351 +++++++------ .../Regression/html/._Regression-bs111.html | 403 +++++++-------- .../Regression/html/._Regression-bs112.html | 389 ++++++++------- .../Regression/html/._Regression-bs113.html | 378 +++++++------- .../Regression/html/._Regression-bs114.html | 367 +++++++------- .../Regression/html/._Regression-bs115.html | 404 ++++++++------- .../Regression/html/._Regression-bs116.html | 464 ++++++++++-------- .../Regression/html/._Regression-bs117.html | 440 +++++++---------- .../Regression/html/._Regression-bs118.html | 340 ++++++------- .../Regression/html/._Regression-bs119.html | 375 +++++++------- .../Regression/html/._Regression-bs120.html | 385 +++++++-------- doc/pub/Regression/html/Regression-bs.html | 312 ++++++------ .../Regression/html/Regression-reveal.html | 279 +++++------ .../Regression/html/Regression-solarized.html | 432 ++++++++-------- doc/pub/Regression/html/Regression.html | 432 ++++++++-------- .../ipynb/ipynb-Regression-src.tar.gz | Bin 193 -> 193 bytes doc/pub/Regression/pdf/Regression-minted.pdf | Bin 592869 -> 592629 bytes doc/src/Regression/Regression.do.txt | 20 +- 128 files changed, 21520 insertions(+), 21811 deletions(-) diff --git a/doc/pub/Regression/html/._Regression-bs000.html b/doc/pub/Regression/html/._Regression-bs000.html index 3ac741c21..1b85248e1 100644 --- a/doc/pub/Regression/html/._Regression-bs000.html +++ b/doc/pub/Regression/html/._Regression-bs000.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -489,7 +487,7 @@ MathJax.Hub.Config({
  • 9
  • 10
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs001.html b/doc/pub/Regression/html/._Regression-bs001.html index 4923f3d7a..e48bccdd9 100644 --- a/doc/pub/Regression/html/._Regression-bs001.html +++ b/doc/pub/Regression/html/._Regression-bs001.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -483,7 +481,7 @@ Similarly, Mehta et al
  • 10
  • 11
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs002.html b/doc/pub/Regression/html/._Regression-bs002.html index 2fdb312fd..90cdcb0dd 100644 --- a/doc/pub/Regression/html/._Regression-bs002.html +++ b/doc/pub/Regression/html/._Regression-bs002.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -487,7 +485,7 @@ A regression model aims at finding a likelihood function \( p(\boldsymbol{y}\ver
  • 11
  • 12
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs003.html b/doc/pub/Regression/html/._Regression-bs003.html index f91991cc2..325431528 100644 --- a/doc/pub/Regression/html/._Regression-bs003.html +++ b/doc/pub/Regression/html/._Regression-bs003.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -496,7 +494,7 @@ Linear regression gives us a set of analytical equations for the parameters \( \
  • 12
  • 13
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs004.html b/doc/pub/Regression/html/._Regression-bs004.html index 134f4dede..a904620aa 100644 --- a/doc/pub/Regression/html/._Regression-bs004.html +++ b/doc/pub/Regression/html/._Regression-bs004.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -493,7 +491,7 @@ so-called 13
  • 14
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs005.html b/doc/pub/Regression/html/._Regression-bs005.html index 8c35f4342..a78b10927 100644 --- a/doc/pub/Regression/html/._Regression-bs005.html +++ b/doc/pub/Regression/html/._Regression-bs005.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -486,7 +484,7 @@ where \( \epsilon_i \) is the error in our approximation.
  • 14
  • 15
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs006.html b/doc/pub/Regression/html/._Regression-bs006.html index fc2e0f9bd..efd09fca0 100644 --- a/doc/pub/Regression/html/._Regression-bs006.html +++ b/doc/pub/Regression/html/._Regression-bs006.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -486,7 +484,7 @@ $$
  • 15
  • 16
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs007.html b/doc/pub/Regression/html/._Regression-bs007.html index 0e3b2c171..5eba72521 100644 --- a/doc/pub/Regression/html/._Regression-bs007.html +++ b/doc/pub/Regression/html/._Regression-bs007.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -510,7 +508,7 @@ The above design matrix is called a 16
  • 17
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs008.html b/doc/pub/Regression/html/._Regression-bs008.html index c39704406..5cf42e621 100644 --- a/doc/pub/Regression/html/._Regression-bs008.html +++ b/doc/pub/Regression/html/._Regression-bs008.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -500,7 +498,7 @@ $$
  • 17
  • 18
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs009.html b/doc/pub/Regression/html/._Regression-bs009.html index c453b3b81..321622c34 100644 --- a/doc/pub/Regression/html/._Regression-bs009.html +++ b/doc/pub/Regression/html/._Regression-bs009.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 +495,7 @@ The left-hand side of this equation is kwown. Our error vector \( \boldsymbol{\e
  • 18
  • 19
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs010.html b/doc/pub/Regression/html/._Regression-bs010.html index d2b7693b5..f803b3568 100644 --- a/doc/pub/Regression/html/._Regression-bs010.html +++ b/doc/pub/Regression/html/._Regression-bs010.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -499,7 +497,7 @@ our matrix as \( \boldsymbol{X}\in {\mathbb{R}}^{n\times p} \), with the predict
  • 19
  • 20
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs011.html b/doc/pub/Regression/html/._Regression-bs011.html index ff8f6837d..1ce261310 100644 --- a/doc/pub/Regression/html/._Regression-bs011.html +++ b/doc/pub/Regression/html/._Regression-bs011.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -560,7 +558,7 @@ throughout these lectures.
  • 20
  • 21
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs012.html b/doc/pub/Regression/html/._Regression-bs012.html index 7f8ce0a0e..49d8663bd 100644 --- a/doc/pub/Regression/html/._Regression-bs012.html +++ b/doc/pub/Regression/html/._Regression-bs012.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -506,7 +504,7 @@ since when taking the first derivative with respect to the unknown parameters \(
  • 21
  • 22
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs013.html b/doc/pub/Regression/html/._Regression-bs013.html index 0910b2b19..12b9ee44a 100644 --- a/doc/pub/Regression/html/._Regression-bs013.html +++ b/doc/pub/Regression/html/._Regression-bs013.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -526,7 +524,7 @@ $$
  • 22
  • 23
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs014.html b/doc/pub/Regression/html/._Regression-bs014.html index 1debf21c8..66902e92c 100644 --- a/doc/pub/Regression/html/._Regression-bs014.html +++ b/doc/pub/Regression/html/._Regression-bs014.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -515,7 +513,7 @@ allow for the usage of direct linear algebra methods such as LU decomposi
  • 23
  • 24
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs015.html b/doc/pub/Regression/html/._Regression-bs015.html index de87d8edf..7d34f44c2 100644 --- a/doc/pub/Regression/html/._Regression-bs015.html +++ b/doc/pub/Regression/html/._Regression-bs015.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -493,7 +491,7 @@ $$
  • 24
  • 25
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs016.html b/doc/pub/Regression/html/._Regression-bs016.html index 794580931..ee32419fe 100644 --- a/doc/pub/Regression/html/._Regression-bs016.html +++ b/doc/pub/Regression/html/._Regression-bs016.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -501,7 +499,7 @@ Let us now return to our nuclear binding energies and simply code the above equa
  • 25
  • 26
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs017.html b/doc/pub/Regression/html/._Regression-bs017.html index 0b15bcbe2..87fffc44e 100644 --- a/doc/pub/Regression/html/._Regression-bs017.html +++ b/doc/pub/Regression/html/._Regression-bs017.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -511,7 +509,7 @@ plt.show()
  • 26
  • 27
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs018.html b/doc/pub/Regression/html/._Regression-bs018.html index 08a903c89..41843c4cc 100644 --- a/doc/pub/Regression/html/._Regression-bs018.html +++ b/doc/pub/Regression/html/._Regression-bs018.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -510,7 +508,7 @@ and finally the relative error as
  • 27
  • 28
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs019.html b/doc/pub/Regression/html/._Regression-bs019.html index 0af1837b8..f8996bd79 100644 --- a/doc/pub/Regression/html/._Regression-bs019.html +++ b/doc/pub/Regression/html/._Regression-bs019.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -502,7 +500,7 @@ where the matrix \( \boldsymbol{\Sigma} \) is a diagonal matrix with \( \sigma_i
  • 28
  • 29
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs020.html b/doc/pub/Regression/html/._Regression-bs020.html index 31c7786a0..67cd7aaa5 100644 --- a/doc/pub/Regression/html/._Regression-bs020.html +++ b/doc/pub/Regression/html/._Regression-bs020.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -498,7 +496,7 @@ where we have defined the matrix \( \boldsymbol{A} =\boldsymbol{X}/\boldsymbol{\
  • 29
  • 30
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs021.html b/doc/pub/Regression/html/._Regression-bs021.html index 15dbf3a58..8a3030fe2 100644 --- a/doc/pub/Regression/html/._Regression-bs021.html +++ b/doc/pub/Regression/html/._Regression-bs021.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -496,7 +494,7 @@ $$
  • 30
  • 31
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs022.html b/doc/pub/Regression/html/._Regression-bs022.html index 8bddd8a86..395971315 100644 --- a/doc/pub/Regression/html/._Regression-bs022.html +++ b/doc/pub/Regression/html/._Regression-bs022.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -501,7 +499,7 @@ $$
  • 31
  • 32
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs023.html b/doc/pub/Regression/html/._Regression-bs023.html index ccc677ffc..9f74940f4 100644 --- a/doc/pub/Regression/html/._Regression-bs023.html +++ b/doc/pub/Regression/html/._Regression-bs023.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -494,7 +492,7 @@ $$
  • 32
  • 33
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs024.html b/doc/pub/Regression/html/._Regression-bs024.html index 0c0cca845..bc18c0085 100644 --- a/doc/pub/Regression/html/._Regression-bs024.html +++ b/doc/pub/Regression/html/._Regression-bs024.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -528,7 +526,7 @@ Lasso and Ridge regression. See below.
  • 33
  • 34
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs025.html b/doc/pub/Regression/html/._Regression-bs025.html index 9e4cf6a13..d3187c6ab 100644 --- a/doc/pub/Regression/html/._Regression-bs025.html +++ b/doc/pub/Regression/html/._Regression-bs025.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -494,7 +492,7 @@ hyperparameter \( \lambda \), also to be explained below.
  • 34
  • 35
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs026.html b/doc/pub/Regression/html/._Regression-bs026.html index d1e27163a..325bce720 100644 --- a/doc/pub/Regression/html/._Regression-bs026.html +++ b/doc/pub/Regression/html/._Regression-bs026.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -572,7 +570,7 @@ below.
  • 35
  • 36
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs027.html b/doc/pub/Regression/html/._Regression-bs027.html index 5f9bdcf09..38598bd13 100644 --- a/doc/pub/Regression/html/._Regression-bs027.html +++ b/doc/pub/Regression/html/._Regression-bs027.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -554,7 +552,7 @@ ypredict = X_test 36
  • 37
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs028.html b/doc/pub/Regression/html/._Regression-bs028.html index 68baa5850..22314cd9a 100644 --- a/doc/pub/Regression/html/._Regression-bs028.html +++ b/doc/pub/Regression/html/._Regression-bs028.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -500,7 +498,7 @@ The features/predictors are
  • 37
  • 38
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs029.html b/doc/pub/Regression/html/._Regression-bs029.html index 2abdd061c..57c2cf9bf 100644 --- a/doc/pub/Regression/html/._Regression-bs029.html +++ b/doc/pub/Regression/html/._Regression-bs029.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -626,7 +624,7 @@ plt.show()
  • 38
  • 39
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs030.html b/doc/pub/Regression/html/._Regression-bs030.html index 8c6f360a3..47181b741 100644 --- a/doc/pub/Regression/html/._Regression-bs030.html +++ b/doc/pub/Regression/html/._Regression-bs030.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -504,7 +502,7 @@ visualization.
  • 39
  • 40
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs031.html b/doc/pub/Regression/html/._Regression-bs031.html index 71f1bf730..b5c71fc8a 100644 --- a/doc/pub/Regression/html/._Regression-bs031.html +++ b/doc/pub/Regression/html/._Regression-bs031.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -496,7 +494,7 @@ ensures that all features are exactly between \( 0 \) and \( 1 \). The
  • 40
  • 41
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs032.html b/doc/pub/Regression/html/._Regression-bs032.html index 57b8807f7..ab19796de 100644 --- a/doc/pub/Regression/html/._Regression-bs032.html +++ b/doc/pub/Regression/html/._Regression-bs032.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -498,7 +496,7 @@ techniques.
  • 41
  • 42
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs033.html b/doc/pub/Regression/html/._Regression-bs033.html index bee927809..10de29f0b 100644 --- a/doc/pub/Regression/html/._Regression-bs033.html +++ b/doc/pub/Regression/html/._Regression-bs033.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -570,7 +568,7 @@ clf = skl.42
  • 43
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs034.html b/doc/pub/Regression/html/._Regression-bs034.html index dacbe5e98..b9b27bcf4 100644 --- a/doc/pub/Regression/html/._Regression-bs034.html +++ b/doc/pub/Regression/html/._Regression-bs034.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -466,7 +464,7 @@ however not the be case in general and a standard matrix inversion algorithm based on say LU, QR or Cholesky decomposition may lead to singularities. We will see examples of this below.

    -There is however a way to partially circumvent this problem and also gain some insight about the ordinary least squares approach. +There is however a way to partially circumvent this problem and also gain some insights about the ordinary least squares approach, and later shrinkage methods like Ridge and Lasso regressions.

    This is given by the Singular Value Decomposition algorithm, perhaps @@ -505,7 +503,7 @@ inversion algorithm. Thereafter we dive into the math of the SVD.

  • 43
  • 44
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs035.html b/doc/pub/Regression/html/._Regression-bs035.html index 963bd9aab..11eded89e 100644 --- a/doc/pub/Regression/html/._Regression-bs035.html +++ b/doc/pub/Regression/html/._Regression-bs035.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -520,7 +518,7 @@ This is equivalent to saying that the matrix \( \boldsymbol{X} \) has at least a
  • 44
  • 45
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs036.html b/doc/pub/Regression/html/._Regression-bs036.html index 02259927b..510676c5e 100644 --- a/doc/pub/Regression/html/._Regression-bs036.html +++ b/doc/pub/Regression/html/._Regression-bs036.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 +495,7 @@ where \( \boldsymbol{I} \) is the identity matrix. When we discuss Ridge
  • 45
  • 46
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs037.html b/doc/pub/Regression/html/._Regression-bs037.html index b03aca10f..d216a1b73 100644 --- a/doc/pub/Regression/html/._Regression-bs037.html +++ b/doc/pub/Regression/html/._Regression-bs037.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -508,7 +506,7 @@ is not diagonalizable, it is a so-called 46
  • 47
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs038.html b/doc/pub/Regression/html/._Regression-bs038.html index 88c690ade..4510ff12e 100644 --- a/doc/pub/Regression/html/._Regression-bs038.html +++ b/doc/pub/Regression/html/._Regression-bs038.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -474,6 +472,27 @@ $$ with eigenvalues \( \sigma_1=2 \) and \( \sigma_2=0 \). The SVD exits always! +

    +The SVD +decomposition (singular values) gives eigenvalues +\( \sigma_i\geq\sigma_{i+1} \) for all \( i \) and for dimensions larger than \( i=p \), the +eigenvalues (singular values) are zero. + +

    +In the general case, where our design matrix \( \boldsymbol{X} \) has dimension +\( n\times p \), the matrix is thus decomposed into an \( n\times n \) +orthogonal matrix \( \boldsymbol{U} \), a \( p\times p \) orthogonal matrix \( \boldsymbol{V} \) +and a diagonal matrix \( \boldsymbol{\Sigma} \) with \( r=\mathrm{min}(n,p) \) +singular values \( \sigma_i\geq 0 \) on the main diagonal and zeros filling +the rest of the matrix. There are at most \( p \) singular values +assuming that \( n > p \). In our regression examples for the nuclear +masses and the equation of state this is indeed the case, while for +the Ising model we have \( p > n \). These are often cases that lead to +near singular or singular matrices. + +

    +The columns of \( \boldsymbol{U} \) are called the left singular vectors while the columns of \( \boldsymbol{V} \) are the right singular vectors. +

    @@ -500,7 +519,7 @@ The SVD exits always!

  • 47
  • 48
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs039.html b/doc/pub/Regression/html/._Regression-bs039.html index fad5da69e..438bd5e3f 100644 --- a/doc/pub/Regression/html/._Regression-bs039.html +++ b/doc/pub/Regression/html/._Regression-bs039.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,40 +444,27 @@ MathJax.Hub.Config({ -

    Another Example

    +

    Economy-size SVD

    -Consider the following matrix which can be SVD decomposed as - -$$ -\boldsymbol{X} = \frac{1}{15}\begin{bmatrix} 14 & 2\\ 4 & 22\\ 16 & 13\end{bmatrix}=\frac{1}{3}\begin{bmatrix} 1& 2 & 2 \\ 2& -1 & 1\\ 2 & 1& -2\end{bmatrix} \begin{bmatrix} 2& 0 \\ 0& 1\\ 0 & 0\end{bmatrix}\frac{1}{5}\begin{bmatrix} 3& 4 \\ 4& -3\end{bmatrix}=\boldsymbol{U}\boldsymbol{\Sigma}\boldsymbol{V}^T. -$$ +If we assume that \( n > p \), then our matrix \( \boldsymbol{U} \) has dimension \( n +\times n \). The last \( n-p \) columns of \( \boldsymbol{U} \) become however +irrelevant in our calculations since they are multiplied with the +zeros in \( \boldsymbol{\Sigma} \).

    -This is a \( 3\times 2 \) matrix which is decomposed in terms of a -\( 3\times 3 \) matrix \( \boldsymbol{U} \), and a \( 2\times 2 \) matrix \( \boldsymbol{V} \). It is easy to see -that \( \boldsymbol{U} \) and \( \boldsymbol{V} \) are orthogonal (how?). +The economy-size decomposition removes extra rows or columns of zeros +from the diagonal matrix of singular values, \( \boldsymbol{\Sigma} \), along with the columns +in either \( \boldsymbol{U} \) or \( \boldsymbol{V} \) that multiply those zeros in the expression. +Removing these zeros and columns can improve execution time +and reduce storage requirements without compromising the accuracy of +the decomposition.

    -And the SVD -decomposition (singular values) gives eigenvalues -\( \sigma_i\geq\sigma_{i+1} \) for all \( i \) and for dimensions larger than \( i=2 \), the -eigenvalues (singular values) are zero. - -

    -In the general case, where our design matrix \( \boldsymbol{X} \) has dimension -\( n\times p \), the matrix is thus decomposed into an \( n\times n \) -orthogonal matrix \( \boldsymbol{U} \), a \( p\times p \) orthogonal matrix \( \boldsymbol{V} \) -and a diagonal matrix \( \boldsymbol{\Sigma} \) with \( r=\mathrm{min}(n,p) \) -singular values \( \sigma_i\geq 0 \) on the main diagonal and zeros filling -the rest of the matrix. There are at most \( p \) singular values -assuming that \( n > p \). In our regression examples for the nuclear -masses and the equation of state this is indeed the case, while for -the Ising model we have \( p > n \). These are often cases that lead to -near singular or singular matrices. - -

    -The columns of \( \boldsymbol{U} \) are called the left singular vectors while the columns of \( \boldsymbol{V} \) are the right singular vectors. +If \( n > p \), we keep only the first \( p \) columns of \( \boldsymbol{U} \) and \( \boldsymbol{\Sigma} \) has dimension \( p\times p \). +If \( p > n \), then only the first \( n \) columns of \( \boldsymbol{V} \) are computed and \( \boldsymbol{\Sigma} \) has dimension \( n\times n \). +The \( n=p \) case is obvious, we retain the full SVD. +In general the economy-size SVD leads to less FLOPS and still conserving the desired accuracy.

    @@ -507,7 +492,7 @@ The columns of \( \boldsymbol{U} \) are called the left singular vectors while t

  • 48
  • 49
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs040.html b/doc/pub/Regression/html/._Regression-bs040.html index f6504ab13..55c59b4b0 100644 --- a/doc/pub/Regression/html/._Regression-bs040.html +++ b/doc/pub/Regression/html/._Regression-bs040.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,27 +444,53 @@ MathJax.Hub.Config({ -

    Economy-size SVD

    +

    Codes for the SVD

    -If we assume that \( n > p \), then our matrix \( \boldsymbol{U} \) has dimension \( n -\times n \). The last \( n-p \) columns of \( \boldsymbol{U} \) become however -irrelevant in our calculations since they are multiplied with the -zeros in \( \boldsymbol{\Sigma} \). -

    -The economy-size decomposition removes extra rows or columns of zeros -from the diagonal matrix of singular values, \( \boldsymbol{\Sigma} \), along with the columns -in either \( \boldsymbol{U} \) or \( \boldsymbol{V} \) that multiply those zeros in the expression. -Removing these zeros and columns can improve execution time -and reduce storage requirements without compromising the accuracy of -the decomposition. + +

    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('test U')
    +#    print( (np.transpose(U) @ U - U @np.transpose(U)))
    +#    print('test VT')
    +#    print( (np.transpose(VT) @ VT - VT @np.transpose(VT)))
    +    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)
    +

    -If \( n > p \), we keep only the first \( p \) columns of \( \boldsymbol{U} \) and \( \boldsymbol{\Sigma} \) has dimension \( p\times p \). -If \( p > n \), then only the first \( n \) columns of \( \boldsymbol{V} \) are computed and \( \boldsymbol{\Sigma} \) has dimension \( n\times n \). -The \( n=p \) case is obvious, we retain the full SVD. -In general the economy-size SVD leads to less FLOPS and still conserving the desired accuracy. +The matrix \( \boldsymbol{X} \) has columns that are linearly dependent. The first +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.

    @@ -494,7 +518,7 @@ In general the economy-size SVD leads to less FLOPS and still conserving the des

  • 49
  • 50
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs041.html b/doc/pub/Regression/html/._Regression-bs041.html index 4797d17ff..50490f24a 100644 --- a/doc/pub/Regression/html/._Regression-bs041.html +++ b/doc/pub/Regression/html/._Regression-bs041.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -521,7 +519,7 @@ We will come back to this expression when we discuss Ridge regression.
  • 50
  • 51
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs042.html b/doc/pub/Regression/html/._Regression-bs042.html index 470f83731..906d4ff73 100644 --- a/doc/pub/Regression/html/._Regression-bs042.html +++ b/doc/pub/Regression/html/._Regression-bs042.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -527,7 +525,7 @@ $$
  • 51
  • 52
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs043.html b/doc/pub/Regression/html/._Regression-bs043.html index 3e237b0bc..f1fa8cd34 100644 --- a/doc/pub/Regression/html/._Regression-bs043.html +++ b/doc/pub/Regression/html/._Regression-bs043.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -528,7 +526,7 @@ with the vectors \( \boldsymbol{u}_j \) being the columns of \( \boldsymbol{U} \
  • 52
  • 53
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs044.html b/doc/pub/Regression/html/._Regression-bs044.html index a4d7274a6..8aebae601 100644 --- a/doc/pub/Regression/html/._Regression-bs044.html +++ b/doc/pub/Regression/html/._Regression-bs044.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -493,7 +491,7 @@ With a parameter \( \lambda \) we can thus shrink the role of specific parameter
  • 53
  • 54
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs045.html b/doc/pub/Regression/html/._Regression-bs045.html index 398b30d48..3915d1bcf 100644 --- a/doc/pub/Regression/html/._Regression-bs045.html +++ b/doc/pub/Regression/html/._Regression-bs045.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -506,7 +504,7 @@ Similarly, Mehta et al
  • 54
  • 55
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs046.html b/doc/pub/Regression/html/._Regression-bs046.html index a76105e82..9de3acc0c 100644 --- a/doc/pub/Regression/html/._Regression-bs046.html +++ b/doc/pub/Regression/html/._Regression-bs046.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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,55 +442,23 @@ MathJax.Hub.Config({

     

     

     

    - + -

    Codes for the SVD

    +

    A better understanding of regularization

    +The parameter \( \lambda \) that we have introduced in the Ridge (and +Lasso as well) regression is often called a regularization parameter +or shrinkage parameter. It is common to call it a hyperparameter. What does it mean mathemtically? - -

    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('test U')
    -#    print( (np.transpose(U) @ U - U @np.transpose(U)))
    -#    print('test VT')
    -#    print( (np.transpose(VT) @ VT - VT @np.transpose(VT)))
    -    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 first -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. +Here we will first look at how to analyze the difference between the +standard OLS equations and the Ridge expressions in terms of a linear +algebra analysis using the SVD algorithm. Thereafter, we will link +(see the material on the bias-variance tradeoff below) these +observation to the statisical analysis of the results. In particular +we consider how the variance of the parameters \( \boldsymbol{\beta} \) is +affected by changing the parameter \( \lambda \).

    @@ -520,7 +486,7 @@ in the program terminating due to a singular matrix.

  • 55
  • 56
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs047.html b/doc/pub/Regression/html/._Regression-bs047.html index a5951c708..b2ed957aa 100644 --- a/doc/pub/Regression/html/._Regression-bs047.html +++ b/doc/pub/Regression/html/._Regression-bs047.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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,23 +442,24 @@ MathJax.Hub.Config({

     

     

     

    - + -

    A better understanding of regularization

    +

    Decomposing the OLS and Ridge expressions

    -The parameter \( \lambda \) that we have introduced in the Ridge (and -Lasso as well) regression is often called a regularization parameter -or shrinkage parameter. It is common to call it a hyperparameter. What does it mean mathemtically? +We have our design matrix + \( \boldsymbol{X}\in {\mathbb{R}}^{n\times p} \). With the SVD we decompose it as + +$$ +\boldsymbol{X} = \boldsymbol{U\Sigma V^T}, +$$

    -Here we will first look at how to analyze the difference between the -standard OLS equations and the Ridge expressions in terms of a linear -algebra analysis using the SVD algorithm. Thereafter, we will link -(see the material on the bias-variance tradeoff below) these -observation to the statisical analysis of the results. In particular -we consider how the variance of the parameters \( \boldsymbol{\beta} \) is -affected by changing the parameter \( \lambda \). +with \( \boldsymbol{U}\in {\mathbb{R}}^{n\times n} \), \( \boldsymbol{\Sigma}\in {\mathbb{R}}^{n\times p} \) +and \( \boldsymbol{V}\in {\mathbb{R}}^{p\times p} \). + +

    +The matrices \( \boldsymbol{U} \) and \( \boldsymbol{V} \) are unitary/orthonormal matrices, that is in case the matrices are real we have \( \boldsymbol{U}^T\boldsymbol{U}=\boldsymbol{U}\boldsymbol{U}^T=\boldsymbol{I} \) and \( \boldsymbol{V}^T\boldsymbol{V}=\boldsymbol{V}\boldsymbol{V}^T=\boldsymbol{I} \).

    @@ -488,7 +487,7 @@ affected by changing the parameter \( \lambda \).

  • 56
  • 57
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs048.html b/doc/pub/Regression/html/._Regression-bs048.html index 4733f1208..ca704a0fc 100644 --- a/doc/pub/Regression/html/._Regression-bs048.html +++ b/doc/pub/Regression/html/._Regression-bs048.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,22 +444,63 @@ MathJax.Hub.Config({ -

    Decomposing the OLS and Ridge expressions

    +

    Introducing the Covariance and Correlation functions

    -We have our design matrix - \( \boldsymbol{X}\in {\mathbb{R}}^{n\times p} \). With the SVD we decompose it as +Before we discuss the link between for example Ridge regression and the singular value decomposition, we need to remind ourselves about +the definition of the covariance and the correlation function. These are quantities +

    +Suppose we have defined two vectors +\( \hat{x} \) and \( \hat{y} \) with \( n \) elements each. The covariance matrix \( \boldsymbol{C} \) is defined as $$ -\boldsymbol{X} = \boldsymbol{U\Sigma V^T}, +\boldsymbol{C}[\boldsymbol{x},\boldsymbol{y}] = \begin{bmatrix} \mathrm{cov}[\boldsymbol{x},\boldsymbol{x}] & \mathrm{cov}[\boldsymbol{x},\boldsymbol{y}] \\ + \mathrm{cov}[\boldsymbol{y},\boldsymbol{x}] & \mathrm{cov}[\boldsymbol{y},\boldsymbol{y}] \\ + \end{bmatrix}, +$$ + +where for example +$$ +\mathrm{cov}[\boldsymbol{x},\boldsymbol{y}] =\frac{1}{n} \sum_{i=0}^{n-1}(x_i- \overline{x})(y_i- \overline{y}). +$$ + +With this definition and recalling that the variance is defined as +$$ +\mathrm{var}[\boldsymbol{x}]=\frac{1}{n} \sum_{i=0}^{n-1}(x_i- \overline{x})^2, +$$ + +we can rewrite the covariance matrix as +$$ +\boldsymbol{C}[\boldsymbol{x},\boldsymbol{y}] = \begin{bmatrix} \mathrm{var}[\boldsymbol{x}] & \mathrm{cov}[\boldsymbol{x},\boldsymbol{y}] \\ + \mathrm{cov}[\boldsymbol{x},\boldsymbol{y}] & \mathrm{var}[\boldsymbol{y}] \\ + \end{bmatrix}. $$

    -with \( \boldsymbol{U}\in {\mathbb{R}}^{n\times n} \), \( \boldsymbol{\Sigma}\in {\mathbb{R}}^{n\times p} \) -and \( \boldsymbol{V}\in {\mathbb{R}}^{p\times p} \). +The covariance takes values between zero and infinity and may thus +lead to problems with loss of numerical precision for particularly +large values. It is common to scale the covariance matrix by +introducing instead the correlation matrix defined via the so-called +correlation function + +$$ +\mathrm{corr}[\boldsymbol{x},\boldsymbol{y}]=\frac{\mathrm{cov}[\boldsymbol{x},\boldsymbol{y}]}{\sqrt{\mathrm{var}[\boldsymbol{x}] \mathrm{var}[\boldsymbol{y}]}}. +$$

    -The matrices \( \boldsymbol{U} \) and \( \boldsymbol{V} \) are unitary/orthonormal matrices, that is in case the matrices are real we have \( \boldsymbol{U}^T\boldsymbol{U}=\boldsymbol{U}\boldsymbol{U}^T=\boldsymbol{I} \) and \( \boldsymbol{V}^T\boldsymbol{V}=\boldsymbol{V}\boldsymbol{V}^T=\boldsymbol{I} \). +The correlation function is then given by values \( \mathrm{corr}[\boldsymbol{x},\boldsymbol{y}] +\in [-1,1] \). This avoids eventual problems with too large values. We +can then define the correlation matrix for the two vectors \( \boldsymbol{x} \) +and \( \boldsymbol{y} \) as + +$$ +\boldsymbol{K}[\boldsymbol{x},\boldsymbol{y}] = \begin{bmatrix} 1 & \mathrm{corr}[\boldsymbol{x},\boldsymbol{y}] \\ + \mathrm{corr}[\boldsymbol{y},\boldsymbol{x}] & 1 \\ + \end{bmatrix}, +$$ + +

    +In the above example this is the function we constructed using pandas.

    @@ -489,7 +528,7 @@ The matrices \( \boldsymbol{U} \) and \( \boldsymbol{V} \) are unitary/orthonorm

  • 57
  • 58
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs049.html b/doc/pub/Regression/html/._Regression-bs049.html index f768a4ea2..f93448d63 100644 --- a/doc/pub/Regression/html/._Regression-bs049.html +++ b/doc/pub/Regression/html/._Regression-bs049.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,64 +444,64 @@ MathJax.Hub.Config({ -

    Introducing the Covariance and Correlation functions

    +

    Correlation Function and Design/Feature Matrix

    -Before we discuss the link between for example Ridge regression and the singular value decomposition, we need to remind ourselves about -the definition of the covariance and the correlation function. These are quantities +In our derivation of the various regression algorithms like Ordinary Least Squares or Ridge regression +we defined the design/feature matrix \( \boldsymbol{X} \) as -

    -Suppose we have defined two vectors -\( \hat{x} \) and \( \hat{y} \) with \( n \) elements each. The covariance matrix \( \boldsymbol{C} \) is defined as $$ -\boldsymbol{C}[\boldsymbol{x},\boldsymbol{y}] = \begin{bmatrix} \mathrm{cov}[\boldsymbol{x},\boldsymbol{x}] & \mathrm{cov}[\boldsymbol{x},\boldsymbol{y}] \\ - \mathrm{cov}[\boldsymbol{y},\boldsymbol{x}] & \mathrm{cov}[\boldsymbol{y},\boldsymbol{y}] \\ - \end{bmatrix}, +\boldsymbol{X}=\begin{bmatrix} +x_{0,0} & x_{0,1} & x_{0,2}& \dots & \dots x_{0,p-1}\\ +x_{1,0} & x_{1,1} & x_{1,2}& \dots & \dots x_{1,p-1}\\ +x_{2,0} & x_{2,1} & x_{2,2}& \dots & \dots x_{2,p-1}\\ +\dots & \dots & \dots & \dots \dots & \dots \\ +x_{n-2,0} & x_{n-2,1} & x_{n-2,2}& \dots & \dots x_{n-2,p-1}\\ +x_{n-1,0} & x_{n-1,1} & x_{n-1,2}& \dots & \dots x_{n-1,p-1}\\ +\end{bmatrix}, $$ -where for example +with \( \boldsymbol{X}\in {\mathbb{R}}^{n\times p} \), with the predictors/features \( p \) refering to the column numbers and the +entries \( n \) being the row elements. +We can rewrite the design/feature matrix in terms of its column vectors as $$ -\mathrm{cov}[\boldsymbol{x},\boldsymbol{y}] =\frac{1}{n} \sum_{i=0}^{n-1}(x_i- \overline{x})(y_i- \overline{y}). +\boldsymbol{X}=\begin{bmatrix} \boldsymbol{x}_0 & \boldsymbol{x}_1 & \boldsymbol{x}_2 & \dots & \dots & \boldsymbol{x}_{p-1}\end{bmatrix}, $$ -With this definition and recalling that the variance is defined as +with a given vector $$ -\mathrm{var}[\boldsymbol{x}]=\frac{1}{n} \sum_{i=0}^{n-1}(x_i- \overline{x})^2, -$$ - -we can rewrite the covariance matrix as -$$ -\boldsymbol{C}[\boldsymbol{x},\boldsymbol{y}] = \begin{bmatrix} \mathrm{var}[\boldsymbol{x}] & \mathrm{cov}[\boldsymbol{x},\boldsymbol{y}] \\ - \mathrm{cov}[\boldsymbol{x},\boldsymbol{y}] & \mathrm{var}[\boldsymbol{y}] \\ - \end{bmatrix}. +\boldsymbol{x}_i^T = \begin{bmatrix}x_{0,i} & x_{1,i} & x_{2,i}& \dots & \dots x_{n-1,i}\end{bmatrix}. $$

    -The covariance takes values between zero and infinity and may thus -lead to problems with loss of numerical precision for particularly -large values. It is common to scale the covariance matrix by -introducing instead the correlation matrix defined via the so-called -correlation function +With these definitions, we can now rewrite our \( 2\times 2 \) +correaltion/covariance matrix in terms of a moe general design/feature +matrix \( \boldsymbol{X}\in {\mathbb{R}}^{n\times p} \). This leads to a \( p\times p \) +covariance matrix for the vectors \( \boldsymbol{x}_i \) with \( i=0,1,\dots,p-1 \) $$ -\mathrm{corr}[\boldsymbol{x},\boldsymbol{y}]=\frac{\mathrm{cov}[\boldsymbol{x},\boldsymbol{y}]}{\sqrt{\mathrm{var}[\boldsymbol{x}] \mathrm{var}[\boldsymbol{y}]}}. +\boldsymbol{C}[\boldsymbol{x}] = \begin{bmatrix} +\mathrm{var}[\boldsymbol{x}_0] & \mathrm{cov}[\boldsymbol{x}_0,\boldsymbol{x}_1] & \mathrm{cov}[\boldsymbol{x}_0,\boldsymbol{x}_2] & \dots & \dots & \mathrm{cov}[\boldsymbol{x}_0,\boldsymbol{x}_{p-1}]\\ +\mathrm{cov}[\boldsymbol{x}_1,\boldsymbol{x}_0] & \mathrm{var}[\boldsymbol{x}_1] & \mathrm{cov}[\boldsymbol{x}_1,\boldsymbol{x}_2] & \dots & \dots & \mathrm{cov}[\boldsymbol{x}_1,\boldsymbol{x}_{p-1}]\\ +\mathrm{cov}[\boldsymbol{x}_2,\boldsymbol{x}_0] & \mathrm{cov}[\boldsymbol{x}_2,\boldsymbol{x}_1] & \mathrm{var}[\boldsymbol{x}_2] & \dots & \dots & \mathrm{cov}[\boldsymbol{x}_2,\boldsymbol{x}_{p-1}]\\ +\dots & \dots & \dots & \dots & \dots & \dots \\ +\dots & \dots & \dots & \dots & \dots & \dots \\ +\mathrm{cov}[\boldsymbol{x}_{p-1},\boldsymbol{x}_0] & \mathrm{cov}[\boldsymbol{x}_{p-1},\boldsymbol{x}_1] & \mathrm{cov}[\boldsymbol{x}_{p-1},\boldsymbol{x}_{2}] & \dots & \dots & \mathrm{var}[\boldsymbol{x}_{p-1}]\\ +\end{bmatrix}, $$ -

    -The correlation function is then given by values \( \mathrm{corr}[\boldsymbol{x},\boldsymbol{y}] -\in [-1,1] \). This avoids eventual problems with too large values. We -can then define the correlation matrix for the two vectors \( \boldsymbol{x} \) -and \( \boldsymbol{y} \) as - +and the correlation matrix $$ -\boldsymbol{K}[\boldsymbol{x},\boldsymbol{y}] = \begin{bmatrix} 1 & \mathrm{corr}[\boldsymbol{x},\boldsymbol{y}] \\ - \mathrm{corr}[\boldsymbol{y},\boldsymbol{x}] & 1 \\ - \end{bmatrix}, +\boldsymbol{K}[\boldsymbol{x}] = \begin{bmatrix} +1 & \mathrm{corr}[\boldsymbol{x}_0,\boldsymbol{x}_1] & \mathrm{corr}[\boldsymbol{x}_0,\boldsymbol{x}_2] & \dots & \dots & \mathrm{corr}[\boldsymbol{x}_0,\boldsymbol{x}_{p-1}]\\ +\mathrm{corr}[\boldsymbol{x}_1,\boldsymbol{x}_0] & 1 & \mathrm{corr}[\boldsymbol{x}_1,\boldsymbol{x}_2] & \dots & \dots & \mathrm{corr}[\boldsymbol{x}_1,\boldsymbol{x}_{p-1}]\\ +\mathrm{corr}[\boldsymbol{x}_2,\boldsymbol{x}_0] & \mathrm{corr}[\boldsymbol{x}_2,\boldsymbol{x}_1] & 1 & \dots & \dots & \mathrm{corr}[\boldsymbol{x}_2,\boldsymbol{x}_{p-1}]\\ +\dots & \dots & \dots & \dots & \dots & \dots \\ +\dots & \dots & \dots & \dots & \dots & \dots \\ +\mathrm{corr}[\boldsymbol{x}_{p-1},\boldsymbol{x}_0] & \mathrm{corr}[\boldsymbol{x}_{p-1},\boldsymbol{x}_1] & \mathrm{corr}[\boldsymbol{x}_{p-1},\boldsymbol{x}_{2}] & \dots & \dots & 1\\ +\end{bmatrix}, $$ -

    -In the above example this is the function we constructed using pandas. -

    @@ -530,7 +528,7 @@ In the above example this is the function we constructed using pandas.

  • 58
  • 59
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs050.html b/doc/pub/Regression/html/._Regression-bs050.html index 060834cb3..2d913fcec 100644 --- a/doc/pub/Regression/html/._Regression-bs050.html +++ b/doc/pub/Regression/html/._Regression-bs050.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,64 +444,46 @@ MathJax.Hub.Config({ -

    Correlation Function and Design/Feature Matrix

    +

    Covariance Matrix Examples

    -In our derivation of the various regression algorithms like Ordinary Least Squares or Ridge regression -we defined the design/feature matrix \( \boldsymbol{X} \) as +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 values. The following simple function uses the +np.vstack function which takes each vector of dimension \( 1\times n \) +and produces a \( 2\times n \) matrix \( \boldsymbol{W} \) $$ -\boldsymbol{X}=\begin{bmatrix} -x_{0,0} & x_{0,1} & x_{0,2}& \dots & \dots x_{0,p-1}\\ -x_{1,0} & x_{1,1} & x_{1,2}& \dots & \dots x_{1,p-1}\\ -x_{2,0} & x_{2,1} & x_{2,2}& \dots & \dots x_{2,p-1}\\ -\dots & \dots & \dots & \dots \dots & \dots \\ -x_{n-2,0} & x_{n-2,1} & x_{n-2,2}& \dots & \dots x_{n-2,p-1}\\ -x_{n-1,0} & x_{n-1,1} & x_{n-1,2}& \dots & \dots x_{n-1,p-1}\\ -\end{bmatrix}, -$$ - -with \( \boldsymbol{X}\in {\mathbb{R}}^{n\times p} \), with the predictors/features \( p \) refering to the column numbers and the -entries \( n \) being the row elements. -We can rewrite the design/feature matrix in terms of its column vectors as -$$ -\boldsymbol{X}=\begin{bmatrix} \boldsymbol{x}_0 & \boldsymbol{x}_1 & \boldsymbol{x}_2 & \dots & \dots & \boldsymbol{x}_{p-1}\end{bmatrix}, -$$ - -with a given vector -$$ -\boldsymbol{x}_i^T = \begin{bmatrix}x_{0,i} & x_{1,i} & x_{2,i}& \dots & \dots x_{n-1,i}\end{bmatrix}. +\boldsymbol{W} = \begin{bmatrix} x_0 & y_0 \\ + x_1 & y_1 \\ + x_2 & y_2\\ + \dots & \dots \\ + x_{n-2} & y_{n-2}\\ + x_{n-1} & y_{n-1} & + \end{bmatrix}, $$

    -With these definitions, we can now rewrite our \( 2\times 2 \) -correaltion/covariance matrix in terms of a moe general design/feature -matrix \( \boldsymbol{X}\in {\mathbb{R}}^{n\times p} \). This leads to a \( p\times p \) -covariance matrix for the vectors \( \boldsymbol{x}_i \) with \( i=0,1,\dots,p-1 \) +which in turn is converted into into the \( 2\times 2 \) covariance matrix +\( \boldsymbol{C} \) via the Numpy function np.cov(). We note that we can also calculate +the mean value of each set of samples \( \boldsymbol{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. -$$ -\boldsymbol{C}[\boldsymbol{x}] = \begin{bmatrix} -\mathrm{var}[\boldsymbol{x}_0] & \mathrm{cov}[\boldsymbol{x}_0,\boldsymbol{x}_1] & \mathrm{cov}[\boldsymbol{x}_0,\boldsymbol{x}_2] & \dots & \dots & \mathrm{cov}[\boldsymbol{x}_0,\boldsymbol{x}_{p-1}]\\ -\mathrm{cov}[\boldsymbol{x}_1,\boldsymbol{x}_0] & \mathrm{var}[\boldsymbol{x}_1] & \mathrm{cov}[\boldsymbol{x}_1,\boldsymbol{x}_2] & \dots & \dots & \mathrm{cov}[\boldsymbol{x}_1,\boldsymbol{x}_{p-1}]\\ -\mathrm{cov}[\boldsymbol{x}_2,\boldsymbol{x}_0] & \mathrm{cov}[\boldsymbol{x}_2,\boldsymbol{x}_1] & \mathrm{var}[\boldsymbol{x}_2] & \dots & \dots & \mathrm{cov}[\boldsymbol{x}_2,\boldsymbol{x}_{p-1}]\\ -\dots & \dots & \dots & \dots & \dots & \dots \\ -\dots & \dots & \dots & \dots & \dots & \dots \\ -\mathrm{cov}[\boldsymbol{x}_{p-1},\boldsymbol{x}_0] & \mathrm{cov}[\boldsymbol{x}_{p-1},\boldsymbol{x}_1] & \mathrm{cov}[\boldsymbol{x}_{p-1},\boldsymbol{x}_{2}] & \dots & \dots & \mathrm{var}[\boldsymbol{x}_{p-1}]\\ -\end{bmatrix}, -$$ - -and the correlation matrix -$$ -\boldsymbol{K}[\boldsymbol{x}] = \begin{bmatrix} -1 & \mathrm{corr}[\boldsymbol{x}_0,\boldsymbol{x}_1] & \mathrm{corr}[\boldsymbol{x}_0,\boldsymbol{x}_2] & \dots & \dots & \mathrm{corr}[\boldsymbol{x}_0,\boldsymbol{x}_{p-1}]\\ -\mathrm{corr}[\boldsymbol{x}_1,\boldsymbol{x}_0] & 1 & \mathrm{corr}[\boldsymbol{x}_1,\boldsymbol{x}_2] & \dots & \dots & \mathrm{corr}[\boldsymbol{x}_1,\boldsymbol{x}_{p-1}]\\ -\mathrm{corr}[\boldsymbol{x}_2,\boldsymbol{x}_0] & \mathrm{corr}[\boldsymbol{x}_2,\boldsymbol{x}_1] & 1 & \dots & \dots & \mathrm{corr}[\boldsymbol{x}_2,\boldsymbol{x}_{p-1}]\\ -\dots & \dots & \dots & \dots & \dots & \dots \\ -\dots & \dots & \dots & \dots & \dots & \dots \\ -\mathrm{corr}[\boldsymbol{x}_{p-1},\boldsymbol{x}_0] & \mathrm{corr}[\boldsymbol{x}_{p-1},\boldsymbol{x}_1] & \mathrm{corr}[\boldsymbol{x}_{p-1},\boldsymbol{x}_{2}] & \dots & \dots & 1\\ -\end{bmatrix}, -$$ +

    + +

    # 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))
    +W = np.vstack((x, y))
    +C = np.cov(W)
    +print(C)
    +

    @@ -530,7 +510,7 @@ $$

  • 59
  • 60
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs051.html b/doc/pub/Regression/html/._Regression-bs051.html index d5670dc55..9c802b28a 100644 --- a/doc/pub/Regression/html/._Regression-bs051.html +++ b/doc/pub/Regression/html/._Regression-bs051.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,46 +444,48 @@ MathJax.Hub.Config({ -

    Covariance Matrix Examples

    +

    Correlation Matrix

    -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 values. The following simple function uses the -np.vstack function which takes each vector of dimension \( 1\times n \) -and produces a \( 2\times n \) matrix \( \boldsymbol{W} \) - -$$ -\boldsymbol{W} = \begin{bmatrix} x_0 & y_0 \\ - x_1 & y_1 \\ - x_2 & y_2\\ - \dots & \dots \\ - x_{n-2} & y_{n-2}\\ - x_{n-1} & y_{n-1} & - \end{bmatrix}, -$$ - -

    -which in turn is converted into into the \( 2\times 2 \) covariance matrix -\( \boldsymbol{C} \) via the Numpy function np.cov(). We note that we can also calculate -the mean value of each set of samples \( \boldsymbol{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. +The previous example can be converted into the correlation matrix by +simply scaling the matrix elements with the variances. We should also +subtract the mean values for each column. This leads to the following +code which sets up the correlations matrix for the previous example in +a more brute force way. Here we scale the mean values for each column of the design matrix, calculate the relevant mean values and variances and then finally set up the \( 2\times 2 \) correlation matrix (since we have only two vectors).

    -

    # Importing various packages
    -import numpy as np
    +
    import numpy as np
     n = 100
    -x = np.random.normal(size=n)
    -print(np.mean(x))
    +# define two vectors                                                                                           
    +x = np.random.random(size=n)
     y = 4+3*x+np.random.normal(size=n)
    -print(np.mean(y))
    -W = np.vstack((x, y))
    -C = np.cov(W)
    +#scaling the x and y vectors                                                                                   
    +x = x - np.mean(x)
    +y = y - np.mean(y)
    +variance_x = np.sum(x@x)/n
    +variance_y = np.sum(y@y)/n
    +print(variance_x)
    +print(variance_y)
    +cov_xy = np.sum(x@y)/n
    +cov_xx = np.sum(x@x)/n
    +cov_yy = np.sum(y@y)/n
    +C = np.zeros((2,2))
    +C[0,0]= cov_xx/variance_x
    +C[1,1]= cov_yy/variance_y
    +C[0,1]= cov_xy/np.sqrt(variance_y*variance_x)
    +C[1,0]= C[0,1]
     print(C)
     
    +

    +We see that the matrix elements along the diagonal are one as they +should be and that the matrix is symmetric. Furthermore, diagonalizing +this matrix we easily see that it is a positive definite matrix. + +

    +The above procedure with numpy can be made more compact if we use pandas. +

    @@ -512,7 +512,7 @@ C = np.c

  • 60
  • 61
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs052.html b/doc/pub/Regression/html/._Regression-bs052.html index f34833382..70bc746bf 100644 --- a/doc/pub/Regression/html/._Regression-bs052.html +++ b/doc/pub/Regression/html/._Regression-bs052.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,47 +444,29 @@ MathJax.Hub.Config({ -

    Correlation Matrix

    +

    Correlation Matrix with Pandas

    -The previous example can be converted into the correlation matrix by -simply scaling the matrix elements with the variances. We should also -subtract the mean values for each column. This leads to the following -code which sets up the correlations matrix for the previous example in -a more brute force way. Here we scale the mean values for each column of the design matrix, calculate the relevant mean values and variances and then finally set up the \( 2\times 2 \) correlation matrix (since we have only two vectors). - +We whow here how we can set up the correlation matrix using pandas, as done in this simple code

    import numpy as np
    -n = 100
    -# define two vectors                                                                                           
    -x = np.random.random(size=n)
    -y = 4+3*x+np.random.normal(size=n)
    -#scaling the x and y vectors                                                                                   
    +import pandas as pd
    +n = 10
    +x = np.random.normal(size=n)
     x = x - np.mean(x)
    +y = 4+3*x+np.random.normal(size=n)
     y = y - np.mean(y)
    -variance_x = np.sum(x@x)/n
    -variance_y = np.sum(y@y)/n
    -print(variance_x)
    -print(variance_y)
    -cov_xy = np.sum(x@y)/n
    -cov_xx = np.sum(x@x)/n
    -cov_yy = np.sum(y@y)/n
    -C = np.zeros((2,2))
    -C[0,0]= cov_xx/variance_x
    -C[1,1]= cov_yy/variance_y
    -C[0,1]= cov_xy/np.sqrt(variance_y*variance_x)
    -C[1,0]= C[0,1]
    -print(C)
    +X = (np.vstack((x, y))).T
    +print(X)
    +Xpd = pd.DataFrame(X)
    +print(Xpd)
    +correlation_matrix = Xpd.corr()
    +print(correlation_matrix)
     

    -We see that the matrix elements along the diagonal are one as they -should be and that the matrix is symmetric. Furthermore, diagonalizing -this matrix we easily see that it is a positive definite matrix. - -

    -The above procedure with numpy can be made more compact if we use pandas. +We expand this model to the Franke function discussed above.

    @@ -514,7 +494,7 @@ The above procedure with numpy can be made more compact if we use pand

  • 61
  • 62
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs053.html b/doc/pub/Regression/html/._Regression-bs053.html index 84e9efa95..466bcaad5 100644 --- a/doc/pub/Regression/html/._Regression-bs053.html +++ b/doc/pub/Regression/html/._Regression-bs053.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,29 +444,65 @@ MathJax.Hub.Config({ -

    Correlation Matrix with Pandas

    +

    Correlation Matrix with Pandas and the Franke function

    -

    -We whow here how we can set up the correlation matrix using pandas, as done in this simple code

    -

    import numpy as np
    +
    # Common imports
    +import numpy as np
     import pandas as pd
    -n = 10
    -x = np.random.normal(size=n)
    -x = x - np.mean(x)
    -y = 4+3*x+np.random.normal(size=n)
    -y = y - np.mean(y)
    -X = (np.vstack((x, y))).T
    -print(X)
    +
    +
    +def FrankeFunction(x,y):
    +	term1 = 0.75*np.exp(-(0.25*(9*x-2)**2) - 0.25*((9*y-2)**2))
    +	term2 = 0.75*np.exp(-((9*x+1)**2)/49.0 - 0.1*(9*y+1))
    +	term3 = 0.5*np.exp(-(9*x-7)**2/4.0 - 0.25*((9*y-3)**2))
    +	term4 = -0.2*np.exp(-(9*x-4)**2 - (9*y-7)**2)
    +	return term1 + term2 + term3 + term4
    +
    +
    +def create_X(x, y, n ):
    +	if len(x.shape) > 1:
    +		x = np.ravel(x)
    +		y = np.ravel(y)
    +
    +	N = len(x)
    +	l = int((n+1)*(n+2)/2)		# Number of elements in beta
    +	X = np.ones((N,l))
    +
    +	for i in range(1,n+1):
    +		q = int((i)*(i+1)/2)
    +		for k in range(i+1):
    +			X[:,q+k] = (x**(i-k))*(y**k)
    +
    +	return X
    +
    +
    +# Making meshgrid of datapoints and compute Franke's function
    +n = 4
    +N = 100
    +x = np.sort(np.random.uniform(0, 1, N))
    +y = np.sort(np.random.uniform(0, 1, N))
    +z = FrankeFunction(x, y)
    +X = create_X(x, y, n=n)    
    +
     Xpd = pd.DataFrame(X)
    -print(Xpd)
    -correlation_matrix = Xpd.corr()
    -print(correlation_matrix)
    +# subtract the mean values and set up the covariance matrix
    +Xpd = Xpd - Xpd.mean()
    +covariance_matrix = Xpd.cov()
    +print(covariance_matrix)
     

    -We expand this model to the Franke function discussed above. +We note here that the covariance is zero for the first rows and +columns since all matrix elements in the design matrix were set to one +(we are fitting the function in terms of a polynomial of degree \( n \)). + +

    +This means that the variance for these elements will be zero and will +cause problems when we set up the correlation matrix. We can simply +drop these elements and construct a correlation +matrix without these elements.

    @@ -496,7 +530,7 @@ We expand this model to the Franke function discussed above.

  • 62
  • 63
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs054.html b/doc/pub/Regression/html/._Regression-bs054.html index b35836c26..506deee38 100644 --- a/doc/pub/Regression/html/._Regression-bs054.html +++ b/doc/pub/Regression/html/._Regression-bs054.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,65 +444,45 @@ MathJax.Hub.Config({ -

    Correlation Matrix with Pandas and the Franke function

    +

    Rewriting the Covariance and/or Correlation Matrix

    - - -

    # Common imports
    -import numpy as np
    -import pandas as pd
    -
    -
    -def FrankeFunction(x,y):
    -	term1 = 0.75*np.exp(-(0.25*(9*x-2)**2) - 0.25*((9*y-2)**2))
    -	term2 = 0.75*np.exp(-((9*x+1)**2)/49.0 - 0.1*(9*y+1))
    -	term3 = 0.5*np.exp(-(9*x-7)**2/4.0 - 0.25*((9*y-3)**2))
    -	term4 = -0.2*np.exp(-(9*x-4)**2 - (9*y-7)**2)
    -	return term1 + term2 + term3 + term4
    -
    -
    -def create_X(x, y, n ):
    -	if len(x.shape) > 1:
    -		x = np.ravel(x)
    -		y = np.ravel(y)
    -
    -	N = len(x)
    -	l = int((n+1)*(n+2)/2)		# Number of elements in beta
    -	X = np.ones((N,l))
    -
    -	for i in range(1,n+1):
    -		q = int((i)*(i+1)/2)
    -		for k in range(i+1):
    -			X[:,q+k] = (x**(i-k))*(y**k)
    -
    -	return X
    -
    -
    -# Making meshgrid of datapoints and compute Franke's function
    -n = 4
    -N = 100
    -x = np.sort(np.random.uniform(0, 1, N))
    -y = np.sort(np.random.uniform(0, 1, N))
    -z = FrankeFunction(x, y)
    -X = create_X(x, y, n=n)    
    -
    -Xpd = pd.DataFrame(X)
    -# subtract the mean values and set up the covariance matrix
    -Xpd = Xpd - Xpd.mean()
    -covariance_matrix = Xpd.cov()
    -print(covariance_matrix)
    -
    -

    -We note here that the covariance is zero for the first rows and -columns since all matrix elements in the design matrix were set to one -(we are fitting the function in terms of a polynomial of degree \( n \)). +We can rewrite the covariance matrix in a more compact form in terms of the design/feature matrix \( \boldsymbol{X} \) as +$$ +\boldsymbol{C}[\boldsymbol{x}] = \frac{1}{n}\boldsymbol{X}^T\boldsymbol{X}= \mathbb{E}[\boldsymbol{X}^T\boldsymbol{X}]. +$$

    -This means that the variance for these elements will be zero and will -cause problems when we set up the correlation matrix. We can simply -drop these elements and construct a correlation -matrix without these elements. +To see this let us simply look at a design matrix \( \boldsymbol{X}\in {\mathbb{R}}^{2\times 2} \) +$$ +\boldsymbol{X}=\begin{bmatrix} +x_{00} & x_{01}\\ +x_{10} & x_{11}\\ +\end{bmatrix}=\begin{bmatrix} +\boldsymbol{x}_{0} & \boldsymbol{x}_{1}\\ +\end{bmatrix}. +$$ + +

    +If we then compute the expectation value +$$ +\mathbb{E}[\boldsymbol{X}\boldsymbol{X}^T] = \frac{1}{n}\boldsymbol{X}\boldsymbol{X}^T=\begin{bmatrix} +x_{00}^2+x_{01}^2 & x_{00}x_{10}+x_{01}x_{11}\\ +x_{10}x_{00}+x_{11}x_{01} & x_{10}^2+x_{11}^2\\ +\end{bmatrix}, +$$ + +which is just +$$ +\boldsymbol{C}[\boldsymbol{x}_0,\boldsymbol{x}_1] = \boldsymbol{C}[\boldsymbol{x}]=\begin{bmatrix} \mathrm{var}[\boldsymbol{x}_0] & \mathrm{cov}[\boldsymbol{x}_0,\boldsymbol{x}_1] \\ + \mathrm{cov}[\boldsymbol{x}_1,\boldsymbol{x}_0] & \mathrm{var}[\boldsymbol{x}_1] \\ + \end{bmatrix}, +$$ + +where we wrote $$\boldsymbol{C}[\boldsymbol{x}_0,\boldsymbol{x}_1] = \boldsymbol{C}[\boldsymbol{x}]$$ to indicate that this the covariance of the vectors \( \boldsymbol{x} \) of the design/feature matrix \( \boldsymbol{X} \). + +

    +It is easy to generalize this to a matrix \( \boldsymbol{X}\in {\mathbb{R}}^{n\times p} \).

    @@ -532,7 +510,7 @@ matrix without these elements.

  • 63
  • 64
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs055.html b/doc/pub/Regression/html/._Regression-bs055.html index 6f0822d91..1c93a4d3c 100644 --- a/doc/pub/Regression/html/._Regression-bs055.html +++ b/doc/pub/Regression/html/._Regression-bs055.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,45 +444,10 @@ MathJax.Hub.Config({ -

    Rewriting the Covariance and/or Correlation Matrix

    +

    Linking with SVD

    -We can rewrite the covariance matrix in a more compact form in terms of the design/feature matrix \( \boldsymbol{X} \) as -$$ -\boldsymbol{C}[\boldsymbol{x}] = \frac{1}{n}\boldsymbol{X}^T\boldsymbol{X}= \mathbb{E}[\boldsymbol{X}^T\boldsymbol{X}]. -$$ - -

    -To see this let us simply look at a design matrix \( \boldsymbol{X}\in {\mathbb{R}}^{2\times 2} \) -$$ -\boldsymbol{X}=\begin{bmatrix} -x_{00} & x_{01}\\ -x_{10} & x_{11}\\ -\end{bmatrix}=\begin{bmatrix} -\boldsymbol{x}_{0} & \boldsymbol{x}_{1}\\ -\end{bmatrix}. -$$ - -

    -If we then compute the expectation value -$$ -\mathbb{E}[\boldsymbol{X}\boldsymbol{X}^T] = \frac{1}{n}\boldsymbol{X}\boldsymbol{X}^T=\begin{bmatrix} -x_{00}^2+x_{01}^2 & x_{00}x_{10}+x_{01}x_{11}\\ -x_{10}x_{00}+x_{11}x_{01} & x_{10}^2+x_{11}^2\\ -\end{bmatrix}, -$$ - -which is just -$$ -\boldsymbol{C}[\boldsymbol{x}_0,\boldsymbol{x}_1] = \boldsymbol{C}[\boldsymbol{x}]=\begin{bmatrix} \mathrm{var}[\boldsymbol{x}_0] & \mathrm{cov}[\boldsymbol{x}_0,\boldsymbol{x}_1] \\ - \mathrm{cov}[\boldsymbol{x}_1,\boldsymbol{x}_0] & \mathrm{var}[\boldsymbol{x}_1] \\ - \end{bmatrix}, -$$ - -where we wrote $$\boldsymbol{C}[\boldsymbol{x}_0,\boldsymbol{x}_1] = \boldsymbol{C}[\boldsymbol{x}]$$ to indicate that this the covariance of the vectors \( \boldsymbol{x} \) of the design/feature matrix \( \boldsymbol{X} \). - -

    -It is easy to generalize this to a matrix \( \boldsymbol{X}\in {\mathbb{R}}^{n\times p} \). +See lecture september 11. More text to be added here soon.

    @@ -512,7 +475,7 @@ It is easy to generalize this to a matrix \( \boldsymbol{X}\in {\mathbb{R}}^{n\t

  • 64
  • 65
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs056.html b/doc/pub/Regression/html/._Regression-bs056.html index abe730d4c..7c05f8542 100644 --- a/doc/pub/Regression/html/._Regression-bs056.html +++ b/doc/pub/Regression/html/._Regression-bs056.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,10 +444,19 @@ MathJax.Hub.Config({ -

    Linking with SVD

    +

    Where are we going?

    -See lecture september 11. More text to be added here soon. +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.

    @@ -477,7 +484,7 @@ See lecture september 11. More text to be added here soon.

  • 65
  • 66
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs057.html b/doc/pub/Regression/html/._Regression-bs057.html index d1da73208..c67e36a39 100644 --- a/doc/pub/Regression/html/._Regression-bs057.html +++ b/doc/pub/Regression/html/._Regression-bs057.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,19 +444,36 @@ MathJax.Hub.Config({ -

    Where are we going?

    +

    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.

    -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 +Two resampling methods are often used in Machine Learning analyses,

      -
    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. +
    5. The bootstrap method
    6. +
    7. and Cross-Validation
    -This will allow us to link the standard linear algebra methods we have discussed above to a statistical interpretation of the methods. +In addition there are several other methods such as the Jackknife and the Blocking methods. We will discuss in particular +cross-validation and the bootstrap method. + +

    +

    +
    +

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

  • 66
  • 67
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs058.html b/doc/pub/Regression/html/._Regression-bs058.html index d225bfd6a..cb4b34172 100644 --- a/doc/pub/Regression/html/._Regression-bs058.html +++ b/doc/pub/Regression/html/._Regression-bs058.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,31 +444,27 @@ MathJax.Hub.Config({ -

    Resampling methods

    +

    Resampling approaches can be computationally expensive

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

    -Two resampling methods are often used in Machine Learning analyses, - -

      -
    1. The bootstrap method
    2. -
    3. and Cross-Validation
    4. -
    - -In addition there are several other methods such as the Jackknife and the Blocking methods. We will discuss in particular -cross-validation and the bootstrap method. +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.

    @@ -503,7 +497,7 @@ cross-validation and the bootstrap method.
  • 67
  • 68
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs059.html b/doc/pub/Regression/html/._Regression-bs059.html index 6962ccad3..b6e00fc81 100644 --- a/doc/pub/Regression/html/._Regression-bs059.html +++ b/doc/pub/Regression/html/._Regression-bs059.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,29 +444,16 @@ MathJax.Hub.Config({ -

    Resampling approaches can be computationally expensive

    +

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

    +

      +
    • 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.
    • +
    @@ -499,7 +484,7 @@ bootstrap is widely used.
  • 68
  • 69
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs060.html b/doc/pub/Regression/html/._Regression-bs060.html index 44272dd80..9aa19879d 100644 --- a/doc/pub/Regression/html/._Regression-bs060.html +++ b/doc/pub/Regression/html/._Regression-bs060.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,15 +444,21 @@ MathJax.Hub.Config({ -

    Why resampling methods ?

    +

    Statistical analysis

      -
    • 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.
    • +
    • 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.
    @@ -486,7 +490,7 @@ MathJax.Hub.Config({
  • 69
  • 70
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs061.html b/doc/pub/Regression/html/._Regression-bs061.html index 66b29fefc..9ea79972c 100644 --- a/doc/pub/Regression/html/._Regression-bs061.html +++ b/doc/pub/Regression/html/._Regression-bs061.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,22 +444,31 @@ MathJax.Hub.Config({ -

    Statistical analysis

    +

    Statistics

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

      -
    • As in other experiments, many numerical experiments have two classes of errors:
    • +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 +$$ -
        -
      • 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.
    • -
    +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.
    @@ -492,7 +499,7 @@ MathJax.Hub.Config({
  • 70
  • 71
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs062.html b/doc/pub/Regression/html/._Regression-bs062.html index 627ed1a57..5adea5f02 100644 --- a/doc/pub/Regression/html/._Regression-bs062.html +++ b/doc/pub/Regression/html/._Regression-bs062.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,31 +444,23 @@ MathJax.Hub.Config({ -

    Statistics

    +

    Statistics, moments

    -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: +A particularly useful class of special expectation values are the +moments. The \( n \)-th moment of the PDF \( p \) is defined as +follows: $$ -p(x) = \mathrm{prob}(X=x) +\langle x^n\rangle \equiv \int\! x^n p(x)\,dx $$ -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: +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 \): $$ -\mathrm{prob}(a\leq X\leq b) = \int_a^b p(x)dx +\langle x\rangle = \mu \equiv \int\! x 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.

    @@ -501,7 +491,7 @@ selection of a large set of these numbers reproduces this PDF.
  • 71
  • 72
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs063.html b/doc/pub/Regression/html/._Regression-bs063.html index bd0b83a75..083e16883 100644 --- a/doc/pub/Regression/html/._Regression-bs063.html +++ b/doc/pub/Regression/html/._Regression-bs063.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,23 +444,38 @@ MathJax.Hub.Config({ -

    Statistics, moments

    +

    Statistics, central moments

    -A particularly useful class of special expectation values are the -moments. The \( n \)-th moment of the PDF \( p \) 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^n\rangle \equiv \int\! x^n p(x)\,dx +\langle (x-\langle x \rangle )^n\rangle \equiv \int\! (x-\langle x\rangle)^n p(x)\,dx $$ -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 \): +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) \): $$ -\langle x\rangle = \mu \equiv \int\! x p(x)\,dx +\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} $$ + +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.

    @@ -493,7 +506,7 @@ $$
  • 72
  • 73
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs064.html b/doc/pub/Regression/html/._Regression-bs064.html index 6bbb7302c..e176abd7d 100644 --- a/doc/pub/Regression/html/._Regression-bs064.html +++ b/doc/pub/Regression/html/._Regression-bs064.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,38 +444,31 @@ MathJax.Hub.Config({ -

    Statistics, central moments

    +

    Statistics, covariance

    -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) \): +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} -\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} +\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} $$ -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. +with +$$ +\langle x_i\rangle = +\int\!\cdots\!\int\!x_i\,P(x_1,\dots,x_n)\,dx_1\dots dx_n +$$

    @@ -508,7 +499,7 @@ qualitatively as the spread of \( p \) around its mean.
  • 73
  • 74
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs065.html b/doc/pub/Regression/html/._Regression-bs065.html index e79fadb5d..c619892b3 100644 --- a/doc/pub/Regression/html/._Regression-bs065.html +++ b/doc/pub/Regression/html/._Regression-bs065.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,31 +444,32 @@ MathJax.Hub.Config({ -

    Statistics, covariance

    +

    Statistics, more covariance

    -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: +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 \)): $$ \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} +\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} $$ - -with -$$ -\langle x_i\rangle = -\int\!\cdots\!\int\!x_i\,P(x_1,\dots,x_n)\,dx_1\dots dx_n -$$

    @@ -501,7 +500,7 @@ $$
  • 74
  • 75
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs066.html b/doc/pub/Regression/html/._Regression-bs066.html index 9a16af85e..f678a688f 100644 --- a/doc/pub/Regression/html/._Regression-bs066.html +++ b/doc/pub/Regression/html/._Regression-bs066.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,35 +444,51 @@ MathJax.Hub.Config({ -

    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 \)): -$$ -\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} -$$ -

    -
    +

    Covariance example

    +

    +Suppose we have defined three vectors \( \boldsymbol{x}, \boldsymbol{y}, \boldsymbol{z} \) with +\( n \) elements each. The covariance matrix is defined as + +$$ +\boldsymbol{\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}). +$$ + +

    +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 \( \boldsymbol{W} \) + +$$ +\boldsymbol{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 +\( \boldsymbol{\Sigma} \) via the Numpy function np.cov(). We note that we can +also calculate the mean value of each set of samples \( \boldsymbol{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.

    @@ -502,7 +516,7 @@ $$

  • 75
  • 76
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs067.html b/doc/pub/Regression/html/._Regression-bs067.html index 264b958c3..eb7665ed3 100644 --- a/doc/pub/Regression/html/._Regression-bs067.html +++ b/doc/pub/Regression/html/._Regression-bs067.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,52 +444,42 @@ MathJax.Hub.Config({ -

    Covariance example

    +

    Covariance in numpy

    -Suppose we have defined three vectors \( \boldsymbol{x}, \boldsymbol{y}, \boldsymbol{z} \) with -\( n \) elements each. The covariance matrix is defined as -$$ -\boldsymbol{\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}). -$$ + +

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

    -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 \( \boldsymbol{W} \) - -$$ -\boldsymbol{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 -\( \boldsymbol{\Sigma} \) via the Numpy function np.cov(). We note that we can -also calculate the mean value of each set of samples \( \boldsymbol{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()
    +

    @@ -518,7 +506,7 @@ function.

  • 76
  • 77
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs068.html b/doc/pub/Regression/html/._Regression-bs068.html index caccb5a18..c0c98e9f4 100644 --- a/doc/pub/Regression/html/._Regression-bs068.html +++ b/doc/pub/Regression/html/._Regression-bs068.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,42 +444,30 @@ MathJax.Hub.Config({ -

    Covariance in numpy

    +

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

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

    # Importing various packages
    -import numpy as np
    +By the linearity of the expectation value
    +$$
    +\mathrm{cov}(U, V) = \sum_{i,j}a_i b_j \mathrm{cov}(X_i, Y_j)
    +$$
    +
    +
    -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()
    -

    @@ -508,7 +494,7 @@ plt.show()

  • 77
  • 78
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs069.html b/doc/pub/Regression/html/._Regression-bs069.html index a44ebdc79..3af4b1b64 100644 --- a/doc/pub/Regression/html/._Regression-bs069.html +++ b/doc/pub/Regression/html/._Regression-bs069.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,26 +444,32 @@ MathJax.Hub.Config({ -

    Statistics, independent variables

    +

    Statistics, more variance

    -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: +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 \): $$ -U = \sum_i a_i X_i \qquad V = \sum_j b_j Y_j +\begin{equation} +\mathrm{var}(U) = \sum_{i,j}a_i a_j \mathrm{cov}(X_i, X_j) +\tag{12} +\end{equation} $$ -By the linearity of the expectation value +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{cov}(U, V) = \sum_{i,j}a_i b_j \mathrm{cov}(X_i, Y_j) +\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.

    @@ -496,7 +500,7 @@ $$
  • 78
  • 79
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs070.html b/doc/pub/Regression/html/._Regression-bs070.html index e4c57095f..cfe58f2bc 100644 --- a/doc/pub/Regression/html/._Regression-bs070.html +++ b/doc/pub/Regression/html/._Regression-bs070.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,32 +444,28 @@ MathJax.Hub.Config({ -

    Statistics, more variance

    +

    Statistics and stochastic processes

    -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 \): +A stochastic process is a process that produces sequentially a +chain of values: $$ -\begin{equation} -\mathrm{var}(U) = \sum_{i,j}a_i a_j \mathrm{cov}(X_i, X_j) -\tag{12} -\end{equation} +\{x_1, x_2,\dots\,x_k,\dots\}. $$ -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. +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} \).

    @@ -502,7 +496,7 @@ value of a set of measurements.
  • 79
  • 80
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs071.html b/doc/pub/Regression/html/._Regression-bs071.html index 2c3607478..33ff7522c 100644 --- a/doc/pub/Regression/html/._Regression-bs071.html +++ b/doc/pub/Regression/html/._Regression-bs071.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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,30 +442,28 @@ MathJax.Hub.Config({

     

     

     

    - + -

    Statistics and stochastic processes

    +

    Statistics and sample variables

    -A stochastic process is a process that produces sequentially a -chain of values: +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: $$ -\{x_1, x_2,\dots\,x_k,\dots\}. +\bar{x}_n \equiv \frac{1}{n}\sum_{k=1}^n x_k $$ -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} \). +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) +$$

    @@ -498,7 +494,7 @@ interested in finding the few lowest moments, like the mean
  • 80
  • 81
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs072.html b/doc/pub/Regression/html/._Regression-bs072.html index 3da840697..65ed8c8c0 100644 --- a/doc/pub/Regression/html/._Regression-bs072.html +++ b/doc/pub/Regression/html/._Regression-bs072.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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,28 +442,23 @@ MathJax.Hub.Config({

     

     

     

    - + -

    Statistics and sample variables

    +

    Statistics, sample variance and covariance

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

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

    @@ -496,7 +489,7 @@ $$
  • 81
  • 82
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs073.html b/doc/pub/Regression/html/._Regression-bs073.html index 861bf39ac..ee901b844 100644 --- a/doc/pub/Regression/html/._Regression-bs073.html +++ b/doc/pub/Regression/html/._Regression-bs073.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,21 +444,32 @@ MathJax.Hub.Config({ -

    Statistics, sample variance and covariance

    +

    Statistics, law of large numbers

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

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

    @@ -491,7 +500,7 @@ and covariance \( \mathrm{cov}(X,Y) \).
  • 82
  • 83
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs074.html b/doc/pub/Regression/html/._Regression-bs074.html index c957142b0..6fb58fe6f 100644 --- a/doc/pub/Regression/html/._Regression-bs074.html +++ b/doc/pub/Regression/html/._Regression-bs074.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,32 +444,22 @@ MathJax.Hub.Config({ -

    Statistics, law of large numbers

    +

    Statistics, more on sample error

    -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: +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: $$ -\lim_{n\to\infty}\bar{x}_n = \mu_X^{\phantom X} +\overline X_n = \frac{1}{n}\sum_{i=1}^n X_i $$ -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. +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.

    @@ -502,7 +490,7 @@ true PDFs behind, which we usually do not have.
  • 83
  • 84
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs075.html b/doc/pub/Regression/html/._Regression-bs075.html index 9da4b1ac2..0cdd4b72b 100644 --- a/doc/pub/Regression/html/._Regression-bs075.html +++ b/doc/pub/Regression/html/._Regression-bs075.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,22 +444,21 @@ MathJax.Hub.Config({ -

    Statistics, more on sample error

    +

    Statistics

    -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 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 \): $$ -\overline X_n = \frac{1}{n}\sum_{i=1}^n X_i +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 $$ -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. +And in particular we are interested in its variance \( \mathrm{var}(\overline X_n) \).

    @@ -492,7 +489,7 @@ means.
  • 84
  • 85
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs076.html b/doc/pub/Regression/html/._Regression-bs076.html index c59e4096c..8e1eb9027 100644 --- a/doc/pub/Regression/html/._Regression-bs076.html +++ b/doc/pub/Regression/html/._Regression-bs076.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,21 +444,25 @@ MathJax.Hub.Config({ -

    Statistics

    +

    Statistics, central limit theorem

    -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 \): +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: $$ -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 +\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} $$ - -And in particular we are interested in its variance \( \mathrm{var}(\overline X_n) \).

    @@ -491,7 +493,7 @@ And in particular we are interested in its variance \( \mathrm{var}(\overline X_
  • 85
  • 86
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs077.html b/doc/pub/Regression/html/._Regression-bs077.html index 83287a1bd..13630dd89 100644 --- a/doc/pub/Regression/html/._Regression-bs077.html +++ b/doc/pub/Regression/html/._Regression-bs077.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,25 +444,29 @@ MathJax.Hub.Config({ -

    Statistics, central limit theorem

    +

    Statistics, more technicalities

    -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 desired variance +\( \mathrm{var}(\overline X_n) \), i.e. the sample error squared +\( \mathrm{err}_X^2 \), is given by: $$ \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} +\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} $$ + +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.

    @@ -495,7 +497,7 @@ $$
  • 86
  • 87
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs078.html b/doc/pub/Regression/html/._Regression-bs078.html index a8e91a790..4f2d729c4 100644 --- a/doc/pub/Regression/html/._Regression-bs078.html +++ b/doc/pub/Regression/html/._Regression-bs078.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,29 +444,27 @@ MathJax.Hub.Config({ -

    Statistics, more technicalities

    +

    Statistics

    -The desired variance -\( \mathrm{var}(\overline X_n) \), i.e. the sample error squared -\( \mathrm{err}_X^2 \), is given by: +Our estimate of \( \mu_{X_i}^{\phantom X} \) is then the sample mean \( \bar x \) +itself, in accordance with the the central limit theorem: $$ -\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} +\mu_{X_i}^{\phantom X} = \langle x_i\rangle \approx \frac{1}{n}\sum_{k=1}^n x_k = \bar 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. +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) +$$

    @@ -499,7 +495,7 @@ estimate of the PDF of each of the \( X_i \), estimating all properties of
  • 87
  • 88
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs079.html b/doc/pub/Regression/html/._Regression-bs079.html index 92e417961..57e0fdd9c 100644 --- a/doc/pub/Regression/html/._Regression-bs079.html +++ b/doc/pub/Regression/html/._Regression-bs079.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,27 +444,39 @@ MathJax.Hub.Config({ -

    Statistics

    +

    Statistics and sample variance

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

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

    @@ -497,7 +507,7 @@ $$
  • 88
  • 89
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs080.html b/doc/pub/Regression/html/._Regression-bs080.html index c1e03457c..6cbd592a1 100644 --- a/doc/pub/Regression/html/._Regression-bs080.html +++ b/doc/pub/Regression/html/._Regression-bs080.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,39 +444,35 @@ MathJax.Hub.Config({ -

    Statistics and sample variance

    +

    Statistics, uncorrelated results

    -By the same procedure we can use the sample variance as an -estimate of the variance of any of the stochastic variables \( X_i \) + +

    +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{var}(X_i)=\langle x_i - \langle x_i\rangle\rangle \approx \langle x_i - \bar x_n\rangle\nonumber, +\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 is approximated as +resulting in $$ \begin{equation} -\mathrm{var}(X_i)\approx \frac{1}{n}\sum_{k=1}^n (x_k - \bar x_n)=\mathrm{var}(x) -\tag{15} +\mathrm{err}_X^2\approx \frac{1}{n^2} \sum_i \mathrm{var}(x)= \frac{1}{n}\mathrm{var}(x) +\tag{17} \end{equation} $$ -

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

    @@ -509,7 +503,7 @@ measurements in the sample.
  • 89
  • 90
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs081.html b/doc/pub/Regression/html/._Regression-bs081.html index 23e1ce468..1a236b412 100644 --- a/doc/pub/Regression/html/._Regression-bs081.html +++ b/doc/pub/Regression/html/._Regression-bs081.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,35 +444,29 @@ MathJax.Hub.Config({ -

    Statistics, uncorrelated results

    +

    Statistics, computations

    - -

    -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: +For computational purposes one usually splits up the estimate of +\( \mathrm{err}_X^2 \), given by Eq. (16), into two +parts $$ -\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{err}_X^2 = \frac{1}{n}\mathrm{var}(x) + \frac{1}{n}(\mathrm{cov}(x)-\mathrm{var}(x)), $$ -resulting in +which equals $$ \begin{equation} -\mathrm{err}_X^2\approx \frac{1}{n^2} \sum_i \mathrm{var}(x)= \frac{1}{n}\mathrm{var}(x) -\tag{17} +\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} $$ -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. +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.

    @@ -505,7 +497,7 @@ cannot overlook the always present correlations.
  • 90
  • 91
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs082.html b/doc/pub/Regression/html/._Regression-bs082.html index 34069dc3c..f3454004b 100644 --- a/doc/pub/Regression/html/._Regression-bs082.html +++ b/doc/pub/Regression/html/._Regression-bs082.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,29 +444,22 @@ MathJax.Hub.Config({ -

    Statistics, computations

    +

    Statistics, more on computations of errors

    -For computational purposes one usually splits up the estimate of -\( \mathrm{err}_X^2 \), given by Eq. (16), into two -parts +Computationally the uncorrelated first term is much easier to treat +efficiently than the second. $$ -\mathrm{err}_X^2 = \frac{1}{n}\mathrm{var}(x) + \frac{1}{n}(\mathrm{cov}(x)-\mathrm{var}(x)), +\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 $$ -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. +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.

    @@ -499,7 +490,7 @@ measurements. For uncorrelated measurements this second term is zero.
  • 91
  • 92
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs083.html b/doc/pub/Regression/html/._Regression-bs083.html index 68f113b69..28dbd1a11 100644 --- a/doc/pub/Regression/html/._Regression-bs083.html +++ b/doc/pub/Regression/html/._Regression-bs083.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,22 +444,33 @@ MathJax.Hub.Config({ -

    Statistics, more on computations of errors

    +

    Statistics, wrapping up 1

    -Computationally the uncorrelated first term is much easier to treat -efficiently than the second. +Let us analyze the problem by splitting up the correlation term into +partial sums of the form: $$ -\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 +f_d = \frac{1}{n-d}\sum_{k=1}^{n-d}(x_k - \bar x_n)(x_{k+d} - \bar x_n) $$ -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. +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 \).

    @@ -492,7 +501,7 @@ have to be stored throughout the experiment.
  • 92
  • 93
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs084.html b/doc/pub/Regression/html/._Regression-bs084.html index 222f1a748..ede2800f1 100644 --- a/doc/pub/Regression/html/._Regression-bs084.html +++ b/doc/pub/Regression/html/._Regression-bs084.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,33 +444,33 @@ MathJax.Hub.Config({ -

    Statistics, wrapping up 1

    +

    Statistics, final expression

    -Let us analyze the problem by splitting up the correlation term into -partial sums of the form: +The sample error (see eq. (18)) can now be +written in terms of the autocorrelation function: $$ -f_d = \frac{1}{n-d}\sum_{k=1}^{n-d}(x_k - \bar x_n)(x_{k+d} - \bar x_n) +\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} $$ -The correlation term of the error can now be rewritten in terms of -\( f_d \) +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: $$ -\frac{2}{n}\sum_{k < l} (x_k - \bar x_n)(x_l - \bar x_n) = -2\sum_{d=1}^{n-1} f_d +\begin{equation} +\tau = 1+2\sum_{d=1}^{n-1}\kappa_d +\tag{20} +\end{equation} $$ - -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 \).

    @@ -503,7 +501,7 @@ starting always at \( 1 \) for \( d=0 \).
  • 93
  • 94
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs085.html b/doc/pub/Regression/html/._Regression-bs085.html index 49a1aea7d..2fb7b1de1 100644 --- a/doc/pub/Regression/html/._Regression-bs085.html +++ b/doc/pub/Regression/html/._Regression-bs085.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,33 +444,25 @@ MathJax.Hub.Config({ -

    Statistics, final expression

    +

    Statistics, effective number of correlations

    -The sample error (see eq. (18)) can now be -written in terms of the autocorrelation function: +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} -\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} +n_\mathrm{eff} = \frac{n}{\tau} $$ -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} -$$ +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.

    @@ -503,7 +493,7 @@ $$
  • 94
  • 95
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs086.html b/doc/pub/Regression/html/._Regression-bs086.html index df65b7c0a..2fd3c385e 100644 --- a/doc/pub/Regression/html/._Regression-bs086.html +++ b/doc/pub/Regression/html/._Regression-bs086.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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,30 +442,42 @@ MathJax.Hub.Config({

     

     

     

    - + -

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

    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.: $$ -n_\mathrm{eff} = \frac{n}{\tau} +\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*} $$ -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. -

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

    @@ -495,7 +505,7 @@ measurements is very large.

  • 95
  • 96
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs087.html b/doc/pub/Regression/html/._Regression-bs087.html index 1ab2d50e8..e1dffb8c0 100644 --- a/doc/pub/Regression/html/._Regression-bs087.html +++ b/doc/pub/Regression/html/._Regression-bs087.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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,42 +442,24 @@ MathJax.Hub.Config({

     

     

     

    - + -

    Linking the regression analysis with a statistical interpretation

    +

    Assumptions made

    -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.: +The assumption we have made here can be summarized as (and this is going to be 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 describe our data $$ -\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*} +\boldsymbol{y} = f(\boldsymbol{x})+\boldsymbol{\varepsilon} $$ -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 \). +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 +$$ +\boldsymbol{\tilde{y}} = \boldsymbol{X}\boldsymbol{\beta}. +$$

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

  • 96
  • 97
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs088.html b/doc/pub/Regression/html/._Regression-bs088.html index 151be7f22..c10550c78 100644 --- a/doc/pub/Regression/html/._Regression-bs088.html +++ b/doc/pub/Regression/html/._Regression-bs088.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,23 +444,38 @@ MathJax.Hub.Config({ -

    Assumptions made

    +

    Expectation value and variance

    -The assumption we have made here can be summarized as (and this is going to be 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 describe our data +We can calculate the expectation value of \( \boldsymbol{y} \) for a given element \( i \) $$ -\boldsymbol{y} = f(\boldsymbol{x})+\boldsymbol{\varepsilon} +\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*} $$ -

    -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 +while +its variance is $$ -\boldsymbol{\tilde{y}} = \boldsymbol{X}\boldsymbol{\beta}. +\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*} $$ +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). +

    @@ -489,7 +502,7 @@ $$

  • 97
  • 98
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs089.html b/doc/pub/Regression/html/._Regression-bs089.html index 15a5dc909..1a7df56a2 100644 --- a/doc/pub/Regression/html/._Regression-bs089.html +++ b/doc/pub/Regression/html/._Regression-bs089.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,37 +444,87 @@ MathJax.Hub.Config({ -

    Expectation value and variance

    +

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

    -We can calculate the expectation value of \( \boldsymbol{y} \) for a given element \( i \) +With the OLS expressions for the parameters \( \boldsymbol{\beta} \) we can evaluate the expectation value $$ -\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*} +\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}. $$ -while -its variance is +This means that the estimator of the regression parameters is unbiased. + +

    +We can also calculate the variance + +

    +The variance of \( \boldsymbol{\beta} \) is $$ -\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*} +\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*} $$ -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). +

    +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: +\( \boldsymbol{\sigma}^2 (\boldsymbol{\beta}_j ) = \boldsymbol{\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 can obtain analytical expressions for say the +expectation values of the parameters \( \boldsymbol{\beta} \) and their variance +when we employ Ridge regression, allowing us again to define 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.

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

  • 98
  • 99
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs090.html b/doc/pub/Regression/html/._Regression-bs090.html index b9dc41f03..5ddd8a048 100644 --- a/doc/pub/Regression/html/._Regression-bs090.html +++ b/doc/pub/Regression/html/._Regression-bs090.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,87 +444,31 @@ MathJax.Hub.Config({ -

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

    +

    Resampling methods

    -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. +With all these analytical equations for both the OLS and Ridge +regression, we will now outline how to assess a given model. This will +lead us to a discussion of the so-called bias-variance tradeoff (see +below) and so-called resampling methods.

    -We can also calculate the variance +One of the quantities we have discussed as a way to measure errors is +the mean-squared error (MSE), mainly used for fitting of continuous +functions. Another choice is the absolute error.

    -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*} -$$ +In the discussions below we will focus on the MSE and in particular since we will split the data into test and training data, +we discuss the -

    -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: -\( \boldsymbol{\sigma}^2 (\boldsymbol{\beta}_j ) = \boldsymbol{\sigma}^2 \sqrt{ -[(\mathbf{X}^{T} \mathbf{X})^{-1}]_{jj} } \). This may be used to -construct a confidence interval for the estimates. +

      +
    1. prediction error or simply the test error \( \mathrm{Err_{Test}} \), where we have a fixed training set and the test error is the MSE arising from the data reserved for testing. We discuss also the
    2. +
    3. training error \( \mathrm{Err_{Train}} \), which is the average loss over the training data.
    4. +
    -

    -In a similar way, we can obtain analytical expressions for say the -expectation values of the parameters \( \boldsymbol{\beta} \) and their variance -when we employ Ridge regression, allowing us again to define 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. +As our model becomes more and more complex, more of the training data tends to used. The training may thence adapt to more complicated structures in the data. This may lead to a decrease in the bias (see below for code example) and a slight increase of the variance for the test error. +For a certain level of complexity the test error will reach minimum, before starting to increase again. The +training error reaches a saturation.

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

  • 99
  • 100
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs091.html b/doc/pub/Regression/html/._Regression-bs091.html index 815bd2783..8732997d3 100644 --- a/doc/pub/Regression/html/._Regression-bs091.html +++ b/doc/pub/Regression/html/._Regression-bs091.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,31 +444,25 @@ MathJax.Hub.Config({ -

    Resampling methods

    +

    Resampling methods: Jackknife and Bootstrap

    -With all these analytical equations for both the OLS and Ridge -regression, we will now outline how to assess a given model. This will -lead us to a discussion of the so-called bias-variance tradeoff (see -below) and so-called resampling methods. +Two famous +resampling methods are the independent bootstrap and the jackknife.

    -One of the quantities we have discussed as a way to measure errors is -the mean-squared error (MSE), mainly used for fitting of continuous -functions. Another choice is the absolute error. +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.

    -In the discussions below we will focus on the MSE and in particular since we will split the data into test and training data, -we discuss the - -

      -
    1. prediction error or simply the test error \( \mathrm{Err_{Test}} \), where we have a fixed training set and the test error is the MSE arising from the data reserved for testing. We discuss also the
    2. -
    3. training error \( \mathrm{Err_{Train}} \), which is the average loss over the training data.
    4. -
    - -As our model becomes more and more complex, more of the training data tends to used. The training may thence adapt to more complicated structures in the data. This may lead to a decrease in the bias (see below for code example) and a slight increase of the variance for the test error. -For a certain level of complexity the test error will reach minimum, before starting to increase again. The -training error reaches a saturation. +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.

    @@ -498,7 +490,7 @@ training error reaches a saturation.

  • 100
  • 101
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs092.html b/doc/pub/Regression/html/._Regression-bs092.html index 2e491ef38..56bd87de9 100644 --- a/doc/pub/Regression/html/._Regression-bs092.html +++ b/doc/pub/Regression/html/._Regression-bs092.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,25 +444,21 @@ MathJax.Hub.Config({ -

    Resampling methods: Jackknife and Bootstrap

    +

    Resampling methods: Jackknife

    -Two famous -resampling methods are the independent bootstrap and the 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), +$$

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

    @@ -492,7 +486,7 @@ need for bootstrapping.

  • 101
  • 102
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs093.html b/doc/pub/Regression/html/._Regression-bs093.html index 1fcbb3cfc..4ec45b6da 100644 --- a/doc/pub/Regression/html/._Regression-bs093.html +++ b/doc/pub/Regression/html/._Regression-bs093.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,22 +444,39 @@ MathJax.Hub.Config({ -

    Resampling methods: Jackknife

    - +

    Jackknife code example

    -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), -$$ -

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

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

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

  • 102
  • 103
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs094.html b/doc/pub/Regression/html/._Regression-bs094.html index a489a7770..ad4e8e64b 100644 --- a/doc/pub/Regression/html/._Regression-bs094.html +++ b/doc/pub/Regression/html/._Regression-bs094.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,39 +444,25 @@ MathJax.Hub.Config({ -

    Jackknife code example

    -

    +

    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: - -

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

    @@ -505,7 +489,7 @@ t = jackknife(x, stat)

  • 103
  • 104
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs095.html b/doc/pub/Regression/html/._Regression-bs095.html index e6f867995..01bd2c9df 100644 --- a/doc/pub/Regression/html/._Regression-bs095.html +++ b/doc/pub/Regression/html/._Regression-bs095.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,24 +444,18 @@ 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: - -

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

    Resampling methods: Bootstrap background

    +

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

    @@ -491,7 +483,7 @@ advantages:

  • 104
  • 105
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs096.html b/doc/pub/Regression/html/._Regression-bs096.html index 5416c8910..ad4a1a177 100644 --- a/doc/pub/Regression/html/._Regression-bs096.html +++ b/doc/pub/Regression/html/._Regression-bs096.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,18 +444,24 @@ MathJax.Hub.Config({ -

    Resampling methods: Bootstrap background

    +

    Resampling methods: More Bootstrap background

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

    @@ -485,7 +489,7 @@ estimators.

  • 105
  • 106
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs097.html b/doc/pub/Regression/html/._Regression-bs097.html index f65c957e6..71e420d66 100644 --- a/doc/pub/Regression/html/._Regression-bs097.html +++ b/doc/pub/Regression/html/._Regression-bs097.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,24 +444,23 @@ MathJax.Hub.Config({ -

    Resampling methods: More Bootstrap background

    +

    Resampling methods: Bootstrap approach

    -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: +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. 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}) \). +

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

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

  • 106
  • 107
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs098.html b/doc/pub/Regression/html/._Regression-bs098.html index b44c00d13..3a30cf6ef 100644 --- a/doc/pub/Regression/html/._Regression-bs098.html +++ b/doc/pub/Regression/html/._Regression-bs098.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,23 +444,27 @@ MathJax.Hub.Config({ -

    Resampling methods: Bootstrap approach

    +

    Resampling methods: Bootstrap steps

    -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. +The independent bootstrap works like this: -

    -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. 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 ^* \).

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

  • 107
  • 108
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs099.html b/doc/pub/Regression/html/._Regression-bs099.html index 31e97f6c7..cb0f538bb 100644 --- a/doc/pub/Regression/html/._Regression-bs099.html +++ b/doc/pub/Regression/html/._Regression-bs099.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,28 +444,67 @@ MathJax.Hub.Config({ -

    Resampling methods: Bootstrap steps

    +

    Code example for the Bootstrap method

    -The independent bootstrap works like this: +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. -

      -
    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 ^* \). + +

    from numpy import *
    +from numpy.random import randint, randn
    +from time import time
    +import matplotlib.mlab as mlab
    +import matplotlib.pyplot as plt
     
    +# 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()
    +

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

  • 108
  • 109
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs100.html b/doc/pub/Regression/html/._Regression-bs100.html index 9edf580d9..a8c5f92df 100644 --- a/doc/pub/Regression/html/._Regression-bs100.html +++ b/doc/pub/Regression/html/._Regression-bs100.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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,69 +442,26 @@ MathJax.Hub.Config({

     

     

     

    - + -

    Code example for the Bootstrap method

    +

    Various steps in cross-validation

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

    - - -

    from numpy import *
    -from numpy.random import randint, randn
    -from time import time
    -import matplotlib.mlab as mlab
    -import matplotlib.pyplot as plt
    -
    -# 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()
    -

    @@ -533,7 +488,7 @@ plt.show()

  • 109
  • 110
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs101.html b/doc/pub/Regression/html/._Regression-bs101.html index 5e5074a9d..a4d0172a4 100644 --- a/doc/pub/Regression/html/._Regression-bs101.html +++ b/doc/pub/Regression/html/._Regression-bs101.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,23 +444,34 @@ MathJax.Hub.Config({ -

    Various steps in cross-validation

    +

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

    -

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

      +
    • Define a range of interest for the penalty parameter.
    • +
    • Divide the data set into training and test set comprising samples \( \{1, \ldots, n\} \setminus i \) and \( \{ i \} \), respectively.
    • +
    • Fit the linear regression model by means of ridge estimation for each \( \lambda \) in the grid using the training set, and the corresponding estimate of the error variance \( \boldsymbol{\sigma}_{-i}^2(\lambda) \), as
    • +
    + +$$ +\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*} +$$ + + +
      +
    • Evaluate the prediction performance of these models on the test set by \( \log\{L[y_i, \boldsymbol{X}_{i, \ast}; \boldsymbol{\beta}_{-i}(\lambda), \boldsymbol{\sigma}_{-i}^2(\lambda)]\} \). Or, by the prediction error \( |y_i - \boldsymbol{X}_{i, \ast} \boldsymbol{\beta}_{-i}(\lambda)| \), the relative error, the error squared or the R2 score function.
    • +
    • Repeat the first three steps such that each sample plays the role of the test set once.
    • +
    • Average the prediction performances of the test sets at each grid point of the penalty bias/parameter. It is an estimate of the prediction performance of the model corresponding to this value of the penalty parameter on novel data. It is defined as
    • +
    + +$$ +\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*} +$$

    @@ -490,7 +499,7 @@ cross-validation (LOOCV).

  • 110
  • 111
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs102.html b/doc/pub/Regression/html/._Regression-bs102.html index f837607c3..3026ef271 100644 --- a/doc/pub/Regression/html/._Regression-bs102.html +++ b/doc/pub/Regression/html/._Regression-bs102.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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,38 +442,28 @@ MathJax.Hub.Config({

     

     

     

    - + -

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

    - -
      -
    • Define a range of interest for the penalty parameter.
    • -
    • Divide the data set into training and test set comprising samples \( \{1, \ldots, n\} \setminus i \) and \( \{ i \} \), respectively.
    • -
    • Fit the linear regression model by means of ridge estimation for each \( \lambda \) in the grid using the training set, and the corresponding estimate of the error variance \( \boldsymbol{\sigma}_{-i}^2(\lambda) \), as
    • -
    - -$$ -\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*} -$$ - - -
      -
    • Evaluate the prediction performance of these models on the test set by \( \log\{L[y_i, \boldsymbol{X}_{i, \ast}; \boldsymbol{\beta}_{-i}(\lambda), \boldsymbol{\sigma}_{-i}^2(\lambda)]\} \). Or, by the prediction error \( |y_i - \boldsymbol{X}_{i, \ast} \boldsymbol{\beta}_{-i}(\lambda)| \), the relative error, the error squared or the R2 score function.
    • -
    • Repeat the first three steps such that each sample plays the role of the test set once.
    • -
    • Average the prediction performances of the test sets at each grid point of the penalty bias/parameter. It is an estimate of the prediction performance of the model corresponding to this value of the penalty parameter on novel data. It is defined as
    • -
    - -$$ -\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*} -$$ +

    Cross-validation in brief

    +For the various values of \( k \) + +

      +
    1. shuffle the dataset randomly.
    2. +
    3. Split the dataset into \( k \) groups.
    4. +
    5. For each unique group: + +
        +
      1. Decide which group to use as set for test data
      2. +
      3. Take the remaining groups as a training data set
      4. +
      5. Fit a model on the training set and evaluate it on the test set
      6. +
      7. Retain the evaluation score and discard the model
      8. +
      + +
    6. Summarize the model using the sample of model evaluation scores
    7. +
    +

    diff --git a/doc/pub/Regression/html/._Regression-bs103.html b/doc/pub/Regression/html/._Regression-bs103.html index 36e85b32d..fbf2f080f 100644 --- a/doc/pub/Regression/html/._Regression-bs103.html +++ b/doc/pub/Regression/html/._Regression-bs103.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,26 +444,104 @@ MathJax.Hub.Config({ -

    Cross-validation in brief

    +

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

    -For the various values of \( k \) +The code here uses Ridge regression with cross-validation (CV) resampling and \( k \)-fold CV in order to fit a specific polynomial. +

    -

      -
    1. shuffle the dataset randomly.
    2. -
    3. Split the dataset into \( k \) groups.
    4. -
    5. For each unique group: + +
      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
       
      -
        -
      1. Decide which group to use as set for test data
      2. -
      3. Take the remaining groups as a training data set
      4. -
      5. Fit a model on the training set and evaluate it on the test set
      6. -
      7. Retain the evaluation score and discard the model
      8. -
      +# A seed just to ensure that the random numbers are the same for every run. +# Useful for eventual debugging. +np.random.seed(3155) -
    6. Summarize the model using the sample of model evaluation scores
    7. -
    +# Generate the data. +nsamples = 100 +x = np.random.randn(nsamples) +y = 3*x**2 + np.random.randn(nsamples) +## 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 + + +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() + +

    diff --git a/doc/pub/Regression/html/._Regression-bs104.html b/doc/pub/Regression/html/._Regression-bs104.html index e208c311d..4ebd9cf5c 100644 --- a/doc/pub/Regression/html/._Regression-bs104.html +++ b/doc/pub/Regression/html/._Regression-bs104.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,103 +444,69 @@ MathJax.Hub.Config({ -

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

    +

    The bias-variance tradeoff

    -The code here uses Ridge regression with cross-validation (CV) resampling and \( k \)-fold CV in order to fit a specific polynomial. +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\} \). +

    +Let us assume that the true data is generated from a noisy model - -

    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
    +$$
    +\boldsymbol{y}=f(\boldsymbol{x}) + \boldsymbol{\epsilon}
    +$$
     
    -# A seed just to ensure that the random numbers are the same for every run.
    -# Useful for eventual debugging.
    -np.random.seed(3155)
    +

    +where \( \epsilon \) is normally distributed with mean zero and standard deviation \( \sigma^2 \). -# Generate the data. -nsamples = 100 -x = np.random.randn(nsamples) -y = 3*x**2 + np.random.randn(nsamples) +

    +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} \). -## Cross-validation on Ridge regression using KFold only +

    +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]. +$$ -# Decide degree on polynomial to fit -poly = PolynomialFeatures(degree = 6) +

    +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 which values of lambda to use -nlambdas = 500 -lambdas = np.logspace(-3, 5, nlambdas) +

    +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} \). -# Initialize a KFold instance -k = 5 -kfold = KFold(n_splits = k) +

    +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], +$$ -# Perform the cross-validation to estimate MSE -scores_KFold = np.zeros((nlambdas, 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], +$$ -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] +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, +$$ - xtest = x[test_inds] - ytest = y[test_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} \). - 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() -

    @@ -569,7 +533,7 @@ plt.show()

  • 113
  • 114
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs105.html b/doc/pub/Regression/html/._Regression-bs105.html index bc7e9e0df..249c41b47 100644 --- a/doc/pub/Regression/html/._Regression-bs105.html +++ b/doc/pub/Regression/html/._Regression-bs105.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,69 +444,65 @@ MathJax.Hub.Config({ -

    The bias-variance tradeoff

    - +

    Example code for 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\} \). -

    -Let us assume that the true data is generated from a noisy model + +

    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
     
    -$$
    -\boldsymbol{y}=f(\boldsymbol{x}) + \boldsymbol{\epsilon}
    -$$
    +np.random.seed(2018)
     
    -

    -where \( \epsilon \) is normally distributed with mean zero and standard deviation \( \sigma^2 \). +n = 500 +n_boostraps = 100 +degree = 18 # A quite high value, just to show. +noise = 0.1 -

    -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} \). +# 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) -

    -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]. -$$ +# 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) -

    -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. -$$ +# Combine x transformation and model into one operation. +# Not neccesary, but convenient. +model = make_pipeline(PolynomialFeatures(degree=degree), LinearRegression(fit_intercept=False)) -

    -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} \). +# 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) -

    -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], -$$ + # Evaluate the new model on the same test data each time. + y_pred[:, i] = model.fit(x_, y_).predict(x_test).ravel() -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} \). +# 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() +

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

  • 114
  • 115
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs106.html b/doc/pub/Regression/html/._Regression-bs106.html index b26eec9b8..09e7a3bdd 100644 --- a/doc/pub/Regression/html/._Regression-bs106.html +++ b/doc/pub/Regression/html/._Regression-bs106.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,7 +444,7 @@ MathJax.Hub.Config({ -

    Example code for Bias-Variance tradeoff

    +

    Understanding what happens

    @@ -460,48 +458,40 @@ MathJax.Hub.Config({ np.random.seed(2018) -n = 500 +n = 40 n_boostraps = 100 -degree = 18 # A quite high value, just to show. -noise = 0.1 +maxdegree = 14 + # 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) - -# Hold out some test data that is never used in training. +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) -# Combine x transformation and model into one operation. -# Not neccesary, but convenient. -model = make_pipeline(PolynomialFeatures(degree=degree), LinearRegression(fit_intercept=False)) +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() -# 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) + 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])) - # 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.plot(polydegree, error, label='Error') +plt.plot(polydegree, bias, label='bias') +plt.plot(polydegree, variance, label='Variance') plt.legend() plt.show() @@ -531,7 +521,7 @@ plt.show()

  • 115
  • 116
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs107.html b/doc/pub/Regression/html/._Regression-bs107.html index b283c1e6b..de7c78092 100644 --- a/doc/pub/Regression/html/._Regression-bs107.html +++ b/doc/pub/Regression/html/._Regression-bs107.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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,59 +442,42 @@ 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). - -

    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
    +

    +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. -np.random.seed(2018) +

    +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. -n = 40 -n_boostraps = 100 -maxdegree = 14 +

    +You may also find this recent article of interest. - -# 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() -

    @@ -523,7 +504,7 @@ plt.show()

  • 116
  • 117
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs108.html b/doc/pub/Regression/html/._Regression-bs108.html index b36d25354..b9dae49ac 100644 --- a/doc/pub/Regression/html/._Regression-bs108.html +++ b/doc/pub/Regression/html/._Regression-bs108.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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,42 +442,84 @@ MathJax.Hub.Config({

     

     

     

    - - -

    Summing up

    + +

    Another Example from 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). -

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

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

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

    -You may also find this recent article of interest. +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() +

    @@ -506,7 +546,7 @@ You may also find this recent 117

  • 118
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs109.html b/doc/pub/Regression/html/._Regression-bs109.html index ab3bb42b6..21a91e285 100644 --- a/doc/pub/Regression/html/._Regression-bs109.html +++ b/doc/pub/Regression/html/._Regression-bs109.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,80 +444,88 @@ MathJax.Hub.Config({ -

    Another Example from Scikit-Learn's Repository

    +

    More examples on bootstrap and cross-validation and errors

    +

    -

    """
    -============================
    -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__)
    -
    +
    # Common imports
    +import os
     import numpy as np
    +import pandas as pd
     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
    +from sklearn.linear_model import LinearRegression, Ridge, Lasso
    +from sklearn.model_selection import train_test_split
    +from sklearn.utils import resample
    +from sklearn.metrics import mean_squared_error
    +# Where to save the figures and data files
    +PROJECT_ROOT_DIR = "Results"
    +FIGURE_ID = "Results/FigureFiles"
    +DATA_ID = "DataFiles/"
     
    +if not os.path.exists(PROJECT_ROOT_DIR):
    +    os.mkdir(PROJECT_ROOT_DIR)
     
    -def true_fun(X):
    -    return np.cos(1.5 * np.pi * X)
    +if not os.path.exists(FIGURE_ID):
    +    os.makedirs(FIGURE_ID)
     
    -np.random.seed(0)
    +if not os.path.exists(DATA_ID):
    +    os.makedirs(DATA_ID)
     
    -n_samples = 30
    -degrees = [1, 4, 15]
    +def image_path(fig_id):
    +    return os.path.join(FIGURE_ID, fig_id)
     
    -X = np.sort(np.random.rand(n_samples))
    -y = true_fun(X) + np.random.randn(n_samples) * 0.1
    +def data_path(dat_id):
    +    return os.path.join(DATA_ID, dat_id)
     
    -plt.figure(figsize=(14, 5))
    -for i in range(len(degrees)):
    -    ax = plt.subplot(1, len(degrees), i + 1)
    -    plt.setp(ax, xticks=(), yticks=())
    +def save_fig(fig_id):
    +    plt.savefig(image_path(fig_id) + ".png", format='png')
     
    -    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)
    +infile = open(data_path("EoS.csv"),'r')
     
    -    # Evaluate the models using crossvalidation
    -    scores = cross_val_score(pipeline, X[:, np.newaxis], y,
    -                             scoring="neg_mean_squared_error", cv=10)
    +# Read the EoS data as  csv file and organize the data into two arrays with density and energies
    +EoS = pd.read_csv(infile, names=('Density', 'Energy'))
    +EoS['Energy'] = pd.to_numeric(EoS['Energy'], errors='coerce')
    +EoS = EoS.dropna()
    +Energies = EoS['Energy']
    +Density = EoS['Density']
    +#  The design matrix now as function of various polytrops
     
    -    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()))
    +Maxpolydegree = 30
    +X = np.zeros((len(Density),Maxpolydegree))
    +X[:,0] = 1.0
    +testerror = np.zeros(Maxpolydegree)
    +trainingerror = np.zeros(Maxpolydegree)
    +polynomial = np.zeros(Maxpolydegree)
    +
    +trials = 100
    +for polydegree in range(1, Maxpolydegree):
    +    polynomial[polydegree] = polydegree
    +    for degree in range(polydegree):
    +        X[:,degree] = Density**(degree/3.0)
    +
    +# loop over trials in order to estimate the expectation value of the MSE
    +    testerror[polydegree] = 0.0
    +    trainingerror[polydegree] = 0.0
    +    for samples in range(trials):
    +        x_train, x_test, y_train, y_test = train_test_split(X, Energies, test_size=0.2)
    +        model = LinearRegression(fit_intercept=True).fit(x_train, y_train)
    +        ypred = model.predict(x_train)
    +        ytilde = model.predict(x_test)
    +        testerror[polydegree] += mean_squared_error(y_test, ytilde)
    +        trainingerror[polydegree] += mean_squared_error(y_train, ypred) 
    +
    +    testerror[polydegree] /= trials
    +    trainingerror[polydegree] /= trials
    +    print("Degree of polynomial: %3d"% polynomial[polydegree])
    +    print("Mean squared error on training data: %.8f" % trainingerror[polydegree])
    +    print("Mean squared error on test data: %.8f" % testerror[polydegree])
    +
    +plt.plot(polynomial, np.log10(trainingerror), label='Training Error')
    +plt.plot(polynomial, np.log10(testerror), label='Test Error')
    +plt.xlabel('Polynomial degree')
    +plt.ylabel('log10[MSE]')
    +plt.legend()
     plt.show()
     

    @@ -548,7 +554,7 @@ plt.show()

  • 118
  • 119
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs110.html b/doc/pub/Regression/html/._Regression-bs110.html index 914f9d66b..66519bdb9 100644 --- a/doc/pub/Regression/html/._Regression-bs110.html +++ b/doc/pub/Regression/html/._Regression-bs110.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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,9 +442,9 @@ MathJax.Hub.Config({

     

     

     

    - + -

    More examples on bootstrap and cross-validation and errors

    +

    The same example but now with cross-validation

    @@ -457,9 +455,11 @@ MathJax.Hub.Config({ import pandas as pd import matplotlib.pyplot as plt from sklearn.linear_model import LinearRegression, Ridge, Lasso -from sklearn.model_selection import train_test_split -from sklearn.utils import resample from sklearn.metrics import mean_squared_error +from sklearn.model_selection import KFold +from sklearn.model_selection import cross_val_score + + # Where to save the figures and data files PROJECT_ROOT_DIR = "Results" FIGURE_ID = "Results/FigureFiles" @@ -496,35 +496,22 @@ Density = EoS[& Maxpolydegree = 30 X = np.zeros((len(Density),Maxpolydegree)) X[:,0] = 1.0 -testerror = np.zeros(Maxpolydegree) -trainingerror = np.zeros(Maxpolydegree) +estimated_mse_sklearn = np.zeros(Maxpolydegree) polynomial = np.zeros(Maxpolydegree) +k =5 +kfold = KFold(n_splits = k) -trials = 100 for polydegree in range(1, Maxpolydegree): polynomial[polydegree] = polydegree for degree in range(polydegree): X[:,degree] = Density**(degree/3.0) - + OLS = LinearRegression() # loop over trials in order to estimate the expectation value of the MSE - testerror[polydegree] = 0.0 - trainingerror[polydegree] = 0.0 - for samples in range(trials): - x_train, x_test, y_train, y_test = train_test_split(X, Energies, test_size=0.2) - model = LinearRegression(fit_intercept=True).fit(x_train, y_train) - ypred = model.predict(x_train) - ytilde = model.predict(x_test) - testerror[polydegree] += mean_squared_error(y_test, ytilde) - trainingerror[polydegree] += mean_squared_error(y_train, ypred) + estimated_mse_folds = cross_val_score(OLS, X, Energies, scoring='neg_mean_squared_error', cv=kfold) +#[:, np.newaxis] + estimated_mse_sklearn[polydegree] = np.mean(-estimated_mse_folds) - testerror[polydegree] /= trials - trainingerror[polydegree] /= trials - print("Degree of polynomial: %3d"% polynomial[polydegree]) - print("Mean squared error on training data: %.8f" % trainingerror[polydegree]) - print("Mean squared error on test data: %.8f" % testerror[polydegree]) - -plt.plot(polynomial, np.log10(trainingerror), label='Training Error') -plt.plot(polynomial, np.log10(testerror), label='Test Error') +plt.plot(polynomial, np.log10(estimated_mse_sklearn), label='Test Error') plt.xlabel('Polynomial degree') plt.ylabel('log10[MSE]') plt.legend() @@ -556,7 +543,7 @@ plt.show()

  • 119
  • 120
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs111.html b/doc/pub/Regression/html/._Regression-bs111.html index ea9ec24e6..11f28a74a 100644 --- a/doc/pub/Regression/html/._Regression-bs111.html +++ b/doc/pub/Regression/html/._Regression-bs111.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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,78 +442,45 @@ MathJax.Hub.Config({

     

     

     

    - - -

    The same example but now with cross-validation

    + +

    Cross-validation with Ridge

    -

    # Common imports
    -import os
    -import numpy as np
    -import pandas as pd
    +
    import numpy as np
     import matplotlib.pyplot as plt
    -from sklearn.linear_model import LinearRegression, Ridge, Lasso
    -from sklearn.metrics import mean_squared_error
     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.
    +np.random.seed(3155)
    +# Generate the data.
    +n = 100
    +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)
    +# Decide degree on polynomial to fit
    +poly = PolynomialFeatures(degree = 10)
     
    -# Where to save the figures and data files
    -PROJECT_ROOT_DIR = "Results"
    -FIGURE_ID = "Results/FigureFiles"
    -DATA_ID = "DataFiles/"
    -
    -if not os.path.exists(PROJECT_ROOT_DIR):
    -    os.mkdir(PROJECT_ROOT_DIR)
    -
    -if not os.path.exists(FIGURE_ID):
    -    os.makedirs(FIGURE_ID)
    -
    -if not os.path.exists(DATA_ID):
    -    os.makedirs(DATA_ID)
    -
    -def image_path(fig_id):
    -    return os.path.join(FIGURE_ID, fig_id)
    -
    -def data_path(dat_id):
    -    return os.path.join(DATA_ID, dat_id)
    -
    -def save_fig(fig_id):
    -    plt.savefig(image_path(fig_id) + ".png", format='png')
    -
    -infile = open(data_path("EoS.csv"),'r')
    -
    -# Read the EoS data as  csv file and organize the data into two arrays with density and energies
    -EoS = pd.read_csv(infile, names=('Density', 'Energy'))
    -EoS['Energy'] = pd.to_numeric(EoS['Energy'], errors='coerce')
    -EoS = EoS.dropna()
    -Energies = EoS['Energy']
    -Density = EoS['Density']
    -#  The design matrix now as function of various polytrops
    -
    -Maxpolydegree = 30
    -X = np.zeros((len(Density),Maxpolydegree))
    -X[:,0] = 1.0
    -estimated_mse_sklearn = np.zeros(Maxpolydegree)
    -polynomial = np.zeros(Maxpolydegree)
    -k =5
    +# 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)
    -
    -for polydegree in range(1, Maxpolydegree):
    -    polynomial[polydegree] = polydegree
    -    for degree in range(polydegree):
    -        X[:,degree] = Density**(degree/3.0)
    -        OLS = LinearRegression()
    -# loop over trials in order to estimate the expectation value of the MSE
    -    estimated_mse_folds = cross_val_score(OLS, X, Energies, scoring='neg_mean_squared_error', cv=kfold)
    -#[:, np.newaxis]
    -    estimated_mse_sklearn[polydegree] = np.mean(-estimated_mse_folds)
    -
    -plt.plot(polynomial, np.log10(estimated_mse_sklearn), label='Test Error')
    -plt.xlabel('Polynomial degree')
    -plt.ylabel('log10[MSE]')
    +estimated_mse_sklearn = np.zeros(nlambdas)
    +i = 0
    +for lmb in lambdas:
    +    ridge = Ridge(alpha = lmb)
    +    estimated_mse_folds = cross_val_score(ridge, x, y, scoring='neg_mean_squared_error', cv=kfold)
    +    estimated_mse_sklearn[i] = np.mean(-estimated_mse_folds)
    +    i += 1
    +plt.figure()
    +plt.plot(np.log10(lambdas), estimated_mse_sklearn, label = 'cross_val_score')
    +plt.xlabel('log10(lambda)')
    +plt.ylabel('MSE')
     plt.legend()
     plt.show()
     
    @@ -544,8 +509,6 @@ plt.show()
  • 119
  • 120
  • 121
  • -
  • ...
  • -
  • 122
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs112.html b/doc/pub/Regression/html/._Regression-bs112.html index d57a88385..856fdde8e 100644 --- a/doc/pub/Regression/html/._Regression-bs112.html +++ b/doc/pub/Regression/html/._Regression-bs112.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,46 +444,60 @@ MathJax.Hub.Config({ -

    Cross-validation with Ridge

    +

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

    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
    +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')
     
    -# A seed just to ensure that the random numbers are the same for every run.
    -np.random.seed(3155)
    -# Generate the data.
    -n = 100
    -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)
    -# Decide degree on polynomial to fit
    -poly = PolynomialFeatures(degree = 10)
    +L = 40
    +n = int(1e4)
     
    -# 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)
    -estimated_mse_sklearn = np.zeros(nlambdas)
    -i = 0
    -for lmb in lambdas:
    -    ridge = Ridge(alpha = lmb)
    -    estimated_mse_folds = cross_val_score(ridge, x, y, scoring='neg_mean_squared_error', cv=kfold)
    -    estimated_mse_sklearn[i] = np.mean(-estimated_mse_folds)
    -    i += 1
    -plt.figure()
    -plt.plot(np.log10(lambdas), estimated_mse_sklearn, label = 'cross_val_score')
    -plt.xlabel('log10(lambda)')
    -plt.ylabel('MSE')
    -plt.legend()
    -plt.show()
    +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))
     
    +

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

    @@ -510,7 +522,6 @@ plt.show()

  • 119
  • 120
  • 121
  • -
  • 122
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs113.html b/doc/pub/Regression/html/._Regression-bs113.html index 4113fea6f..7c7696f1b 100644 --- a/doc/pub/Regression/html/._Regression-bs113.html +++ b/doc/pub/Regression/html/._Regression-bs113.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,60 +444,53 @@ MathJax.Hub.Config({ -

    The Ising model

    +

    Reformulating the problem to suit regression

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

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

    -

    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)
    -
    +
    X = np.zeros((n, L ** 2))
     for i in range(n):
    -    energies[i] = - J * np.dot(spins[i], np.roll(spins[i], 1))
    +    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)
     
    -

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

    @@ -523,7 +514,6 @@ the coupling constant to achieve this.

  • 119
  • 120
  • 121
  • -
  • 122
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs114.html b/doc/pub/Regression/html/._Regression-bs114.html index 8590fbd21..7b95fe9c3 100644 --- a/doc/pub/Regression/html/._Regression-bs114.html +++ b/doc/pub/Regression/html/._Regression-bs114.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,52 +444,50 @@ MathJax.Hub.Config({ -

    Reformulating the problem to suit regression

    +

    Linear regression

    -A more general form for the one-dimensional Ising model is +In the ordinary least squares method we choose the cost function $$ \begin{align} - H = - \sum_j^L \sum_k^L s_j s_k J_{jk}. -\tag{22} + 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} $$

    -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 +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 + $$ -\begin{align} - \boldsymbol{H} = \boldsymbol{X} J, -\tag{23} -\end{align} + \boldsymbol{\beta} = \frac{\boldsymbol{X}^T \boldsymbol{y}}{\boldsymbol{X}^T \boldsymbol{X}}, $$

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

    -

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

    @@ -515,7 +511,6 @@ X_train, X_test, y_train, y_test = train_tes

  • 119
  • 120
  • 121
  • -
  • 122
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs115.html b/doc/pub/Regression/html/._Regression-bs115.html index e53c538b1..f59a0ea07 100644 --- a/doc/pub/Regression/html/._Regression-bs115.html +++ b/doc/pub/Regression/html/._Regression-bs115.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,51 +444,90 @@ MathJax.Hub.Config({ -

    Linear regression

    +

    Singular Value decomposition

    -In the ordinary least squares method we choose the cost function +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} - 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} + \boldsymbol{\beta} = \boldsymbol{V}\boldsymbol{\Sigma}^{+} \boldsymbol{U}^T \boldsymbol{y}. +\tag{26} \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 - -$$ - \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 +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.

    -

    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_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
     

    -

    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)
    +
    beta = ols_svd(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? +

    @@ -512,7 +549,6 @@ beta = ols_inv(X_train_own, y_train)

  • 119
  • 120
  • 121
  • -
  • 122
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs116.html b/doc/pub/Regression/html/._Regression-bs116.html index 862e578f9..202218b88 100644 --- a/doc/pub/Regression/html/._Regression-bs116.html +++ b/doc/pub/Regression/html/._Regression-bs116.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,74 +444,128 @@ MathJax.Hub.Config({ -

    Singular Value decomposition

    +

    The one-dimensional Ising model

    -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 +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 -$$ - \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} + 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} \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. +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,

    -

    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
    +
    clf = skl.LinearRegression().fit(X_train, y_train)
     

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

    -

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

    -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. - +And then we plot the results

    fig = plt.figure(figsize=(20, 14))
    -im = plt.imshow(J, **cmap_args)
    -plt.title("OLS", fontsize=18)
    +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)
    @@ -521,14 +573,7 @@ cb.ax.se
     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? +The results perfectly with our previous discussion where we used our own code.

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

  • 119
  • 120
  • 121
  • -
  • 122
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs117.html b/doc/pub/Regression/html/._Regression-bs117.html index 01a436609..c53e7a4e7 100644 --- a/doc/pub/Regression/html/._Regression-bs117.html +++ b/doc/pub/Regression/html/._Regression-bs117.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,137 +444,38 @@ MathJax.Hub.Config({ -

    The one-dimensional Ising model

    +

    Ridge regression

    -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 +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} - 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} + 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} $$ -

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

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

  • 119
  • 120
  • 121
  • -
  • 122
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs118.html b/doc/pub/Regression/html/._Regression-bs118.html index 9c35368ee..356ac3df0 100644 --- a/doc/pub/Regression/html/._Regression-bs118.html +++ b/doc/pub/Regression/html/._Regression-bs118.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,31 +444,29 @@ MathJax.Hub.Config({ -

    Ridge regression

    +

    LASSO regression

    -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 +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 \boldsymbol{\beta}^T\boldsymbol{\beta}. -\tag{31} + 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. +

    -

    _lambda = 0.1
    -clf_ridge = skl.Ridge(alpha=_lambda).fit(X_train, y_train)
    -J_ridge_sk = clf_ridge.coef_.reshape(L, L)
    +
    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_ridge_sk, **cmap_args)
    -plt.title("Ridge from Scikit-learn", fontsize=18)
    +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)
    @@ -478,6 +474,11 @@ 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 \). +

    @@ -496,7 +497,6 @@ plt.show()

  • 119
  • 120
  • 121
  • -
  • 122
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs119.html b/doc/pub/Regression/html/._Regression-bs119.html index a8085cc35..65dda4de5 100644 --- a/doc/pub/Regression/html/._Regression-bs119.html +++ b/doc/pub/Regression/html/._Regression-bs119.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,40 +444,56 @@ MathJax.Hub.Config({ -

    LASSO regression

    +

    Performance as function of the regularization parameter

    -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. +We see how the different models perform for a different set of values for \( \lambda \).

    -

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

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

  • 119
  • 120
  • 121
  • -
  • 122
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs120.html b/doc/pub/Regression/html/._Regression-bs120.html index 2756d5d50..86de6374a 100644 --- a/doc/pub/Regression/html/._Regression-bs120.html +++ b/doc/pub/Regression/html/._Regression-bs120.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -446,58 +444,57 @@ MathJax.Hub.Config({ -

    Performance as function of the regularization parameter

    +

    Finding the optimal value of \( \lambda \)

    -We see how the different models perform for a different set of values for \( \lambda \). +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.

    -

    lambdas = np.logspace(-4, 5, 10)
    +
    fig = plt.figure(figsize=(20, 14))
     
    -train_errors = {
    -    "ols_sk": np.zeros(lambdas.size),
    -    "ridge_sk": np.zeros(lambdas.size),
    -    "lasso_sk": np.zeros(lambdas.size)
    +colors = {
    +    "ols_sk": "r",
    +    "ridge_sk": "y",
    +    "lasso_sk": "c"
     }
     
    -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 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()
     

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

    +

      @@ -513,8 +510,6 @@ much. Ridge is more stable over a larger range of values for
    • 119
    • 120
    • 121
    • -
    • 122
    • -
    • »
    diff --git a/doc/pub/Regression/html/Regression-bs.html b/doc/pub/Regression/html/Regression-bs.html index 3ac741c21..1b85248e1 100644 --- a/doc/pub/Regression/html/Regression-bs.html +++ b/doc/pub/Regression/html/Regression-bs.html @@ -125,154 +125,153 @@ Automatically generated HTML file from DocOnce source ('Fixing the singularity', 2, None, '___sec35'), ('Basic math of the SVD', 2, None, '___sec36'), ('The SVD, a Fantastic Algorithm', 2, None, '___sec37'), - ('Another Example', 2, None, '___sec38'), - ('Economy-size SVD', 2, None, '___sec39'), + ('Economy-size SVD', 2, None, '___sec38'), + ('Codes for the SVD', 2, None, '___sec39'), ('Mathematical Properties', 2, None, '___sec40'), ('Ridge and LASSO Regression', 2, None, '___sec41'), ('More on Ridge Regression', 2, None, '___sec42'), ('Interpreting the Ridge results', 2, None, '___sec43'), ('More interpretations', 2, None, '___sec44'), - ('Codes for the SVD', 2, None, '___sec45'), - ('A better understanding of regularization', 2, None, '___sec46'), + ('A better understanding of regularization', 2, None, '___sec45'), ('Decomposing the OLS and Ridge expressions', 2, None, - '___sec47'), + '___sec46'), ('Introducing the Covariance and Correlation functions', 2, None, - '___sec48'), + '___sec47'), ('Correlation Function and Design/Feature Matrix', 2, None, - '___sec49'), - ('Covariance Matrix Examples', 2, None, '___sec50'), - ('Correlation Matrix', 2, None, '___sec51'), - ('Correlation Matrix with Pandas', 2, None, '___sec52'), + '___sec48'), + ('Covariance Matrix Examples', 2, None, '___sec49'), + ('Correlation Matrix', 2, None, '___sec50'), + ('Correlation Matrix with Pandas', 2, None, '___sec51'), ('Correlation Matrix with Pandas and the Franke function', 2, None, - '___sec53'), + '___sec52'), ('Rewriting the Covariance and/or Correlation Matrix', 2, None, - '___sec54'), - ('Linking with SVD', 2, None, '___sec55'), - ('Where are we going?', 2, None, '___sec56'), - ('Resampling methods', 2, None, '___sec57'), + '___sec53'), + ('Linking with SVD', 2, None, '___sec54'), + ('Where are we going?', 2, None, '___sec55'), + ('Resampling methods', 2, None, '___sec56'), ('Resampling approaches can be computationally expensive', 2, None, - '___sec58'), - ('Why resampling methods ?', 2, None, '___sec59'), - ('Statistical analysis', 2, None, '___sec60'), - ('Statistics', 2, None, '___sec61'), - ('Statistics, moments', 2, None, '___sec62'), - ('Statistics, central moments', 2, None, '___sec63'), - ('Statistics, covariance', 2, None, '___sec64'), - ('Statistics, more covariance', 2, None, '___sec65'), - ('Covariance example', 2, None, '___sec66'), - ('Covariance in numpy', 2, None, '___sec67'), - ('Statistics, independent variables', 2, None, '___sec68'), - ('Statistics, more variance', 2, None, '___sec69'), - ('Statistics and stochastic processes', 2, None, '___sec70'), - ('Statistics and sample variables', 2, None, '___sec71'), + '___sec57'), + ('Why resampling methods ?', 2, None, '___sec58'), + ('Statistical analysis', 2, None, '___sec59'), + ('Statistics', 2, None, '___sec60'), + ('Statistics, moments', 2, None, '___sec61'), + ('Statistics, central moments', 2, None, '___sec62'), + ('Statistics, covariance', 2, None, '___sec63'), + ('Statistics, more covariance', 2, None, '___sec64'), + ('Covariance example', 2, None, '___sec65'), + ('Covariance in numpy', 2, None, '___sec66'), + ('Statistics, independent variables', 2, None, '___sec67'), + ('Statistics, more variance', 2, None, '___sec68'), + ('Statistics and stochastic processes', 2, None, '___sec69'), + ('Statistics and sample variables', 2, None, '___sec70'), ('Statistics, sample variance and covariance', 2, None, - '___sec72'), - ('Statistics, law of large numbers', 2, None, '___sec73'), - ('Statistics, more on sample error', 2, None, '___sec74'), - ('Statistics', 2, None, '___sec75'), - ('Statistics, central limit theorem', 2, None, '___sec76'), - ('Statistics, more technicalities', 2, None, '___sec77'), - ('Statistics', 2, None, '___sec78'), - ('Statistics and sample variance', 2, None, '___sec79'), - ('Statistics, uncorrelated results', 2, None, '___sec80'), - ('Statistics, computations', 2, None, '___sec81'), + '___sec71'), + ('Statistics, law of large numbers', 2, None, '___sec72'), + ('Statistics, more on sample error', 2, None, '___sec73'), + ('Statistics', 2, None, '___sec74'), + ('Statistics, central limit theorem', 2, None, '___sec75'), + ('Statistics, more technicalities', 2, None, '___sec76'), + ('Statistics', 2, None, '___sec77'), + ('Statistics and sample variance', 2, None, '___sec78'), + ('Statistics, uncorrelated results', 2, None, '___sec79'), + ('Statistics, computations', 2, None, '___sec80'), ('Statistics, more on computations of errors', 2, None, - '___sec82'), - ('Statistics, wrapping up 1', 2, None, '___sec83'), - ('Statistics, final expression', 2, None, '___sec84'), + '___sec81'), + ('Statistics, wrapping up 1', 2, None, '___sec82'), + ('Statistics, final expression', 2, None, '___sec83'), ('Statistics, effective number of correlations', 2, None, - '___sec85'), + '___sec84'), ('Linking the regression analysis with a statistical ' 'interpretation', 2, None, - '___sec86'), - ('Assumptions made', 2, None, '___sec87'), - ('Expectation value and variance', 2, None, '___sec88'), + '___sec85'), + ('Assumptions made', 2, None, '___sec86'), + ('Expectation value and variance', 2, None, '___sec87'), ('Expectation value and variance for $\\boldsymbol{\\beta}$', 2, None, - '___sec89'), - ('Resampling methods', 2, None, '___sec90'), + '___sec88'), + ('Resampling methods', 2, None, '___sec89'), ('Resampling methods: Jackknife and Bootstrap', 2, None, - '___sec91'), - ('Resampling methods: Jackknife', 2, None, '___sec92'), - ('Jackknife code example', 2, None, '___sec93'), - ('Resampling methods: Bootstrap', 2, None, '___sec94'), - ('Resampling methods: Bootstrap background', 2, None, '___sec95'), + '___sec90'), + ('Resampling methods: Jackknife', 2, None, '___sec91'), + ('Jackknife code example', 2, None, '___sec92'), + ('Resampling methods: Bootstrap', 2, None, '___sec93'), + ('Resampling methods: Bootstrap background', 2, None, '___sec94'), ('Resampling methods: More Bootstrap background', 2, None, - '___sec96'), - ('Resampling methods: Bootstrap approach', 2, None, '___sec97'), - ('Resampling methods: Bootstrap steps', 2, None, '___sec98'), - ('Code example for the Bootstrap method', 2, None, '___sec99'), - ('Various steps in cross-validation', 2, None, '___sec100'), + '___sec95'), + ('Resampling methods: Bootstrap approach', 2, None, '___sec96'), + ('Resampling methods: Bootstrap steps', 2, None, '___sec97'), + ('Code example for the Bootstrap method', 2, None, '___sec98'), + ('Various steps in cross-validation', 2, None, '___sec99'), ('How to set up the cross-validation for Ridge and/or Lasso', 2, None, - '___sec101'), - ('Cross-validation in brief', 2, None, '___sec102'), + '___sec100'), + ('Cross-validation in brief', 2, None, '___sec101'), ('Code Example for Cross-validation and $k$-fold ' 'Cross-validation', 2, None, - '___sec103'), - ('The bias-variance tradeoff', 2, None, '___sec104'), - ('Example code for Bias-Variance tradeoff', 2, None, '___sec105'), - ('Understanding what happens', 2, None, '___sec106'), - ('Summing up', 2, None, '___sec107'), + '___sec102'), + ('The bias-variance tradeoff', 2, None, '___sec103'), + ('Example code for Bias-Variance tradeoff', 2, None, '___sec104'), + ('Understanding what happens', 2, None, '___sec105'), + ('Summing up', 2, None, '___sec106'), ("Another Example from Scikit-Learn's Repository", 2, None, - '___sec108'), + '___sec107'), ('More examples on bootstrap and cross-validation and errors', 2, None, - '___sec109'), + '___sec108'), ('The same example but now with cross-validation', 2, None, - '___sec110'), - ('Cross-validation with Ridge', 2, None, '___sec111'), - ('The Ising model', 2, None, '___sec112'), + '___sec109'), + ('Cross-validation with Ridge', 2, None, '___sec110'), + ('The Ising model', 2, None, '___sec111'), ('Reformulating the problem to suit regression', 2, None, - '___sec113'), - ('Linear regression', 2, None, '___sec114'), - ('Singular Value decomposition', 2, None, '___sec115'), - ('The one-dimensional Ising model', 2, None, '___sec116'), - ('Ridge regression', 2, None, '___sec117'), - ('LASSO regression', 2, None, '___sec118'), + '___sec112'), + ('Linear regression', 2, None, '___sec113'), + ('Singular Value decomposition', 2, None, '___sec114'), + ('The one-dimensional Ising model', 2, None, '___sec115'), + ('Ridge regression', 2, None, '___sec116'), + ('LASSO regression', 2, None, '___sec117'), ('Performance as function of the regularization parameter', 2, None, - '___sec119'), + '___sec118'), ('Finding the optimal value of $\\lambda$', 2, None, - '___sec120')]} + '___sec119')]} end of tocinfo --> @@ -348,89 +347,88 @@ MathJax.Hub.Config({
  • Fixing the singularity
  • Basic math of the SVD
  • The SVD, a Fantastic Algorithm
  • -
  • Another Example
  • -
  • Economy-size SVD
  • +
  • Economy-size SVD
  • +
  • Codes for the SVD
  • Mathematical Properties
  • Ridge and LASSO Regression
  • More on Ridge Regression
  • Interpreting the Ridge results
  • More interpretations
  • -
  • Codes for the SVD
  • -
  • A better understanding of regularization
  • -
  • Decomposing the OLS and Ridge expressions
  • -
  • Introducing the Covariance and Correlation functions
  • -
  • Correlation Function and Design/Feature Matrix
  • -
  • Covariance Matrix Examples
  • -
  • Correlation Matrix
  • -
  • Correlation Matrix with Pandas
  • -
  • Correlation Matrix with Pandas and the Franke function
  • -
  • Rewriting the Covariance and/or Correlation Matrix
  • -
  • Linking with 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} \)
  • -
  • Resampling methods
  • -
  • 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
  • -
  • Various steps in cross-validation
  • -
  • How to set up the cross-validation for Ridge and/or Lasso
  • -
  • Cross-validation in brief
  • -
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • -
  • The bias-variance tradeoff
  • -
  • Example code for Bias-Variance tradeoff
  • -
  • Understanding what happens
  • -
  • Summing up
  • -
  • Another Example from Scikit-Learn's Repository
  • -
  • More examples on bootstrap and cross-validation and errors
  • -
  • The same example but now with cross-validation
  • -
  • Cross-validation with Ridge
  • -
  • 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 \)
  • +
  • A better understanding of regularization
  • +
  • Decomposing the OLS and Ridge expressions
  • +
  • Introducing the Covariance and Correlation functions
  • +
  • Correlation Function and Design/Feature Matrix
  • +
  • Covariance Matrix Examples
  • +
  • Correlation Matrix
  • +
  • Correlation Matrix with Pandas
  • +
  • Correlation Matrix with Pandas and the Franke function
  • +
  • Rewriting the Covariance and/or Correlation Matrix
  • +
  • Linking with 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} \)
  • +
  • Resampling methods
  • +
  • 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
  • +
  • Various steps in cross-validation
  • +
  • How to set up the cross-validation for Ridge and/or Lasso
  • +
  • Cross-validation in brief
  • +
  • Code Example for Cross-validation and \( k \)-fold Cross-validation
  • +
  • The bias-variance tradeoff
  • +
  • Example code for Bias-Variance tradeoff
  • +
  • Understanding what happens
  • +
  • Summing up
  • +
  • Another Example from Scikit-Learn's Repository
  • +
  • More examples on bootstrap and cross-validation and errors
  • +
  • The same example but now with cross-validation
  • +
  • Cross-validation with Ridge
  • +
  • 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 \)
  • @@ -489,7 +487,7 @@ MathJax.Hub.Config({
  • 9
  • 10
  • ...
  • -
  • 122
  • +
  • 121
  • »
  • diff --git a/doc/pub/Regression/html/Regression-reveal.html b/doc/pub/Regression/html/Regression-reveal.html index 94984c17f..c56732be0 100644 --- a/doc/pub/Regression/html/Regression-reveal.html +++ b/doc/pub/Regression/html/Regression-reveal.html @@ -1683,7 +1683,7 @@ however not the be case in general and a standard matrix inversion algorithm based on say LU, QR or Cholesky decomposition may lead to singularities. We will see examples of this below.

    -There is however a way to partially circumvent this problem and also gain some insight about the ordinary least squares approach. +There is however a way to partially circumvent this problem and also gain some insights about the ordinary least squares approach, and later shrinkage methods like Ridge and Lasso regressions.

    This is given by the Singular Value Decomposition algorithm, perhaps @@ -1862,30 +1862,11 @@ $$

    with eigenvalues \( \sigma_1=2 \) and \( \sigma_2=0 \). The SVD exits always! - - - -

    -

    Another Example

    -Consider the following matrix which can be SVD decomposed as - -

     
    -$$ -\boldsymbol{X} = \frac{1}{15}\begin{bmatrix} 14 & 2\\ 4 & 22\\ 16 & 13\end{bmatrix}=\frac{1}{3}\begin{bmatrix} 1& 2 & 2 \\ 2& -1 & 1\\ 2 & 1& -2\end{bmatrix} \begin{bmatrix} 2& 0 \\ 0& 1\\ 0 & 0\end{bmatrix}\frac{1}{5}\begin{bmatrix} 3& 4 \\ 4& -3\end{bmatrix}=\boldsymbol{U}\boldsymbol{\Sigma}\boldsymbol{V}^T. -$$ -

     
    - -

    -This is a \( 3\times 2 \) matrix which is decomposed in terms of a -\( 3\times 3 \) matrix \( \boldsymbol{U} \), and a \( 2\times 2 \) matrix \( \boldsymbol{V} \). It is easy to see -that \( \boldsymbol{U} \) and \( \boldsymbol{V} \) are orthogonal (how?). - -

    -And the SVD +The SVD decomposition (singular values) gives eigenvalues -\( \sigma_i\geq\sigma_{i+1} \) for all \( i \) and for dimensions larger than \( i=2 \), the +\( \sigma_i\geq\sigma_{i+1} \) for all \( i \) and for dimensions larger than \( i=p \), the eigenvalues (singular values) are zero.

    @@ -1906,7 +1887,7 @@ The columns of \( \boldsymbol{U} \) are called the left singular vectors while t

    -

    Economy-size SVD

    +

    Economy-size SVD

    If we assume that \( n > p \), then our matrix \( \boldsymbol{U} \) has dimension \( n @@ -1930,6 +1911,57 @@ In general the economy-size SVD leads to less FLOPS and still conserving the des

    +
    +

    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('test U')
    +#    print( (np.transpose(U) @ U - U @np.transpose(U)))
    +#    print('test VT')
    +#    print( (np.transpose(VT) @ VT - VT @np.transpose(VT)))
    +    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 first +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. +

    + +

    Mathematical Properties

    @@ -2207,58 +2239,7 @@ Similarly, Mehta et a
    -

    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('test U')
    -#    print( (np.transpose(U) @ U - U @np.transpose(U)))
    -#    print('test VT')
    -#    print( (np.transpose(VT) @ VT - VT @np.transpose(VT)))
    -    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 first -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. -

    - - -
    -

    A better understanding of regularization

    +

    A better understanding of regularization

    The parameter \( \lambda \) that we have introduced in the Ridge (and @@ -2277,7 +2258,7 @@ affected by changing the parameter \( \lambda \).

    -

    Decomposing the OLS and Ridge expressions

    +

    Decomposing the OLS and Ridge expressions

    We have our design matrix @@ -2299,7 +2280,7 @@ The matrices \( \boldsymbol{U} \) and \( \boldsymbol{V} \) are unitary/orthonorm

    -

    Introducing the Covariance and Correlation functions

    +

    Introducing the Covariance and Correlation functions

    Before we discuss the link between for example Ridge regression and the singular value decomposition, we need to remind ourselves about @@ -2372,7 +2353,7 @@ In the above example this is the function we constructed using pandas.

    -

    Correlation Function and Design/Feature Matrix

    +

    Correlation Function and Design/Feature Matrix

    In our derivation of the various regression algorithms like Ordinary Least Squares or Ridge regression @@ -2443,7 +2424,7 @@ $$

    -

    Covariance Matrix Examples

    +

    Covariance Matrix Examples

    The Numpy function np.cov calculates the covariance elements using @@ -2489,7 +2470,7 @@ C = np.cov(W)

    -

    Correlation Matrix

    +

    Correlation Matrix

    The previous example can be converted into the correlation matrix by @@ -2534,7 +2515,7 @@ The above procedure with numpy can be made more compact if we use pand

    -

    Correlation Matrix with Pandas

    +

    Correlation Matrix with Pandas

    We whow here how we can set up the correlation matrix using pandas, as done in this simple code @@ -2561,7 +2542,7 @@ We expand this model to the Franke function discussed above.

    -

    Correlation Matrix with Pandas and the Franke function

    +

    Correlation Matrix with Pandas and the Franke function

    @@ -2624,7 +2605,7 @@ matrix without these elements.

    -

    Rewriting the Covariance and/or Correlation Matrix

    +

    Rewriting the Covariance and/or Correlation Matrix

    We can rewrite the covariance matrix in a more compact form in terms of the design/feature matrix \( \boldsymbol{X} \) as @@ -2677,7 +2658,7 @@ It is easy to generalize this to a matrix \( \boldsymbol{X}\in {\mathbb{R}}^{n\t

    -

    Linking with SVD

    +

    Linking with SVD

    See lecture september 11. More text to be added here soon. @@ -2685,7 +2666,7 @@ See lecture september 11. More text to be added here soon.

    -

    Where are we going?

    +

    Where are we going?

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

    -

    Resampling methods

    +

    Resampling methods

    @@ -2736,7 +2717,7 @@ cross-validation and the bootstrap method.

    -

    Resampling approaches can be computationally expensive

    +

    Resampling approaches can be computationally expensive

    @@ -2762,7 +2743,7 @@ bootstrap is widely used.

    -

    Why resampling methods ?

    +

    Why resampling methods ?

    Statistical analysis.