fixing typos as usual

This commit is contained in:
mhjensen
2018-09-03 16:35:05 +02:00
parent 0e59757765
commit 6470c2d5f4
7 changed files with 10 additions and 31 deletions
+2 -7
View File
@@ -150,12 +150,7 @@ Compare and analyze your results with those from exercise 2. Study the dependenc
<ol>
<li> Repeat the above but using the functionality of <b>scikit-learn</b>. Compare your code with the results from <b>scikit-learn</b>. Remember to run with the same random numbers for generating \( x \) and \( y \).</li>
<li> Our next step is to study the variance of the parameters \( \beta_1 \) and \( \beta_2 \) (assuming that we are parametrizing our function with a second-order polynomial. We will use standard linear regression and the Ridge regression.</li>
</ol>
You can now opt for either writing your own function that calculates the variance of these paramaters (recall that this is equal to the diagonal elements of the matrix \( (\hat{X}^T\hat{X})^{-1}+\lambda\hat{I} \)) or use the functionality of <b>scikit-learn</b> and computetheir variances. Discuss the results of these variances as functions of \( \lambda \). In particular, try to link your discussion with the discussion in Hastie <em>et al.</em> and their figure 3.11.
<ol>
<li> Our next step is to study the variance of the parameters \( \beta_1 \) and \( \beta_2 \) (assuming that we are parametrizing our function with a second-order polynomial. We will use standard linear regression and the Ridge regression. You can now opt for either writing your own function that calculates the variance of these paramaters (recall that this is equal to the diagonal elements of the matrix \( (\hat{X}^T\hat{X})^{-1}+\lambda\hat{I} \)) or use the functionality of <b>scikit-learn</b> and computetheir variances. Discuss the results of these variances as functions of \( \lambda \). In particular, try to link your discussion with the discussion in Hastie <em>et al.</em> and their figure 3.11.</li>
<li> Repeat the previous step but add now the Lasso method, see equation (3.53) of Hastie <em>et al.</em>. Discuss your results and compare with standard regression and the Ridge regression results. You can write your own code or use the functionality of <b>scikit-learn</b>.</li>
<li> Finally, using <b>scikit-learn</b> or your own code, compute also the mean square error, a risk metric corresponding to the expected value of the squared (quadratic) error defined as</li>
</ol>
@@ -186,7 +181,7 @@ $$
\mathrm{Var}(\hat{z}_i)=\frac{d_i^2}{N},
$$
where \( d_i \) are the singular values of the matrix \( \hat{X} \). Give an interprepation of these results, in particular in connection with the variance of the coefficients you obtained in the previous exercise.
where \( d_i \) are the singular values of the matrix \( \hat{X} \). Give an interpretation of these results, in particular in connection with the variance of the coefficients you obtained in the previous exercise.
<p>
<!-- navigation buttons at the bottom of the page -->
+2 -7
View File
@@ -115,12 +115,7 @@ Compare and analyze your results with those from exercise 2. Study the dependenc
<ol>
<li> Repeat the above but using the functionality of <b>scikit-learn</b>. Compare your code with the results from <b>scikit-learn</b>. Remember to run with the same random numbers for generating \( x \) and \( y \).</li>
<li> Our next step is to study the variance of the parameters \( \beta_1 \) and \( \beta_2 \) (assuming that we are parametrizing our function with a second-order polynomial. We will use standard linear regression and the Ridge regression.</li>
</ol>
You can now opt for either writing your own function that calculates the variance of these paramaters (recall that this is equal to the diagonal elements of the matrix \( (\hat{X}^T\hat{X})^{-1}+\lambda\hat{I} \)) or use the functionality of <b>scikit-learn</b> and computetheir variances. Discuss the results of these variances as functions of \( \lambda \). In particular, try to link your discussion with the discussion in Hastie <em>et al.</em> and their figure 3.11.
<ol>
<li> Our next step is to study the variance of the parameters \( \beta_1 \) and \( \beta_2 \) (assuming that we are parametrizing our function with a second-order polynomial. We will use standard linear regression and the Ridge regression. You can now opt for either writing your own function that calculates the variance of these paramaters (recall that this is equal to the diagonal elements of the matrix \( (\hat{X}^T\hat{X})^{-1}+\lambda\hat{I} \)) or use the functionality of <b>scikit-learn</b> and computetheir variances. Discuss the results of these variances as functions of \( \lambda \). In particular, try to link your discussion with the discussion in Hastie <em>et al.</em> and their figure 3.11.</li>
<li> Repeat the previous step but add now the Lasso method, see equation (3.53) of Hastie <em>et al.</em>. Discuss your results and compare with standard regression and the Ridge regression results. You can write your own code or use the functionality of <b>scikit-learn</b>.</li>
<li> Finally, using <b>scikit-learn</b> or your own code, compute also the mean square error, a risk metric corresponding to the expected value of the squared (quadratic) error defined as</li>
</ol>
@@ -151,7 +146,7 @@ $$
\mathrm{Var}(\hat{z}_i)=\frac{d_i^2}{N},
$$
where \( d_i \) are the singular values of the matrix \( \hat{X} \). Give an interprepation of these results, in particular in connection with the variance of the coefficients you obtained in the previous exercise.
where \( d_i \) are the singular values of the matrix \( \hat{X} \). Give an interpretation of these results, in particular in connection with the variance of the coefficients you obtained in the previous exercise.
<!-- ------------------- end of main content --------------- -->
Binary file not shown.
+2 -7
View File
@@ -191,13 +191,8 @@ Compare and analyze your results with those from exercise 2. Study the dependenc
\begin{enumerate}
\item Repeat the above but using the functionality of \textbf{scikit-learn}. Compare your code with the results from \textbf{scikit-learn}. Remember to run with the same random numbers for generating $x$ and $y$.
\item Our next step is to study the variance of the parameters $\beta_1$ and $\beta_2$ (assuming that we are parametrizing our function with a second-order polynomial. We will use standard linear regression and the Ridge regression.
\end{enumerate}
\item Our next step is to study the variance of the parameters $\beta_1$ and $\beta_2$ (assuming that we are parametrizing our function with a second-order polynomial. We will use standard linear regression and the Ridge regression. You can now opt for either writing your own function that calculates the variance of these paramaters (recall that this is equal to the diagonal elements of the matrix $(\hat{X}^T\hat{X})^{-1}+\lambda\hat{I}$) or use the functionality of \textbf{scikit-learn} and computetheir variances. Discuss the results of these variances as functions of $\lambda$. In particular, try to link your discussion with the discussion in Hastie \emph{et al.} and their figure 3.11.
\noindent
You can now opt for either writing your own function that calculates the variance of these paramaters (recall that this is equal to the diagonal elements of the matrix $(\hat{X}^T\hat{X})^{-1}+\lambda\hat{I}$) or use the functionality of \textbf{scikit-learn} and computetheir variances. Discuss the results of these variances as functions of $\lambda$. In particular, try to link your discussion with the discussion in Hastie \emph{et al.} and their figure 3.11.
\begin{enumerate}
\item Repeat the previous step but add now the Lasso method, see equation (3.53) of Hastie \emph{et al.}. Discuss your results and compare with standard regression and the Ridge regression results. You can write your own code or use the functionality of \textbf{scikit-learn}.
\item Finally, using \textbf{scikit-learn} or your own code, compute also the mean square error, a risk metric corresponding to the expected value of the squared (quadratic) error defined as
@@ -225,7 +220,7 @@ $\hat{z}_i=\hat{X}\hat{v}_i$ is equal to (equation (3.49) of Hastie \emph{et a
\[
\mathrm{Var}(\hat{z}_i)=\frac{d_i^2}{N},
\]
where $d_i$ are the singular values of the matrix $\hat{X}$. Give an interprepation of these results, in particular in connection with the variance of the coefficients you obtained in the previous exercise.
where $d_i$ are the singular values of the matrix $\hat{X}$. Give an interpretation of these results, in particular in connection with the variance of the coefficients you obtained in the previous exercise.
% ------------------- end of main content ---------------
Binary file not shown.
+2 -7
View File
@@ -161,13 +161,8 @@ Compare and analyze your results with those from exercise 2. Study the dependenc
\begin{enumerate}
\item Repeat the above but using the functionality of \textbf{scikit-learn}. Compare your code with the results from \textbf{scikit-learn}. Remember to run with the same random numbers for generating $x$ and $y$.
\item Our next step is to study the variance of the parameters $\beta_1$ and $\beta_2$ (assuming that we are parametrizing our function with a second-order polynomial. We will use standard linear regression and the Ridge regression.
\end{enumerate}
\item Our next step is to study the variance of the parameters $\beta_1$ and $\beta_2$ (assuming that we are parametrizing our function with a second-order polynomial. We will use standard linear regression and the Ridge regression. You can now opt for either writing your own function that calculates the variance of these paramaters (recall that this is equal to the diagonal elements of the matrix $(\hat{X}^T\hat{X})^{-1}+\lambda\hat{I}$) or use the functionality of \textbf{scikit-learn} and computetheir variances. Discuss the results of these variances as functions of $\lambda$. In particular, try to link your discussion with the discussion in Hastie \emph{et al.} and their figure 3.11.
\noindent
You can now opt for either writing your own function that calculates the variance of these paramaters (recall that this is equal to the diagonal elements of the matrix $(\hat{X}^T\hat{X})^{-1}+\lambda\hat{I}$) or use the functionality of \textbf{scikit-learn} and computetheir variances. Discuss the results of these variances as functions of $\lambda$. In particular, try to link your discussion with the discussion in Hastie \emph{et al.} and their figure 3.11.
\begin{enumerate}
\item Repeat the previous step but add now the Lasso method, see equation (3.53) of Hastie \emph{et al.}. Discuss your results and compare with standard regression and the Ridge regression results. You can write your own code or use the functionality of \textbf{scikit-learn}.
\item Finally, using \textbf{scikit-learn} or your own code, compute also the mean square error, a risk metric corresponding to the expected value of the squared (quadratic) error defined as
@@ -195,7 +190,7 @@ $\hat{z}_i=\hat{X}\hat{v}_i$ is equal to (equation (3.49) of Hastie \emph{et a
\[
\mathrm{Var}(\hat{z}_i)=\frac{d_i^2}{N},
\]
where $d_i$ are the singular values of the matrix $\hat{X}$. Give an interprepation of these results, in particular in connection with the variance of the coefficients you obtained in the previous exercise.
where $d_i$ are the singular values of the matrix $\hat{X}$. Give an interpretation of these results, in particular in connection with the variance of the coefficients you obtained in the previous exercise.
% ------------------- end of main content ---------------
+2 -3
View File
@@ -27,8 +27,7 @@ Compare and analyze your results with those from exercise 2. Study the dependenc
o Repeat the above but using the functionality of _scikit-learn_. Compare your code with the results from _scikit-learn_. Remember to run with the same random numbers for generating $x$ and $y$.
o Our next step is to study the variance of the parameters $\beta_1$ and $\beta_2$ (assuming that we are parametrizing our function with a second-order polynomial. We will use standard linear regression and the Ridge regression.
You can now opt for either writing your own function that calculates the variance of these paramaters (recall that this is equal to the diagonal elements of the matrix $(\hat{X}^T\hat{X})^{-1}+\lambda\hat{I}$) or use the functionality of _scikit-learn_ and computetheir variances. Discuss the results of these variances as functions of $\lambda$. In particular, try to link your discussion with the discussion in Hastie *et al.* and their figure 3.11.
o Our next step is to study the variance of the parameters $\beta_1$ and $\beta_2$ (assuming that we are parametrizing our function with a second-order polynomial. We will use standard linear regression and the Ridge regression. You can now opt for either writing your own function that calculates the variance of these paramaters (recall that this is equal to the diagonal elements of the matrix $(\hat{X}^T\hat{X})^{-1}+\lambda\hat{I}$) or use the functionality of _scikit-learn_ and computetheir variances. Discuss the results of these variances as functions of $\lambda$. In particular, try to link your discussion with the discussion in Hastie *et al.* and their figure 3.11.
o Repeat the previous step but add now the Lasso method, see equation (3.53) of Hastie *et al.*. Discuss your results and compare with standard regression and the Ridge regression results. You can write your own code or use the functionality of _scikit-learn_.
@@ -62,4 +61,4 @@ $\hat{z}_i=\hat{X}\hat{v}_i$ is equal to (equation (3.49) of Hastie *et al.*)
\mathrm{Var}(\hat{z}_i)=\frac{d_i^2}{N},
\]
!et
where $d_i$ are the singular values of the matrix $\hat{X}$. Give an interprepation of these results, in particular in connection with the variance of the coefficients you obtained in the previous exercise.
where $d_i$ are the singular values of the matrix $\hat{X}$. Give an interpretation of these results, in particular in connection with the variance of the coefficients you obtained in the previous exercise.