1 Matching Annotations
  1. Sep 2019
    1. Can you show that the test error is an unbiased estimate of the generalization error? That is, that the expected value of the test error is equal to the generalization error.

      I think I may have a solution for this one, but I want to share to validate if anyone else reaches a similar way to solve the problem.

      First, we start with the definition of the expectation of the Average Test Error:

      $$\mathbb{E}_{p(\vec{x}, y)}[\text{Average Test Error}]$$

      $$=\mathbb{E}_{p(\vec{x}, y)}[\frac{1}{M}\sum_{m=1}^M L(y^{(m)}, f(\vec{x}^{(m)}))] \quad \vec{x}^{(m)}, y^{(m)}\sim p(\vec{x}, y) $$

      Since the expectation is a linear operator as seen in this note, we move the expectation operator inside the summation:

      $$\frac{1}{M}\sum_{m=1}^M \mathbb{E}_{p(\vec{x}, y)}[L(y^{(m)}, f(\vec{x}^{(m)}))] \quad \vec{x}^{(m)}, y^{(m)}\sim p(\vec{x}, y)$$

      From the definition of expectation, we have: $$\mathbb{E}{p(\vec{x}, y)}[L(y^{(m)}, f(\vec{x}^{(m)}))] \quad \vec{x}^{(m)}, y^{(m)}\sim p(\vec{x}, y)$$ $$=\int\limits{\vec{x}}\int\limits_{y}L(y, f(\vec{x}))p(\vec{x},y) \, dy \, d\vec{x}$$

      Therefore our expectation becomes:

      $$\frac{1}{M}\sum_{m=1}^M \int\limits_{\vec{x}}\int\limits_{y}L(y, f(\vec{x}))p(\vec{x},y) \, dy \, d\vec{x}$$

      Which is simply an average over a constant, thus we have:

      $$\mathbb{E}_{p(\vec{x}, y)}[\text{Average Test Error}]$$

      $$ = \int\limits_{\vec{x}}\int\limits_{y}L(y, f(\vec{x}))p(\vec{x},y) \, dy \, d\vec{x}$$

      Which is our generalization error.