diff --git a/doc/pub/Regression/html/._Regression-bs000.html b/doc/pub/Regression/html/._Regression-bs000.html index 8fe63757f..f6d791827 100644 --- a/doc/pub/Regression/html/._Regression-bs000.html +++ b/doc/pub/Regression/html/._Regression-bs000.html @@ -46,20 +46,33 @@ Automatically generated HTML file from DocOnce source 2, None, '___sec2'), - ('Generalizing the fitting procedure as a linear algebra problem', + ('Rewriting the fitting procedure as a linear algebra problem, follows', 2, None, '___sec3'), - ('Optimizing our parameters', 2, None, '___sec4'), - ('Interpretations and optimizing our parameters', + ('Generalizing the fitting procedure as a linear algebra problem', + 2, + None, + '___sec4'), + ('Generalizing the fitting procedure as a linear algebra problem', 2, None, '___sec5'), + ('Optimizing our parameters', 2, None, '___sec6'), + ('Optimizing our parameters, more details', 2, None, '___sec7'), ('Interpretations and optimizing our parameters', 2, None, - '___sec6'), - ('The singular value decompostion', 2, None, '___sec7')]} + '___sec8'), + ('Interpretations and optimizing our parameters', + 2, + None, + '___sec9'), + ('Interpretations and optimizing our parameters', + 2, + None, + '___sec10'), + ('The singular value decompostion', 2, None, '___sec11')]} end of tocinfo --> @@ -74,8 +87,8 @@ MathJax.Hub.Config({ } }); - @@ -100,11 +113,15 @@ MathJax.Hub.Config({
  • Regression analysis, overarching aims
  • General linear models
  • Rewriting the fitting procedure as a linear algebra problem
  • -
  • Generalizing the fitting procedure as a linear algebra problem
  • -
  • Optimizing our parameters
  • -
  • Interpretations and optimizing our parameters
  • -
  • Interpretations and optimizing our parameters
  • -
  • The singular value decompostion
  • +
  • Rewriting the fitting procedure as a linear algebra problem, follows
  • +
  • Generalizing the fitting procedure as a linear algebra problem
  • +
  • Generalizing the fitting procedure as a linear algebra problem
  • +
  • Optimizing our parameters
  • +
  • Optimizing our parameters, more details
  • +
  • Interpretations and optimizing our parameters
  • +
  • Interpretations and optimizing our parameters
  • +
  • Interpretations and optimizing our parameters
  • +
  • The singular value decompostion
  • @@ -139,7 +156,7 @@ MathJax.Hub.Config({
    [2] Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

    -

    Oct 17, 2017

    +

    Oct 18, 2017


    @@ -161,6 +178,9 @@ MathJax.Hub.Config({

  • 7
  • 8
  • 9
  • +
  • 10
  • +
  • ...
  • +
  • 13
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs001.html b/doc/pub/Regression/html/._Regression-bs001.html index 015065be7..a643b5a5d 100644 --- a/doc/pub/Regression/html/._Regression-bs001.html +++ b/doc/pub/Regression/html/._Regression-bs001.html @@ -46,20 +46,33 @@ Automatically generated HTML file from DocOnce source 2, None, '___sec2'), - ('Generalizing the fitting procedure as a linear algebra problem', + ('Rewriting the fitting procedure as a linear algebra problem, follows', 2, None, '___sec3'), - ('Optimizing our parameters', 2, None, '___sec4'), - ('Interpretations and optimizing our parameters', + ('Generalizing the fitting procedure as a linear algebra problem', + 2, + None, + '___sec4'), + ('Generalizing the fitting procedure as a linear algebra problem', 2, None, '___sec5'), + ('Optimizing our parameters', 2, None, '___sec6'), + ('Optimizing our parameters, more details', 2, None, '___sec7'), ('Interpretations and optimizing our parameters', 2, None, - '___sec6'), - ('The singular value decompostion', 2, None, '___sec7')]} + '___sec8'), + ('Interpretations and optimizing our parameters', + 2, + None, + '___sec9'), + ('Interpretations and optimizing our parameters', + 2, + None, + '___sec10'), + ('The singular value decompostion', 2, None, '___sec11')]} end of tocinfo --> @@ -74,8 +87,8 @@ MathJax.Hub.Config({ } }); - @@ -100,11 +113,15 @@ MathJax.Hub.Config({
  • Regression analysis, overarching aims
  • General linear models
  • Rewriting the fitting procedure as a linear algebra problem
  • -
  • Generalizing the fitting procedure as a linear algebra problem
  • -
  • Optimizing our parameters
  • -
  • Interpretations and optimizing our parameters
  • -
  • Interpretations and optimizing our parameters
  • -
  • The singular value decompostion
  • +
  • Rewriting the fitting procedure as a linear algebra problem, follows
  • +
  • Generalizing the fitting procedure as a linear algebra problem
  • +
  • Generalizing the fitting procedure as a linear algebra problem
  • +
  • Optimizing our parameters
  • +
  • Optimizing our parameters, more details
  • +
  • Interpretations and optimizing our parameters
  • +
  • Interpretations and optimizing our parameters
  • +
  • Interpretations and optimizing our parameters
  • +
  • The singular value decompostion
  • @@ -157,6 +174,10 @@ A regression model aims at finding a likelihood function \( p(y\vert \hat{x}) \)
  • 7
  • 8
  • 9
  • +
  • 10
  • +
  • 11
  • +
  • ...
  • +
  • 13
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs002.html b/doc/pub/Regression/html/._Regression-bs002.html index dc5b9a453..4eedbb6db 100644 --- a/doc/pub/Regression/html/._Regression-bs002.html +++ b/doc/pub/Regression/html/._Regression-bs002.html @@ -46,20 +46,33 @@ Automatically generated HTML file from DocOnce source 2, None, '___sec2'), - ('Generalizing the fitting procedure as a linear algebra problem', + ('Rewriting the fitting procedure as a linear algebra problem, follows', 2, None, '___sec3'), - ('Optimizing our parameters', 2, None, '___sec4'), - ('Interpretations and optimizing our parameters', + ('Generalizing the fitting procedure as a linear algebra problem', + 2, + None, + '___sec4'), + ('Generalizing the fitting procedure as a linear algebra problem', 2, None, '___sec5'), + ('Optimizing our parameters', 2, None, '___sec6'), + ('Optimizing our parameters, more details', 2, None, '___sec7'), ('Interpretations and optimizing our parameters', 2, None, - '___sec6'), - ('The singular value decompostion', 2, None, '___sec7')]} + '___sec8'), + ('Interpretations and optimizing our parameters', + 2, + None, + '___sec9'), + ('Interpretations and optimizing our parameters', + 2, + None, + '___sec10'), + ('The singular value decompostion', 2, None, '___sec11')]} end of tocinfo --> @@ -74,8 +87,8 @@ MathJax.Hub.Config({ } }); - @@ -100,11 +113,15 @@ MathJax.Hub.Config({
  • Regression analysis, overarching aims
  • General linear models
  • Rewriting the fitting procedure as a linear algebra problem
  • -
  • Generalizing the fitting procedure as a linear algebra problem
  • -
  • Optimizing our parameters
  • -
  • Interpretations and optimizing our parameters
  • -
  • Interpretations and optimizing our parameters
  • -
  • The singular value decompostion
  • +
  • Rewriting the fitting procedure as a linear algebra problem, follows
  • +
  • Generalizing the fitting procedure as a linear algebra problem
  • +
  • Generalizing the fitting procedure as a linear algebra problem
  • +
  • Optimizing our parameters
  • +
  • Optimizing our parameters, more details
  • +
  • Interpretations and optimizing our parameters
  • +
  • Interpretations and optimizing our parameters
  • +
  • Interpretations and optimizing our parameters
  • +
  • The singular value decompostion
  • @@ -138,6 +155,8 @@ where \( \epsilon_i \) is the error in our approximation. + +

    diff --git a/doc/pub/Regression/html/._Regression-bs003.html b/doc/pub/Regression/html/._Regression-bs003.html index ece0da280..387b742ac 100644 --- a/doc/pub/Regression/html/._Regression-bs003.html +++ b/doc/pub/Regression/html/._Regression-bs003.html @@ -46,20 +46,33 @@ Automatically generated HTML file from DocOnce source 2, None, '___sec2'), - ('Generalizing the fitting procedure as a linear algebra problem', + ('Rewriting the fitting procedure as a linear algebra problem, follows', 2, None, '___sec3'), - ('Optimizing our parameters', 2, None, '___sec4'), - ('Interpretations and optimizing our parameters', + ('Generalizing the fitting procedure as a linear algebra problem', + 2, + None, + '___sec4'), + ('Generalizing the fitting procedure as a linear algebra problem', 2, None, '___sec5'), + ('Optimizing our parameters', 2, None, '___sec6'), + ('Optimizing our parameters, more details', 2, None, '___sec7'), ('Interpretations and optimizing our parameters', 2, None, - '___sec6'), - ('The singular value decompostion', 2, None, '___sec7')]} + '___sec8'), + ('Interpretations and optimizing our parameters', + 2, + None, + '___sec9'), + ('Interpretations and optimizing our parameters', + 2, + None, + '___sec10'), + ('The singular value decompostion', 2, None, '___sec11')]} end of tocinfo --> @@ -74,8 +87,8 @@ MathJax.Hub.Config({ } }); - @@ -100,11 +113,15 @@ MathJax.Hub.Config({
  • Regression analysis, overarching aims
  • General linear models
  • Rewriting the fitting procedure as a linear algebra problem
  • -
  • Generalizing the fitting procedure as a linear algebra problem
  • -
  • Optimizing our parameters
  • -
  • Interpretations and optimizing our parameters
  • -
  • Interpretations and optimizing our parameters
  • -
  • The singular value decompostion
  • +
  • Rewriting the fitting procedure as a linear algebra problem, follows
  • +
  • Generalizing the fitting procedure as a linear algebra problem
  • +
  • Generalizing the fitting procedure as a linear algebra problem
  • +
  • Optimizing our parameters
  • +
  • Optimizing our parameters, more details
  • +
  • Interpretations and optimizing our parameters
  • +
  • Interpretations and optimizing our parameters
  • +
  • Interpretations and optimizing our parameters
  • +
  • The singular value decompostion
  • @@ -134,36 +151,6 @@ y_2&=\beta_0+\beta_1x_2^1+\beta_2x_2^2+\dots+\beta_{n-1}x_2^{n-1}+\epsilon_2\\ y_{n-1}&=\beta_0+\beta_1x_{n-1}^1+\beta_2x_{n-1}^2+\dots+\beta_1x_{n-1}^{n-1}+\epsilon_{n-1}.\\ \end{align*} $$ - -Defining the vectors -$$ -\hat{y} = [y_0,y_1, y_2,\dots, y_{n-1}]^T, -$$ - -$$ -\hat{\beta} = [\beta_0,\beta_1, \beta_2,\dots, \beta_{n-1}]^T, -$$ - -$$ -\hat{\epsilon} = [\epsilon_0,\epsilon_1, \epsilon_2,\dots, \epsilon_{n-1}]^T, -$$ - -and the matrix -$$ -\hat{X}= -\begin{bmatrix} -1& x_{0}^1 &x_{0}^2& \dots & \dots &x_{0}^{n-1}\\ -1& x_{1}^1 &x_{1}^2& \dots & \dots &x_{1}^{n-1}\\ -1& x_{2}^1 &x_{2}^2& \dots & \dots &x_{2}^{n-1}\\ -\dots& \dots &\dots& \dots & \dots &\dots\\ -1& x_{n-1}^1 &x_{n-1}^2& \dots & \dots &x_{n-1}^{n-1}\\ -\end{bmatrix} -$$ - -we can rewrite our equations as -$$ -\hat{y} = \hat{X}\hat{\beta}+\hat{\epsilon}. -$$ @@ -182,6 +169,10 @@ $$
  • 7
  • 8
  • 9
  • +
  • 10
  • +
  • 11
  • +
  • 12
  • +
  • 13
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs004.html b/doc/pub/Regression/html/._Regression-bs004.html index 4404cc416..0972e1cf3 100644 --- a/doc/pub/Regression/html/._Regression-bs004.html +++ b/doc/pub/Regression/html/._Regression-bs004.html @@ -46,20 +46,33 @@ Automatically generated HTML file from DocOnce source 2, None, '___sec2'), - ('Generalizing the fitting procedure as a linear algebra problem', + ('Rewriting the fitting procedure as a linear algebra problem, follows', 2, None, '___sec3'), - ('Optimizing our parameters', 2, None, '___sec4'), - ('Interpretations and optimizing our parameters', + ('Generalizing the fitting procedure as a linear algebra problem', + 2, + None, + '___sec4'), + ('Generalizing the fitting procedure as a linear algebra problem', 2, None, '___sec5'), + ('Optimizing our parameters', 2, None, '___sec6'), + ('Optimizing our parameters, more details', 2, None, '___sec7'), ('Interpretations and optimizing our parameters', 2, None, - '___sec6'), - ('The singular value decompostion', 2, None, '___sec7')]} + '___sec8'), + ('Interpretations and optimizing our parameters', + 2, + None, + '___sec9'), + ('Interpretations and optimizing our parameters', + 2, + None, + '___sec10'), + ('The singular value decompostion', 2, None, '___sec11')]} end of tocinfo --> @@ -74,8 +87,8 @@ MathJax.Hub.Config({ } }); - @@ -100,11 +113,15 @@ MathJax.Hub.Config({
  • Regression analysis, overarching aims
  • General linear models
  • Rewriting the fitting procedure as a linear algebra problem
  • -
  • Generalizing the fitting procedure as a linear algebra problem
  • -
  • Optimizing our parameters
  • -
  • Interpretations and optimizing our parameters
  • -
  • Interpretations and optimizing our parameters
  • -
  • The singular value decompostion
  • +
  • Rewriting the fitting procedure as a linear algebra problem, follows
  • +
  • Generalizing the fitting procedure as a linear algebra problem
  • +
  • Generalizing the fitting procedure as a linear algebra problem
  • +
  • Optimizing our parameters
  • +
  • Optimizing our parameters, more details
  • +
  • Interpretations and optimizing our parameters
  • +
  • Interpretations and optimizing our parameters
  • +
  • Interpretations and optimizing our parameters
  • +
  • The singular value decompostion
  • @@ -120,42 +137,39 @@ MathJax.Hub.Config({ -

    Generalizing the fitting procedure as a linear algebra problem

    +

    Rewriting the fitting procedure as a linear algebra problem, follows

    -We are obviously not limited to the above polynomial. We could replace the various powers of \( x \) with elements of Fourier series, that is, instead of \( x_i^j \) we could have \( \cos{(j x_i)} \) or \( \sin{(j x_i)} \), or time series or other orthogonal functions. -For every set of values \( y_i,x_i \) we can then generalize the equations to +Defining the vectors $$ -\begin{align*} -y_0&=\beta_0x_{00}+\beta_1x_{01}+\beta_2x_{02}+\dots+\beta_{n-1}x_{0n-1}+\epsilon_0\\ -y_1&=\beta_0x_{10}+\beta_1x_{11}+\beta_2x_{12}+\dots+\beta_{n-1}x_{1n-1}+\epsilon_1\\ -y_2&=\beta_0x_{20}+\beta_1x_{21}+\beta_2x_{22}+\dots+\beta_{n-1}x_{2n-1}+\epsilon_2\\ -\dots & \dots \\ -y_{i}&=\beta_0x_{i0}+\beta_1x_{i1}+\beta_2x_{i2}+\dots+\beta_{n-1}x_{in-1}+\epsilon_i\\ -\dots & \dots \\ -y_{n-1}&=\beta_0x_{n-1,0}+\beta_1x_{n-1,2}+\beta_2x_{n-1,2}+\dots+\beta_1x_{n-1}^{n-1,n-1}+\epsilon_{n-1}.\\ -\end{align*} +\hat{y} = [y_0,y_1, y_2,\dots, y_{n-1}]^T, $$ -We redefine in turn the matrix \( \hat{X} \) as +$$ +\hat{\beta} = [\beta_0,\beta_1, \beta_2,\dots, \beta_{n-1}]^T, +$$ + +$$ +\hat{\epsilon} = [\epsilon_0,\epsilon_1, \epsilon_2,\dots, \epsilon_{n-1}]^T, +$$ + +and the matrix $$ \hat{X}= \begin{bmatrix} -x_{00}& x_{01} &x_{02}& \dots & \dots &x_{0,n-1}\\ -x_{10}& x_{11} &x_{12}& \dots & \dots &x_{1,n-1}\\ -x_{20}& x_{21}^1 &x_{22}2& \dots & \dots &x_{2,n-1}\\ +1& x_{0}^1 &x_{0}^2& \dots & \dots &x_{0}^{n-1}\\ +1& x_{1}^1 &x_{1}^2& \dots & \dots &x_{1}^{n-1}\\ +1& x_{2}^1 &x_{2}^2& \dots & \dots &x_{2}^{n-1}\\ \dots& \dots &\dots& \dots & \dots &\dots\\ -x_{n-1,00}& x_{n-1,1} &x_{n-1,2}& \dots & \dots &x_{n-1,n-1}\\ +1& x_{n-1}^1 &x_{n-1}^2& \dots & \dots &x_{n-1}^{n-1}\\ \end{bmatrix} $$ -and without loss of generality we rewrite again our equations as +we can rewrite our equations as $$ \hat{y} = \hat{X}\hat{\beta}+\hat{\epsilon}. $$ - -The left-hand side of this equation forms know. Our error vector \( \hat{\epsilon} \) and the parameter vector \( \hat{\beta} \) are our unknow quantities. How can we obtain the optimal set of \( \beta_i \) values?

    @@ -174,6 +188,10 @@ The left-hand side of this equation forms know. Our error vector \( \hat{\epsilo
  • 7
  • 8
  • 9
  • +
  • 10
  • +
  • 11
  • +
  • 12
  • +
  • 13
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs005.html b/doc/pub/Regression/html/._Regression-bs005.html index a611e211b..33ad4ece8 100644 --- a/doc/pub/Regression/html/._Regression-bs005.html +++ b/doc/pub/Regression/html/._Regression-bs005.html @@ -46,20 +46,33 @@ Automatically generated HTML file from DocOnce source 2, None, '___sec2'), - ('Generalizing the fitting procedure as a linear algebra problem', + ('Rewriting the fitting procedure as a linear algebra problem, follows', 2, None, '___sec3'), - ('Optimizing our parameters', 2, None, '___sec4'), - ('Interpretations and optimizing our parameters', + ('Generalizing the fitting procedure as a linear algebra problem', + 2, + None, + '___sec4'), + ('Generalizing the fitting procedure as a linear algebra problem', 2, None, '___sec5'), + ('Optimizing our parameters', 2, None, '___sec6'), + ('Optimizing our parameters, more details', 2, None, '___sec7'), ('Interpretations and optimizing our parameters', 2, None, - '___sec6'), - ('The singular value decompostion', 2, None, '___sec7')]} + '___sec8'), + ('Interpretations and optimizing our parameters', + 2, + None, + '___sec9'), + ('Interpretations and optimizing our parameters', + 2, + None, + '___sec10'), + ('The singular value decompostion', 2, None, '___sec11')]} end of tocinfo --> @@ -74,8 +87,8 @@ MathJax.Hub.Config({ } }); - @@ -100,11 +113,15 @@ MathJax.Hub.Config({
  • Regression analysis, overarching aims
  • General linear models
  • Rewriting the fitting procedure as a linear algebra problem
  • -
  • Generalizing the fitting procedure as a linear algebra problem
  • -
  • Optimizing our parameters
  • -
  • Interpretations and optimizing our parameters
  • -
  • Interpretations and optimizing our parameters
  • -
  • The singular value decompostion
  • +
  • Rewriting the fitting procedure as a linear algebra problem, follows
  • +
  • Generalizing the fitting procedure as a linear algebra problem
  • +
  • Generalizing the fitting procedure as a linear algebra problem
  • +
  • Optimizing our parameters
  • +
  • Optimizing our parameters, more details
  • +
  • Interpretations and optimizing our parameters
  • +
  • Interpretations and optimizing our parameters
  • +
  • Interpretations and optimizing our parameters
  • +
  • The singular value decompostion
  • @@ -120,37 +137,23 @@ MathJax.Hub.Config({ -

    Optimizing our parameters

    +

    Generalizing the fitting procedure as a linear algebra problem

    -We have defined the matrix \( \hat{X} \) +We are obviously not limited to the above polynomial. We could replace the various powers of \( x \) with elements of Fourier series, that is, instead of \( x_i^j \) we could have \( \cos{(j x_i)} \) or \( \sin{(j x_i)} \), or time series or other orthogonal functions. +For every set of values \( y_i,x_i \) we can then generalize the equations to $$ \begin{align*} y_0&=\beta_0x_{00}+\beta_1x_{01}+\beta_2x_{02}+\dots+\beta_{n-1}x_{0n-1}+\epsilon_0\\ y_1&=\beta_0x_{10}+\beta_1x_{11}+\beta_2x_{12}+\dots+\beta_{n-1}x_{1n-1}+\epsilon_1\\ -y_2&=\beta_0x_{20}+\beta_1x_{21}+\beta_2x_{22}+\dots+\beta_{n-1}x_{2n-1}+\epsilon_1\\ +y_2&=\beta_0x_{20}+\beta_1x_{21}+\beta_2x_{22}+\dots+\beta_{n-1}x_{2n-1}+\epsilon_2\\ \dots & \dots \\ -y_{i}&=\beta_0x_{i0}+\beta_1x_{i1}+\beta_2x_{i2}+\dots+\beta_{n-1}x_{in-1}+\epsilon_1\\ +y_{i}&=\beta_0x_{i0}+\beta_1x_{i1}+\beta_2x_{i2}+\dots+\beta_{n-1}x_{in-1}+\epsilon_i\\ \dots & \dots \\ -y_{n-1}&=\beta_0x_{n-1,0}+\beta_1x_{n-1,2}+\beta_2x_{n-1,2}+\dots+\beta_1x_{n-1,n-1}+\epsilon_{n-1}.\\ +y_{n-1}&=\beta_0x_{n-1,0}+\beta_1x_{n-1,2}+\beta_2x_{n-1,2}+\dots+\beta_1x_{n-1}^{n-1,n-1}+\epsilon_{n-1}.\\ \end{align*} $$ - -We well use this matrix to define the approximation \( \hat{\tilde{y}} \) via the unknown quantity \( \hat{\beta} \) as -$$ -\hat{\tilde{y}}= \hat{X}\hat{\beta}, -$$ - -and in order to find the optimal parameters \( \beta_i \) instead of solving the above linear algebra problem, we define a function which gives a measure of the spread between the values \( y_i \) (which represent hopefully the exact values) and the parametrized values \( \tilde{y}_i \), namely -$$ -Q(\hat{\beta})=\sum_{i=0}^{n-1}\left(y_i-\tilde{y}_i\right)^2=\left(\hat{y}-\hat{\tilde{y}}\right)^T\left(\hat{y}-\hat{\tilde{y}}\right), -$$ - -or using the matrix \( \hat{X} \) as -$$ -Q(\hat{\beta})=\left(\hat{y}-\hat{X}\hat{\beta}\right)^T\left(\hat{y}-\hat{X}\hat{\beta}\right). -$$

    @@ -169,6 +172,10 @@ $$
  • 7
  • 8
  • 9
  • +
  • 10
  • +
  • 11
  • +
  • 12
  • +
  • 13
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs006.html b/doc/pub/Regression/html/._Regression-bs006.html index 0d9c134c3..b9a9bfd29 100644 --- a/doc/pub/Regression/html/._Regression-bs006.html +++ b/doc/pub/Regression/html/._Regression-bs006.html @@ -46,20 +46,33 @@ Automatically generated HTML file from DocOnce source 2, None, '___sec2'), - ('Generalizing the fitting procedure as a linear algebra problem', + ('Rewriting the fitting procedure as a linear algebra problem, follows', 2, None, '___sec3'), - ('Optimizing our parameters', 2, None, '___sec4'), - ('Interpretations and optimizing our parameters', + ('Generalizing the fitting procedure as a linear algebra problem', + 2, + None, + '___sec4'), + ('Generalizing the fitting procedure as a linear algebra problem', 2, None, '___sec5'), + ('Optimizing our parameters', 2, None, '___sec6'), + ('Optimizing our parameters, more details', 2, None, '___sec7'), ('Interpretations and optimizing our parameters', 2, None, - '___sec6'), - ('The singular value decompostion', 2, None, '___sec7')]} + '___sec8'), + ('Interpretations and optimizing our parameters', + 2, + None, + '___sec9'), + ('Interpretations and optimizing our parameters', + 2, + None, + '___sec10'), + ('The singular value decompostion', 2, None, '___sec11')]} end of tocinfo --> @@ -74,8 +87,8 @@ MathJax.Hub.Config({ } }); - @@ -100,11 +113,15 @@ MathJax.Hub.Config({
  • Regression analysis, overarching aims
  • General linear models
  • Rewriting the fitting procedure as a linear algebra problem
  • -
  • Generalizing the fitting procedure as a linear algebra problem
  • -
  • Optimizing our parameters
  • -
  • Interpretations and optimizing our parameters
  • -
  • Interpretations and optimizing our parameters
  • -
  • The singular value decompostion
  • +
  • Rewriting the fitting procedure as a linear algebra problem, follows
  • +
  • Generalizing the fitting procedure as a linear algebra problem
  • +
  • Generalizing the fitting procedure as a linear algebra problem
  • +
  • Optimizing our parameters
  • +
  • Optimizing our parameters, more details
  • +
  • Interpretations and optimizing our parameters
  • +
  • Interpretations and optimizing our parameters
  • +
  • Interpretations and optimizing our parameters
  • +
  • The singular value decompostion
  • @@ -120,39 +137,28 @@ MathJax.Hub.Config({ -

    Interpretations and optimizing our parameters

    +

    Generalizing the fitting procedure as a linear algebra problem

    -The function +We redefine in turn the matrix \( \hat{X} \) as $$ -Q(\hat{\beta})=\left(\hat{y}-\hat{X}\hat{\beta}\right)^T\left(\hat{y}-\hat{X}\hat{\beta}\right), +\hat{X}= +\begin{bmatrix} +x_{00}& x_{01} &x_{02}& \dots & \dots &x_{0,n-1}\\ +x_{10}& x_{11} &x_{12}& \dots & \dots &x_{1,n-1}\\ +x_{20}& x_{21}^1 &x_{22}2& \dots & \dots &x_{2,n-1}\\ +\dots& \dots &\dots& \dots & \dots &\dots\\ +x_{n-1,00}& x_{n-1,1} &x_{n-1,2}& \dots & \dots &x_{n-1,n-1}\\ +\end{bmatrix} $$ -can be linked to the variance of the quantity \( y_i \) if we interpret the latter as the mean value of for example a numerical experiment. When linking below with the maximum likelihood approach below, we will indeed interpret \( y_i \) as a mean value +and without loss of generality we rewrite again our equations as $$ -y_{i}=\langle y_i \rangle = \beta_0x_{i,0}+\beta_1x_{i,1}+\beta_2x_{i,2}+\dots+\beta_{n-1}x_{i,n-1}+\epsilon_i, +\hat{y} = \hat{X}\hat{\beta}+\hat{\epsilon}. $$ -where \( \langle y_i \rangle \) is the mean value. Keep in mind also that till now we have treated \( y_i \) as the exact value. Normally, the response (dependent or outcome) variable \( y_i \) the outcome of a numerical experiment or another type of experiment and is thus only an approximation to the true value. It is then always accompanied by an error estimate, often limited to a statistical error estimate given by the standard deviation discussed earlier. In the discussion here we will treat \( y_i \) as our exact value for the response variable. - -

    -In order to find the parameters \( \beta_i \) we will then minimize the spread of \( Q(\hat{\beta}) \) by requiring -$$ -\frac{\partial Q(\hat{\beta})}{\partial \beta_j} = \frac{\partial }{\partial \beta_j}\left[ \sum_{i=0}^{n-1}\left(y_i-\beta_0x_{i,0}+\beta_1x_{i,1}+\beta_2x_{i,2}+\dots+\beta_{n-1}x_{i,n-1}\right)^2\right]=0, -$$ - -which results in -$$ -\frac{\partial Q(\hat{\beta})}{\partial \beta_j} = -2\left[ \sum_{i=0}^{n-1}x_{ij}\left(y_i-\beta_0x_{i,0}+\beta_1x_{i,1}+\beta_2x_{i,2}+\dots+\beta_{n-1}x_{i,n-1}\right)\right]=0, -$$ - -or in a matrix-vector form as -$$ -\frac{\partial Q(\hat{\beta})}{\partial \hat{\beta}} = 0 = \hat{X}^T\left( \hat{y}-\hat{X}\hat{\beta}\right). -$$ - -

    +The left-hand side of this equation forms know. Our error vector \( \hat{\epsilon} \) and the parameter vector \( \hat{\beta} \) are our unknow quantities. How can we obtain the optimal set of \( \beta_i \) values?

    @@ -171,6 +177,10 @@ $$
  • 7
  • 8
  • 9
  • +
  • 10
  • +
  • 11
  • +
  • 12
  • +
  • 13
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs007.html b/doc/pub/Regression/html/._Regression-bs007.html index d03826bef..385e48a2e 100644 --- a/doc/pub/Regression/html/._Regression-bs007.html +++ b/doc/pub/Regression/html/._Regression-bs007.html @@ -46,20 +46,33 @@ Automatically generated HTML file from DocOnce source 2, None, '___sec2'), - ('Generalizing the fitting procedure as a linear algebra problem', + ('Rewriting the fitting procedure as a linear algebra problem, follows', 2, None, '___sec3'), - ('Optimizing our parameters', 2, None, '___sec4'), - ('Interpretations and optimizing our parameters', + ('Generalizing the fitting procedure as a linear algebra problem', + 2, + None, + '___sec4'), + ('Generalizing the fitting procedure as a linear algebra problem', 2, None, '___sec5'), + ('Optimizing our parameters', 2, None, '___sec6'), + ('Optimizing our parameters, more details', 2, None, '___sec7'), ('Interpretations and optimizing our parameters', 2, None, - '___sec6'), - ('The singular value decompostion', 2, None, '___sec7')]} + '___sec8'), + ('Interpretations and optimizing our parameters', + 2, + None, + '___sec9'), + ('Interpretations and optimizing our parameters', + 2, + None, + '___sec10'), + ('The singular value decompostion', 2, None, '___sec11')]} end of tocinfo --> @@ -74,8 +87,8 @@ MathJax.Hub.Config({ } }); - @@ -100,11 +113,15 @@ MathJax.Hub.Config({
  • Regression analysis, overarching aims
  • General linear models
  • Rewriting the fitting procedure as a linear algebra problem
  • -
  • Generalizing the fitting procedure as a linear algebra problem
  • -
  • Optimizing our parameters
  • -
  • Interpretations and optimizing our parameters
  • -
  • Interpretations and optimizing our parameters
  • -
  • The singular value decompostion
  • +
  • Rewriting the fitting procedure as a linear algebra problem, follows
  • +
  • Generalizing the fitting procedure as a linear algebra problem
  • +
  • Generalizing the fitting procedure as a linear algebra problem
  • +
  • Optimizing our parameters
  • +
  • Optimizing our parameters, more details
  • +
  • Interpretations and optimizing our parameters
  • +
  • Interpretations and optimizing our parameters
  • +
  • Interpretations and optimizing our parameters
  • +
  • The singular value decompostion
  • @@ -120,43 +137,22 @@ MathJax.Hub.Config({ -

    Interpretations and optimizing our parameters

    +

    Optimizing our parameters

    -We can rewrite +We have defined the matrix \( \hat{X} \) $$ -\frac{\partial Q(\hat{\beta})}{\partial \hat{\beta}} = 0 = \hat{X}^T\left( \hat{y}-\hat{X}\hat{\beta}\right), +\begin{align*} +y_0&=\beta_0x_{00}+\beta_1x_{01}+\beta_2x_{02}+\dots+\beta_{n-1}x_{0n-1}+\epsilon_0\\ +y_1&=\beta_0x_{10}+\beta_1x_{11}+\beta_2x_{12}+\dots+\beta_{n-1}x_{1n-1}+\epsilon_1\\ +y_2&=\beta_0x_{20}+\beta_1x_{21}+\beta_2x_{22}+\dots+\beta_{n-1}x_{2n-1}+\epsilon_1\\ +\dots & \dots \\ +y_{i}&=\beta_0x_{i0}+\beta_1x_{i1}+\beta_2x_{i2}+\dots+\beta_{n-1}x_{in-1}+\epsilon_1\\ +\dots & \dots \\ +y_{n-1}&=\beta_0x_{n-1,0}+\beta_1x_{n-1,2}+\beta_2x_{n-1,2}+\dots+\beta_1x_{n-1,n-1}+\epsilon_{n-1}.\\ +\end{align*} $$ - -as -$$ -\hat{X}^T\hat{y} = \hat{X}^T\hat{X}\hat{\beta}, -$$ - -and if the matrix \( \hat{X}^T\hat{X} \) is invertible we have the solution -$$ -\hat{\beta} =\left(\hat{X}^T\hat{X}\right)^{-1}\hat{X}^T\hat{y}. -$$ - -The residuals \( \hat{\epsilon} \) are in turn given by -$$ -\hat{\epsilon} = \hat{y}-\hat{\tilde{y}} = \hat{y}-\hat{X}\hat{\beta}, -$$ - -and with -$$ -\hat{X}^T\left( \hat{y}-\hat{X}\hat{\beta}\right)= 0, -$$ - -we have -$$ -\hat{X}^T\hat{\epsilon}=\hat{X}^T\left( \hat{y}-\hat{X}\hat{\beta}\right)= 0, -$$ - -meaning that the solution for \( \hat{\beta} \) is the one which minimizes the residuals. Later we will link this with the maximum likelihood approach. - -

    @@ -175,6 +171,10 @@ meaning that the solution for \( \hat{\beta} \) is the one which minimizes the r
  • 7
  • 8
  • 9
  • +
  • 10
  • +
  • 11
  • +
  • 12
  • +
  • 13
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs008.html b/doc/pub/Regression/html/._Regression-bs008.html index aeda2f187..7f5eb964c 100644 --- a/doc/pub/Regression/html/._Regression-bs008.html +++ b/doc/pub/Regression/html/._Regression-bs008.html @@ -46,20 +46,33 @@ Automatically generated HTML file from DocOnce source 2, None, '___sec2'), - ('Generalizing the fitting procedure as a linear algebra problem', + ('Rewriting the fitting procedure as a linear algebra problem, follows', 2, None, '___sec3'), - ('Optimizing our parameters', 2, None, '___sec4'), - ('Interpretations and optimizing our parameters', + ('Generalizing the fitting procedure as a linear algebra problem', + 2, + None, + '___sec4'), + ('Generalizing the fitting procedure as a linear algebra problem', 2, None, '___sec5'), + ('Optimizing our parameters', 2, None, '___sec6'), + ('Optimizing our parameters, more details', 2, None, '___sec7'), ('Interpretations and optimizing our parameters', 2, None, - '___sec6'), - ('The singular value decompostion', 2, None, '___sec7')]} + '___sec8'), + ('Interpretations and optimizing our parameters', + 2, + None, + '___sec9'), + ('Interpretations and optimizing our parameters', + 2, + None, + '___sec10'), + ('The singular value decompostion', 2, None, '___sec11')]} end of tocinfo --> @@ -74,8 +87,8 @@ MathJax.Hub.Config({ } }); - @@ -100,11 +113,15 @@ MathJax.Hub.Config({
  • Regression analysis, overarching aims
  • General linear models
  • Rewriting the fitting procedure as a linear algebra problem
  • -
  • Generalizing the fitting procedure as a linear algebra problem
  • -
  • Optimizing our parameters
  • -
  • Interpretations and optimizing our parameters
  • -
  • Interpretations and optimizing our parameters
  • -
  • The singular value decompostion
  • +
  • Rewriting the fitting procedure as a linear algebra problem, follows
  • +
  • Generalizing the fitting procedure as a linear algebra problem
  • +
  • Generalizing the fitting procedure as a linear algebra problem
  • +
  • Optimizing our parameters
  • +
  • Optimizing our parameters, more details
  • +
  • Interpretations and optimizing our parameters
  • +
  • Interpretations and optimizing our parameters
  • +
  • Interpretations and optimizing our parameters
  • +
  • The singular value decompostion
  • @@ -120,17 +137,29 @@ MathJax.Hub.Config({ -

    The singular value decompostion

    +

    Optimizing our parameters, more details

    -Here we derive the equations for the SVD. +We well use this matrix to define the approximation \( \hat{\tilde{y}} \) via the unknown quantity \( \hat{\beta} \) as +$$ +\hat{\tilde{y}}= \hat{X}\hat{\beta}, +$$ + +and in order to find the optimal parameters \( \beta_i \) instead of solving the above linear algebra problem, we define a function which gives a measure of the spread between the values \( y_i \) (which represent hopefully the exact values) and the parametrized values \( \tilde{y}_i \), namely +$$ +Q(\hat{\beta})=\sum_{i=0}^{n-1}\left(y_i-\tilde{y}_i\right)^2=\left(\hat{y}-\hat{\tilde{y}}\right)^T\left(\hat{y}-\hat{\tilde{y}}\right), +$$ + +or using the matrix \( \hat{X} \) as +$$ +Q(\hat{\beta})=\left(\hat{y}-\hat{X}\hat{\beta}\right)^T\left(\hat{y}-\hat{X}\hat{\beta}\right). +$$

    -

    diff --git a/doc/pub/Regression/html/._Regression-bs009.html b/doc/pub/Regression/html/._Regression-bs009.html new file mode 100644 index 000000000..8ef81bf1f --- /dev/null +++ b/doc/pub/Regression/html/._Regression-bs009.html @@ -0,0 +1,219 @@ + + + + + + + +Data Analysis and Machine Learning: Linear Regression and more Advanced Regression Analysis + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

     

     

     

    + + + + +

    Interpretations and optimizing our parameters

    +
    +
    +

    +The function +$$ +Q(\hat{\beta})=\left(\hat{y}-\hat{X}\hat{\beta}\right)^T\left(\hat{y}-\hat{X}\hat{\beta}\right), +$$ + +can be linked to the variance of the quantity \( y_i \) if we interpret the latter as the mean value of for example a numerical experiment. When linking below with the maximum likelihood approach below, we will indeed interpret \( y_i \) as a mean value +$$ +y_{i}=\langle y_i \rangle = \beta_0x_{i,0}+\beta_1x_{i,1}+\beta_2x_{i,2}+\dots+\beta_{n-1}x_{i,n-1}+\epsilon_i, +$$ + +where \( \langle y_i \rangle \) is the mean value. Keep in mind also that till now we have treated \( y_i \) as the exact value. Normally, the response (dependent or outcome) variable \( y_i \) the outcome of a numerical experiment or another type of experiment and is thus only an approximation to the true value. It is then always accompanied by an error estimate, often limited to a statistical error estimate given by the standard deviation discussed earlier. In the discussion here we will treat \( y_i \) as our exact value for the response variable. + +

    +In order to find the parameters \( \beta_i \) we will then minimize the spread of \( Q(\hat{\beta}) \) by requiring +$$ +\frac{\partial Q(\hat{\beta})}{\partial \beta_j} = \frac{\partial }{\partial \beta_j}\left[ \sum_{i=0}^{n-1}\left(y_i-\beta_0x_{i,0}+\beta_1x_{i,1}+\beta_2x_{i,2}+\dots+\beta_{n-1}x_{i,n-1}\right)^2\right]=0, +$$ + +which results in +$$ +\frac{\partial Q(\hat{\beta})}{\partial \beta_j} = -2\left[ \sum_{i=0}^{n-1}x_{ij}\left(y_i-\beta_0x_{i,0}+\beta_1x_{i,1}+\beta_2x_{i,2}+\dots+\beta_{n-1}x_{i,n-1}\right)\right]=0, +$$ + +or in a matrix-vector form as +$$ +\frac{\partial Q(\hat{\beta})}{\partial \hat{\beta}} = 0 = \hat{X}^T\left( \hat{y}-\hat{X}\hat{\beta}\right). +$$ + +

    +

    +
    + + +

    +

    + +

    + + +
    + + + + + + + +
    + +
    + + + + + + diff --git a/doc/pub/Regression/html/._Regression-bs010.html b/doc/pub/Regression/html/._Regression-bs010.html new file mode 100644 index 000000000..69a8a9421 --- /dev/null +++ b/doc/pub/Regression/html/._Regression-bs010.html @@ -0,0 +1,206 @@ + + + + + + + +Data Analysis and Machine Learning: Linear Regression and more Advanced Regression Analysis + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

     

     

     

    + + + + +

    Interpretations and optimizing our parameters

    +
    +
    +

    +We can rewrite +$$ +\frac{\partial Q(\hat{\beta})}{\partial \hat{\beta}} = 0 = \hat{X}^T\left( \hat{y}-\hat{X}\hat{\beta}\right), +$$ + +as +$$ +\hat{X}^T\hat{y} = \hat{X}^T\hat{X}\hat{\beta}, +$$ + +and if the matrix \( \hat{X}^T\hat{X} \) is invertible we have the solution +$$ +\hat{\beta} =\left(\hat{X}^T\hat{X}\right)^{-1}\hat{X}^T\hat{y}. +$$ + +

    +

    +
    + + +

    +

    + +

    + + +
    + + + + + + + +
    + +
    + + + + + + diff --git a/doc/pub/Regression/html/._Regression-bs011.html b/doc/pub/Regression/html/._Regression-bs011.html new file mode 100644 index 000000000..aea195600 --- /dev/null +++ b/doc/pub/Regression/html/._Regression-bs011.html @@ -0,0 +1,207 @@ + + + + + + + +Data Analysis and Machine Learning: Linear Regression and more Advanced Regression Analysis + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

     

     

     

    + + + + +

    Interpretations and optimizing our parameters

    +
    +
    +

    +The residuals \( \hat{\epsilon} \) are in turn given by +$$ +\hat{\epsilon} = \hat{y}-\hat{\tilde{y}} = \hat{y}-\hat{X}\hat{\beta}, +$$ + +and with +$$ +\hat{X}^T\left( \hat{y}-\hat{X}\hat{\beta}\right)= 0, +$$ + +we have +$$ +\hat{X}^T\hat{\epsilon}=\hat{X}^T\left( \hat{y}-\hat{X}\hat{\beta}\right)= 0, +$$ + +meaning that the solution for \( \hat{\beta} \) is the one which minimizes the residuals. Later we will link this with the maximum likelihood approach. + +

    +

    +
    + + +

    +

    + +

    + + +
    + + + + + + + +
    + +
    + + + + + + diff --git a/doc/pub/Regression/html/._Regression-bs012.html b/doc/pub/Regression/html/._Regression-bs012.html new file mode 100644 index 000000000..86235fbd5 --- /dev/null +++ b/doc/pub/Regression/html/._Regression-bs012.html @@ -0,0 +1,192 @@ + + + + + + + +Data Analysis and Machine Learning: Linear Regression and more Advanced Regression Analysis + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

     

     

     

    + + + + +

    The singular value decompostion

    +
    +
    +

    +How can we use the singular value decomposition to find the parameters \( \beta_j \)? More details will come. We first note that a general \( m\times n \) matrix \( \hat{A} \) can be written in terms of a diagonal matrix \( \hat{\Sigma} \) of dimensionality \( n\times n \) and two orthognal matrices \( \hat{U} \) and \( \hat{V} \), where the first has dimensionality \( m \times n \) and the last dimensionality \( n\times n \). We have then +$$ +\hat{A} = \hat{U}\hat{\Sigma}\hat{V} +$$ +

    +
    + + +

    + +

    + +

    + + +
    + + + + + + + +
    + +
    + + + + + + diff --git a/doc/pub/Regression/html/Regression-bs.html b/doc/pub/Regression/html/Regression-bs.html index 8fe63757f..f6d791827 100644 --- a/doc/pub/Regression/html/Regression-bs.html +++ b/doc/pub/Regression/html/Regression-bs.html @@ -46,20 +46,33 @@ Automatically generated HTML file from DocOnce source 2, None, '___sec2'), - ('Generalizing the fitting procedure as a linear algebra problem', + ('Rewriting the fitting procedure as a linear algebra problem, follows', 2, None, '___sec3'), - ('Optimizing our parameters', 2, None, '___sec4'), - ('Interpretations and optimizing our parameters', + ('Generalizing the fitting procedure as a linear algebra problem', + 2, + None, + '___sec4'), + ('Generalizing the fitting procedure as a linear algebra problem', 2, None, '___sec5'), + ('Optimizing our parameters', 2, None, '___sec6'), + ('Optimizing our parameters, more details', 2, None, '___sec7'), ('Interpretations and optimizing our parameters', 2, None, - '___sec6'), - ('The singular value decompostion', 2, None, '___sec7')]} + '___sec8'), + ('Interpretations and optimizing our parameters', + 2, + None, + '___sec9'), + ('Interpretations and optimizing our parameters', + 2, + None, + '___sec10'), + ('The singular value decompostion', 2, None, '___sec11')]} end of tocinfo --> @@ -74,8 +87,8 @@ MathJax.Hub.Config({ } }); - @@ -100,11 +113,15 @@ MathJax.Hub.Config({
  • Regression analysis, overarching aims
  • General linear models
  • Rewriting the fitting procedure as a linear algebra problem
  • -
  • Generalizing the fitting procedure as a linear algebra problem
  • -
  • Optimizing our parameters
  • -
  • Interpretations and optimizing our parameters
  • -
  • Interpretations and optimizing our parameters
  • -
  • The singular value decompostion
  • +
  • Rewriting the fitting procedure as a linear algebra problem, follows
  • +
  • Generalizing the fitting procedure as a linear algebra problem
  • +
  • Generalizing the fitting procedure as a linear algebra problem
  • +
  • Optimizing our parameters
  • +
  • Optimizing our parameters, more details
  • +
  • Interpretations and optimizing our parameters
  • +
  • Interpretations and optimizing our parameters
  • +
  • Interpretations and optimizing our parameters
  • +
  • The singular value decompostion
  • @@ -139,7 +156,7 @@ MathJax.Hub.Config({
    [2] Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

    -

    Oct 17, 2017

    +

    Oct 18, 2017


    @@ -161,6 +178,9 @@ MathJax.Hub.Config({

  • 7
  • 8
  • 9
  • +
  • 10
  • +
  • ...
  • +
  • 13
  • »
  • diff --git a/doc/pub/Regression/html/Regression-reveal.html b/doc/pub/Regression/html/Regression-reveal.html index ccf83a614..ba156b640 100644 --- a/doc/pub/Regression/html/Regression-reveal.html +++ b/doc/pub/Regression/html/Regression-reveal.html @@ -1,3 +1,4 @@ +\ @@ -116,8 +117,8 @@ MathJax.Hub.Config({ } }); - @@ -147,7 +148,7 @@ MathJax.Hub.Config({
    [2] Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

     
    -

    Oct 17, 2017

    +

    Oct 18, 2017


    @@ -219,7 +220,15 @@ y_{n-1}&=\beta_0+\beta_1x_{n-1}^1+\beta_2x_{n-1}^2+\dots+\beta_1x_{n-1}^{n-1}+\e \end{align*} $$

     
    + + + +

    +

    Rewriting the fitting procedure as a linear algebra problem, follows

    +
    + +

    Defining the vectors

     
    $$ @@ -264,7 +273,7 @@ $$

    -

    Generalizing the fitting procedure as a linear algebra problem

    +

    Generalizing the fitting procedure as a linear algebra problem

    @@ -283,7 +292,15 @@ y_{n-1}&=\beta_0x_{n-1,0}+\beta_1x_{n-1,2}+\beta_2x_{n-1,2}+\dots+\beta_1x_{n-1} \end{align*} $$

     
    +

    +
    + +
    +

    Generalizing the fitting procedure as a linear algebra problem

    +
    + +

    We redefine in turn the matrix \( \hat{X} \) as

     
    $$ @@ -311,7 +328,7 @@ The left-hand side of this equation forms know. Our error vector \( \hat{\epsilo

    -

    Optimizing our parameters

    +

    Optimizing our parameters

    @@ -329,7 +346,15 @@ y_{n-1}&=\beta_0x_{n-1,0}+\beta_1x_{n-1,2}+\beta_2x_{n-1,2}+\dots+\beta_1x_{n-1, \end{align*} $$

     
    +

    +
    + +
    +

    Optimizing our parameters, more details

    +
    + +

    We well use this matrix to define the approximation \( \hat{\tilde{y}} \) via the unknown quantity \( \hat{\beta} \) as

     
    $$ @@ -355,7 +380,7 @@ $$

    -

    Interpretations and optimizing our parameters

    +

    Interpretations and optimizing our parameters

    @@ -403,7 +428,7 @@ $$

    -

    Interpretations and optimizing our parameters

    +

    Interpretations and optimizing our parameters

    @@ -428,6 +453,16 @@ $$ $$

     
    + +

    +
    + + +
    +

    Interpretations and optimizing our parameters

    +
    + +

    The residuals \( \hat{\epsilon} \) are in turn given by

     
    $$ @@ -457,11 +492,16 @@ meaning that the solution for \( \hat{\beta} \) is the one which minimizes the r

    -

    The singular value decompostion

    +

    The singular value decompostion

    -Here we derive the equations for the SVD. +How can we use the singular value decomposition to find the parameters \( \beta_j \)? More details will come. We first note that a general \( m\times n \) matrix \( \hat{A} \) can be written in terms of a diagonal matrix \( \hat{\Sigma} \) of dimensionality \( n\times n \) and two orthognal matrices \( \hat{U} \) and \( \hat{V} \), where the first has dimensionality \( m \times n \) and the last dimensionality \( n\times n \). We have then +

     
    +$$ +\hat{A} = \hat{U}\hat{\Sigma}\hat{V} +$$ +

     

    diff --git a/doc/pub/Regression/html/Regression-solarized.html b/doc/pub/Regression/html/Regression-solarized.html index 1bf399f0a..65fb3c572 100644 --- a/doc/pub/Regression/html/Regression-solarized.html +++ b/doc/pub/Regression/html/Regression-solarized.html @@ -66,20 +66,33 @@ div { text-align: justify; text-justify: inter-word; } 2, None, '___sec2'), - ('Generalizing the fitting procedure as a linear algebra problem', + ('Rewriting the fitting procedure as a linear algebra problem, follows', 2, None, '___sec3'), - ('Optimizing our parameters', 2, None, '___sec4'), - ('Interpretations and optimizing our parameters', + ('Generalizing the fitting procedure as a linear algebra problem', + 2, + None, + '___sec4'), + ('Generalizing the fitting procedure as a linear algebra problem', 2, None, '___sec5'), + ('Optimizing our parameters', 2, None, '___sec6'), + ('Optimizing our parameters, more details', 2, None, '___sec7'), ('Interpretations and optimizing our parameters', 2, None, - '___sec6'), - ('The singular value decompostion', 2, None, '___sec7')]} + '___sec8'), + ('Interpretations and optimizing our parameters', + 2, + None, + '___sec9'), + ('Interpretations and optimizing our parameters', + 2, + None, + '___sec10'), + ('The singular value decompostion', 2, None, '___sec11')]} end of tocinfo --> @@ -94,8 +107,8 @@ MathJax.Hub.Config({ } }); - @@ -121,7 +134,7 @@ MathJax.Hub.Config({
    [2] Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

    -

    Oct 17, 2017

    +

    Oct 18, 2017












    @@ -168,6 +181,8 @@ where \( \epsilon_i \) is the error in our approximation.

    + +











    Rewriting the fitting procedure as a linear algebra problem

    @@ -184,7 +199,16 @@ y_2&=\beta_0+\beta_1x_2^1+\beta_2x_2^2+\dots+\beta_{n-1}x_2^{n-1}+\epsilon_2\\ y_{n-1}&=\beta_0+\beta_1x_{n-1}^1+\beta_2x_{n-1}^2+\dots+\beta_1x_{n-1}^{n-1}+\epsilon_{n-1}.\\ \end{align*} $$ +
    + +

    +









    + +

    Rewriting the fitting procedure as a linear algebra problem, follows

    +
    + +

    Defining the vectors $$ \hat{y} = [y_0,y_1, y_2,\dots, y_{n-1}]^T, @@ -220,7 +244,7 @@ $$











    -

    Generalizing the fitting procedure as a linear algebra problem

    +

    Generalizing the fitting procedure as a linear algebra problem

    @@ -237,7 +261,16 @@ y_{i}&=\beta_0x_{i0}+\beta_1x_{i1}+\beta_2x_{i2}+\dots+\beta_{n-1}x_{in-1}+\epsi y_{n-1}&=\beta_0x_{n-1,0}+\beta_1x_{n-1,2}+\beta_2x_{n-1,2}+\dots+\beta_1x_{n-1}^{n-1,n-1}+\epsilon_{n-1}.\\ \end{align*} $$ +

    + +

    +









    + +

    Generalizing the fitting procedure as a linear algebra problem

    +
    + +

    We redefine in turn the matrix \( \hat{X} \) as $$ \hat{X}= @@ -262,7 +295,7 @@ The left-hand side of this equation forms know. Our error vector \( \hat{\epsilo











    -

    Optimizing our parameters

    +

    Optimizing our parameters

    @@ -278,7 +311,16 @@ y_{i}&=\beta_0x_{i0}+\beta_1x_{i1}+\beta_2x_{i2}+\dots+\beta_{n-1}x_{in-1}+\epsi y_{n-1}&=\beta_0x_{n-1,0}+\beta_1x_{n-1,2}+\beta_2x_{n-1,2}+\dots+\beta_1x_{n-1,n-1}+\epsilon_{n-1}.\\ \end{align*} $$ +

    + +

    +









    + +

    Optimizing our parameters, more details

    +
    + +

    We well use this matrix to define the approximation \( \hat{\tilde{y}} \) via the unknown quantity \( \hat{\beta} \) as $$ \hat{\tilde{y}}= \hat{X}\hat{\beta}, @@ -299,7 +341,7 @@ $$











    -

    Interpretations and optimizing our parameters

    +

    Interpretations and optimizing our parameters

    @@ -338,7 +380,7 @@ $$











    -

    Interpretations and optimizing our parameters

    +

    Interpretations and optimizing our parameters

    @@ -357,6 +399,17 @@ $$ \hat{\beta} =\left(\hat{X}^T\hat{X}\right)^{-1}\hat{X}^T\hat{y}. $$ + +

    + + +

    +









    + +

    Interpretations and optimizing our parameters

    +
    + +

    The residuals \( \hat{\epsilon} \) are in turn given by $$ \hat{\epsilon} = \hat{y}-\hat{\tilde{y}} = \hat{y}-\hat{X}\hat{\beta}, @@ -381,11 +434,14 @@ meaning that the solution for \( \hat{\beta} \) is the one which minimizes the r











    -

    The singular value decompostion

    +

    The singular value decompostion

    -Here we derive the equations for the SVD. +How can we use the singular value decomposition to find the parameters \( \beta_j \)? More details will come. We first note that a general \( m\times n \) matrix \( \hat{A} \) can be written in terms of a diagonal matrix \( \hat{\Sigma} \) of dimensionality \( n\times n \) and two orthognal matrices \( \hat{U} \) and \( \hat{V} \), where the first has dimensionality \( m \times n \) and the last dimensionality \( n\times n \). We have then +$$ +\hat{A} = \hat{U}\hat{\Sigma}\hat{V} +$$

    diff --git a/doc/pub/Regression/html/Regression.html b/doc/pub/Regression/html/Regression.html index 8c775ba7f..d961dadb4 100644 --- a/doc/pub/Regression/html/Regression.html +++ b/doc/pub/Regression/html/Regression.html @@ -71,20 +71,33 @@ div { text-align: justify; text-justify: inter-word; } 2, None, '___sec2'), - ('Generalizing the fitting procedure as a linear algebra problem', + ('Rewriting the fitting procedure as a linear algebra problem, follows', 2, None, '___sec3'), - ('Optimizing our parameters', 2, None, '___sec4'), - ('Interpretations and optimizing our parameters', + ('Generalizing the fitting procedure as a linear algebra problem', + 2, + None, + '___sec4'), + ('Generalizing the fitting procedure as a linear algebra problem', 2, None, '___sec5'), + ('Optimizing our parameters', 2, None, '___sec6'), + ('Optimizing our parameters, more details', 2, None, '___sec7'), ('Interpretations and optimizing our parameters', 2, None, - '___sec6'), - ('The singular value decompostion', 2, None, '___sec7')]} + '___sec8'), + ('Interpretations and optimizing our parameters', + 2, + None, + '___sec9'), + ('Interpretations and optimizing our parameters', + 2, + None, + '___sec10'), + ('The singular value decompostion', 2, None, '___sec11')]} end of tocinfo --> @@ -99,8 +112,8 @@ MathJax.Hub.Config({ } }); - @@ -126,7 +139,7 @@ MathJax.Hub.Config({
    [2] Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

    -

    Oct 17, 2017

    +

    Oct 18, 2017












    @@ -173,6 +186,8 @@ where \( \epsilon_i \) is the error in our approximation.

    + +











    Rewriting the fitting procedure as a linear algebra problem

    @@ -189,7 +204,16 @@ y_2&=\beta_0+\beta_1x_2^1+\beta_2x_2^2+\dots+\beta_{n-1}x_2^{n-1}+\epsilon_2\\ y_{n-1}&=\beta_0+\beta_1x_{n-1}^1+\beta_2x_{n-1}^2+\dots+\beta_1x_{n-1}^{n-1}+\epsilon_{n-1}.\\ \end{align*} $$ +
    + +

    +









    + +

    Rewriting the fitting procedure as a linear algebra problem, follows

    +
    + +

    Defining the vectors $$ \hat{y} = [y_0,y_1, y_2,\dots, y_{n-1}]^T, @@ -225,7 +249,7 @@ $$











    -

    Generalizing the fitting procedure as a linear algebra problem

    +

    Generalizing the fitting procedure as a linear algebra problem

    @@ -242,7 +266,16 @@ y_{i}&=\beta_0x_{i0}+\beta_1x_{i1}+\beta_2x_{i2}+\dots+\beta_{n-1}x_{in-1}+\epsi y_{n-1}&=\beta_0x_{n-1,0}+\beta_1x_{n-1,2}+\beta_2x_{n-1,2}+\dots+\beta_1x_{n-1}^{n-1,n-1}+\epsilon_{n-1}.\\ \end{align*} $$ +

    + +

    +









    + +

    Generalizing the fitting procedure as a linear algebra problem

    +
    + +

    We redefine in turn the matrix \( \hat{X} \) as $$ \hat{X}= @@ -267,7 +300,7 @@ The left-hand side of this equation forms know. Our error vector \( \hat{\epsilo











    -

    Optimizing our parameters

    +

    Optimizing our parameters

    @@ -283,7 +316,16 @@ y_{i}&=\beta_0x_{i0}+\beta_1x_{i1}+\beta_2x_{i2}+\dots+\beta_{n-1}x_{in-1}+\epsi y_{n-1}&=\beta_0x_{n-1,0}+\beta_1x_{n-1,2}+\beta_2x_{n-1,2}+\dots+\beta_1x_{n-1,n-1}+\epsilon_{n-1}.\\ \end{align*} $$ +

    + +

    +









    + +

    Optimizing our parameters, more details

    +
    + +

    We well use this matrix to define the approximation \( \hat{\tilde{y}} \) via the unknown quantity \( \hat{\beta} \) as $$ \hat{\tilde{y}}= \hat{X}\hat{\beta}, @@ -304,7 +346,7 @@ $$











    -

    Interpretations and optimizing our parameters

    +

    Interpretations and optimizing our parameters

    @@ -343,7 +385,7 @@ $$











    -

    Interpretations and optimizing our parameters

    +

    Interpretations and optimizing our parameters

    @@ -362,6 +404,17 @@ $$ \hat{\beta} =\left(\hat{X}^T\hat{X}\right)^{-1}\hat{X}^T\hat{y}. $$ + +

    + + +

    +









    + +

    Interpretations and optimizing our parameters

    +
    + +

    The residuals \( \hat{\epsilon} \) are in turn given by $$ \hat{\epsilon} = \hat{y}-\hat{\tilde{y}} = \hat{y}-\hat{X}\hat{\beta}, @@ -386,11 +439,14 @@ meaning that the solution for \( \hat{\beta} \) is the one which minimizes the r











    -

    The singular value decompostion

    +

    The singular value decompostion

    -Here we derive the equations for the SVD. +How can we use the singular value decomposition to find the parameters \( \beta_j \)? More details will come. We first note that a general \( m\times n \) matrix \( \hat{A} \) can be written in terms of a diagonal matrix \( \hat{\Sigma} \) of dimensionality \( n\times n \) and two orthognal matrices \( \hat{U} \) and \( \hat{V} \), where the first has dimensionality \( m \times n \) and the last dimensionality \( n\times n \). We have then +$$ +\hat{A} = \hat{U}\hat{\Sigma}\hat{V} +$$

    diff --git a/doc/pub/Regression/ipynb/ipynb-Regression-src.tar.gz b/doc/pub/Regression/ipynb/ipynb-Regression-src.tar.gz index ba6a46c27..715a2d7de 100644 Binary files a/doc/pub/Regression/ipynb/ipynb-Regression-src.tar.gz and b/doc/pub/Regression/ipynb/ipynb-Regression-src.tar.gz differ diff --git a/doc/pub/Regression/pdf/Regression-beamer-handouts2x3.pdf b/doc/pub/Regression/pdf/Regression-beamer-handouts2x3.pdf index b1b74a4c8..3f38065a4 100644 Binary files a/doc/pub/Regression/pdf/Regression-beamer-handouts2x3.pdf and b/doc/pub/Regression/pdf/Regression-beamer-handouts2x3.pdf differ diff --git a/doc/pub/Regression/pdf/Regression-beamer.pdf b/doc/pub/Regression/pdf/Regression-beamer.pdf index 2c1056dcf..39e3cc363 100644 Binary files a/doc/pub/Regression/pdf/Regression-beamer.pdf and b/doc/pub/Regression/pdf/Regression-beamer.pdf differ diff --git a/doc/pub/Regression/pdf/Regression-minted.pdf b/doc/pub/Regression/pdf/Regression-minted.pdf index a57fa60e1..1bd7aa950 100644 Binary files a/doc/pub/Regression/pdf/Regression-minted.pdf and b/doc/pub/Regression/pdf/Regression-minted.pdf differ diff --git a/doc/src/Regression/Regression.do.txt b/doc/src/Regression/Regression.do.txt index e3b4bf899..5df8e53a8 100644 --- a/doc/src/Regression/Regression.do.txt +++ b/doc/src/Regression/Regression.do.txt @@ -32,6 +32,8 @@ y=y(x) \rightarrow y(x_i)=\tilde{y}_i+\epsilon_i=\sum_{j=0}^{n-1} \beta_i x_i^j+ where $\epsilon_i$ is the error in our approximation. !eblock + + !split ===== Rewriting the fitting procedure as a linear algebra problem ===== !bblock @@ -45,6 +47,12 @@ y_2&=\beta_0+\beta_1x_2^1+\beta_2x_2^2+\dots+\beta_{n-1}x_2^{n-1}+\epsilon_2\\ y_{n-1}&=\beta_0+\beta_1x_{n-1}^1+\beta_2x_{n-1}^2+\dots+\beta_1x_{n-1}^{n-1}+\epsilon_{n-1}.\\ \end{align*} !et +!eblock + + +!split +===== Rewriting the fitting procedure as a linear algebra problem, follows ===== +!bblock Defining the vectors !bt \[ @@ -99,6 +107,12 @@ y_{i}&=\beta_0x_{i0}+\beta_1x_{i1}+\beta_2x_{i2}+\dots+\beta_{n-1}x_{in-1}+\epsi y_{n-1}&=\beta_0x_{n-1,0}+\beta_1x_{n-1,2}+\beta_2x_{n-1,2}+\dots+\beta_1x_{n-1}^{n-1,n-1}+\epsilon_{n-1}.\\ \end{align*} !et +!eblock + + +!split +===== Generalizing the fitting procedure as a linear algebra problem ===== +!bblock We redefine in turn the matrix $\hat{X}$ as !bt \[ @@ -137,6 +151,12 @@ y_{i}&=\beta_0x_{i0}+\beta_1x_{i1}+\beta_2x_{i2}+\dots+\beta_{n-1}x_{in-1}+\epsi y_{n-1}&=\beta_0x_{n-1,0}+\beta_1x_{n-1,2}+\beta_2x_{n-1,2}+\dots+\beta_1x_{n-1,n-1}+\epsilon_{n-1}.\\ \end{align*} !et +!eblock + + +!split +===== Optimizing our parameters, more details ===== +!bblock We well use this matrix to define the approximation $\hat{\tilde{y}}$ via the unknown quantity $\hat{\beta}$ as !bt \[ @@ -219,6 +239,12 @@ and if the matrix $\hat{X}^T\hat{X}$ is invertible we have the solution \hat{\beta} =\left(\hat{X}^T\hat{X}\right)^{-1}\hat{X}^T\hat{y}. \] !et + +!eblock + +!split +===== Interpretations and optimizing our parameters ===== +!bblock The residuals $\hat{\epsilon}$ are in turn given by !bt \[ @@ -242,10 +268,16 @@ meaning that the solution for $\hat{\beta}$ is the one which minimizes the resid !eblock + !split ===== The singular value decompostion ===== !bblock -Here we derive the equations for the SVD. +How can we use the singular value decomposition to find the parameters $\beta_j$? More details will come. We first note that a general $m\times n$ matrix $\hat{A}$ can be written in terms of a diagonal matrix $\hat{\Sigma}$ of dimensionality $n\times n$ and two orthognal matrices $\hat{U}$ and $\hat{V}$, where the first has dimensionality $m \times n$ and the last dimensionality $n\times n$. We have then +!bt +\[ +\hat{A} = \hat{U}\hat{\Sigma}\hat{V} +\] +!et !eblock