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({
-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} \).
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({
-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
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({
-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
+
+
+
+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.
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({
@@ -486,7 +501,7 @@ This will allow us to link the standard linear algebra methods we have discussed
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({
-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,
-
-
-- The bootstrap method
-- and Cross-Validation
-
-
-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.
+
+- 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
+- training error \( \mathrm{Err_{Train}} \), which is the average loss over the training data.
+
-
-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
-
-
-- 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
-- training error \( \mathrm{Err_{Train}} \), which is the average loss over the training data.
-
-
-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
+
+- The bootstrap is quite general, although there are some cases in which it fails.
+- 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.
+- It is possible to apply the bootstrap to statistics with sampling distributions that are difficult to derive, even asymptotically.
+- It is relatively simple to apply the bootstrap to complex data-collection plans (such as stratified and clustered samples).
+
+
+
-
# 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:
-
-
-- The bootstrap is quite general, although there are some cases in which it fails.
-- 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.
-- It is possible to apply the bootstrap to statistics with sampling distributions that are difficult to derive, even asymptotically.
-- It is relatively simple to apply the bootstrap to complex data-collection plans (such as stratified and clustered samples).
-
-
-
+
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:
+
+
+- Drawing lots of numbers from \( p(x) \), suppose we call one such set of numbers \( (X_1^*, X_2^*, \cdots, X_n^*) \).
+- Then using these numbers, we could compute a replica of \( \widehat{\theta} \) called \( \widehat{\theta}^* \).
+
+
+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.
-
-- Drawing lots of numbers from \( p(x) \), suppose we call one such set of numbers \( (X_1^*, X_2^*, \cdots, X_n^*) \).
-- Then using these numbers, we could compute a replica of \( \widehat{\theta} \) called \( \widehat{\theta}^* \).
-
-
-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} \).
+
+- Draw with replacement \( n \) numbers for the observed variables \( \boldsymbol{x} = (x_1,x_2,\cdots,x_n) \).
+- Define a vector \( \boldsymbol{x}^* \) containing the values which were drawn from \( \boldsymbol{x} \).
+- Using the vector \( \boldsymbol{x}^* \) compute \( \widehat{\theta}^* \) by evaluating \( \widehat \theta \) under the observations \( \boldsymbol{x}^* \).
+- Repeat this process \( k \) times.
+
+
+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.
-
-- Draw with replacement \( n \) numbers for the observed variables \( \boldsymbol{x} = (x_1,x_2,\cdots,x_n) \).
-- Define a vector \( \boldsymbol{x}^* \) containing the values which were drawn from \( \boldsymbol{x} \).
-- Using the vector \( \boldsymbol{x}^* \) compute \( \widehat{\theta}^* \) by evaluating \( \widehat \theta \) under the observations \( \boldsymbol{x}^* \).
-- Repeat this process \( k \) times.
-
+
-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 \)
+
+
+- shuffle the dataset randomly.
+- Split the dataset into \( k \) groups.
+- For each unique group:
+
+
+- Decide which group to use as set for test data
+- Take the remaining groups as a training data set
+- Fit a model on the training set and evaluate it on the test set
+- Retain the evaluation score and discard the model
+
+
+
Summarize the model using the sample of model evaluation scores
+
+
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.
+
-
-- shuffle the dataset randomly.
-- Split the dataset into \( k \) groups.
-- 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
-
-- Decide which group to use as set for test data
-- Take the remaining groups as a training data set
-- Fit a model on the training set and evaluate it on the test set
-- Retain the evaluation score and discard the model
-
+# A seed just to ensure that the random numbers are the same for every run.
+# Useful for eventual debugging.
+np.random.seed(3155)
-
- Summarize the model using the sample of model evaluation scores
-
+
# 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()
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({
+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).
-
-
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({
-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.
+
+
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({