3
$\begingroup$

With reference to Expected Prediction Error derivation - page 18, section 2.4 in Elements of Statistical Learning. Please refer text below:

Please Refer below:

I have been able to follow up to step 2.11. I am struggling to understand step 2.12 and 2.13.

My understanding:

  • We intend to minimize EPE, as EX is constant, we focus on minimizing EY|X([Y-f(X)]2|X).
  • Doubt in step 2.12: To minimize EPE, the difference between Y i.e. actual value and f(X) i.e. predicted value should be minimized. However, equation 2.12 is minimizing "c".
  • Guide me on understanding this - my understanding is that with small c, [Y-c]2 will become larger.
  • Additionally, I could not figure out development of 2.13 from 2.12.

Please correct me wherever my assumptions and/ or understanding is incorrect.

P.S.: I studied Probability (Tsitsiklis) and Linear Algebra (David C. Lay) before moving to ESL.

$\endgroup$
8

3 Answers 3

3
$\begingroup$

Let $H$ be any set of functions of $x$. Then, for each $h\in H$, $\int h(x)\,dx \ge \int \inf_{g\in H} g(x)\,dx$. Sometimes, as in the current situation, the function $\lambda$, given by $\lambda(x)=\inf_{g\in H}g(x)$, is already in $H$, in which case the least value of the integral of $h$, as $h$ varies over $H$, is given by taking $h=\lambda$. We will define $H$ in the current situation, then compute $\lambda$ and then check that $\lambda\in H$.

Here $H$ is the set of all functions $h$ given by $h(x) = E_{Y|X}((Y-f(x))^2 | X=x)$, where $f$ is some measurable function of $x$. Measurability imposes no restriction on possible values of $c=f(x)$, so $$ \lambda(x) = \inf_{h\in H} h(x) = \inf_c E_{Y|X}((Y-c)^2|X=x),$$ which is the minimum of a quadratic function of $c$. We write this quadratic function as $A-2B.c +c^2$, where $A$ and $B$ are independent of $c$. This has its minimum when $c=B=E_{Y|X}(Y|X=x)$. So we certainly cannot do any better than defining $f(x)=c=E_{Y|X}(Y|X=x)$. Since $f$ is a measurable function, we do have $\lambda\in H$, and this choice of $f$ achieves the required minimum in 2.11.

$\endgroup$
4
  • 1
    $\begingroup$ (+1) Totally unrelated but I have to ask based on your location: Are you "really, really good" in Geometry? $\endgroup$
    – usεr11852
    Commented Jul 2, 2017 at 0:26
  • $\begingroup$ @usεr11852 Not that good any more (too old) $\endgroup$ Commented Jul 2, 2017 at 11:31
  • $\begingroup$ I still don't fully understand it: Assuming $E_{Y|X} ([Y-c]^2|X=x) = \int dy (y^2+c^2-2yc)p(y|x)$, we can get the minimum by taking the derivative, setting to zero and solving c yields: $c = \frac{E_{Y|X} (Y|X=x) }{\int dy\; p(y|x)}$ -> ??? Where is my mistake? $\endgroup$
    – newandlost
    Commented Aug 14, 2022 at 13:53
  • $\begingroup$ I still don't understand how to get from 2.11 to 2.12, $E_X$ is not a constant, if it the expectation value of everything the follows to the right of that symbol if I understand it correctly. I mean expression 2.11 is $\int dx p(x) \int dy (y-f(x))^2 p(y|x)$ , so how come not to considere the integration over $x$? $\endgroup$
    – newandlost
    Commented Aug 14, 2022 at 14:01
0
$\begingroup$

The integral of a probability distribution function is always 1, and so the integral of p(y|x) with respect to y is equal to 1. Your formula is not a mistake; it is the same answer as in the text. However, your discussion is a bit too special: in general, for example probabilities when throwing a dice, there is no function p(y|x) and you have to argue without assuming there is such a function.

$\endgroup$
0
$\begingroup$

Here is my attempt although it is 5+ years late.

By conditioning on X, we can write EPE as ... (2.11)

due to the law of total probability or iterated expectation, a topic covered in your Math Stats I.

and we see that it suffices to minimize EPE pointwise:

because for all values of x, the inner expectation is non-negative, and therefore, minimizing the inner expectation at each value of x minimizes the outer integral of all the inner expectations, aka the outer expectation. And (2.12) is just that.

The solution is ... (2.13)

I bet you have seen this argument over and over again, but here it is yet again:

$E_{Y|X}([Y-c]^2|X=x)$

$=E_{Y|X}([Y-E_{Y|X}(Y|X)+E_{Y|X}(Y|X)-c]^2|X=x)$

And then you expand out the square and you have two square terms and a cross term. The cross term turns out to be zero (it is easy to show but too messy to type it out here). What is left are two square terms, and one is the conditional variance of Y (there is no way to reduce this term), and the other one is $[E_{Y|X}(Y|X=x)-c]^2$. So the solution of (2.12) is (2.13).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.