Coder Social home page Coder Social logo

esl_solution's Introduction

Welcome!

Please check out the webpage!

This is an unofficial solution manual of The Element of Statistical Learning (ESL).

To Contribute

  1. git clone the repo into a local directory
  2. cd <YOUR_DIR>
  3. Make changes if needed
  4. mkdocs serve, see more details on MkDocs
  5. By default the website is served on local host http://127.0.0.1:8000/, visit in browser and view your changes

Current Status

As of Late 2022: I'm less engaged in this project at this moment. There are some outstanding issues and some unfinished exercises (mainly in Chapter 14), I sincerely appreciate help on those items.

esl_solution's People

Contributors

seraphli avatar yuhangzhou88 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

esl_solution's Issues

Ex 6.3

0

$BB^T$ is not invertible.

Ex 8.2

Good work!
However, $\lambda$ is wrong.

Exercise 10.3

I'm kinda confused by the conditional expectation in this exercise and what the expectation is taken with respect to. Moreover, could you explain how you went from $E[h1(Xs)+h2(Xc)|Xs]$ to E[h1(Xs)|Xc]+Xc?

Ex 9.5a

Hi, Yuhang:
Thanks for developing this site for ESL!

I learned how to solve 9.5 (a) from your solution. You can probably generalize the proof as follows.

Screen Shot 2021-04-19 at 21 39 04

Best,
Qichun

Ex 4.3

In the solution it reads

$$ \widehat{y} = \widehat{B}^T x. $$

However, $\widehat{B}$ has size $(p+1) \times K$, while $x$ has size $p \times 1$.

Ex. 9.1: no universe S in local linear regression

I am concerned about the usage of S in your solution

image

The "smoothing matrix" is different for each query point in the local linear regression. In other words, different weighted linear regressions are performed on different points.

BTW, I think it should be straightforward by starting from the definition (my thought: szcf-weiya/ESL-CN#167)

ESL Ex. 5.15 part (a) solution

Hi Yuhang, I thought I should have seen a typo in your Ex. 5.15 (a)'s answer, but I'm not sure if I'm correct.

Below the sentence "Therefore, by definition of $K$ we have", the first line contains a constant $\gamma_i$ that has not been defined. Should this $\gamma_i$ be $\lambda_i$ instead, as what you defined in the denominator of the inner product $H_K$? Thank you!

3.2

第二问求beta ci没有这么复杂吧?印象里beta也是正态分布,mean和sd都有解析解

ex 5.11

Hello!
Can you further explain the formula right below the sentence : "it is easy to show..." . I don't get that.
Thank you!

Solution to Ex. 4.3 is wrong

It is clear that
image

is wrong because $\hat{\mathsf{B}}$ is not a square matrix thus cannot be inversed. The proper way is to expand $\hat{\Sigma}$ and prove
$$B(B^T\Sigma B)^{-1}B^T\mu_k = \Sigma^{-1}\mu_k$$.

Exercise 4.5

I think something is wrong in the solution to 4.5.

The log-likelihood is <=0 for any beta, but it's claimed that it tends to infinity.

A Small mistake in Q 3.21

Hi, thanks a lot for your wonderful work on the solutions!

I would like to point out that there's a small mistake in equation (1) of the Q 3.21.

It should be

$$ \begin{aligned} & \min_{rank (B) = r} Tr \left( (Y - XB) \Sigma^{-1} (Y - X B)^{\top} \right) \\ = & \min_{rank (B) = r} Tr\left( Y \Sigma^{-1} Y^{\top}\right) - Tr\left(\Sigma^{-\frac{1}{2}}Y^{\top}X(X^{\top}X)^{-1}X^{\top}Y - CC^{\top}\right), \end{aligned} $$

while the first term is a $n \times n$ matrix and the second and third terms are apparently not, one can't add the matrices together, but their trace can. And one should minus the second term rather than add it.

Although this will not affect the later deduction, if you could modify the answers a bit, I would be grateful!

Mistake in Ex 14.8

In ∂L/∂R calculation, the third term on RHS should have positive sign;
-2X₁ᵀ·1·μᵀ should be +2X₁ᵀ·1·μᵀ

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.