Closed hongsoog closed 2 years ago
Now, let’s briefly show that $R^2$ is indeed just a rescaled version of the MSE:
$$ \begin{align} R^2 &= 1 - \frac{SSE}{SST} \ & = 1 - \frac{\frac{1}{n}SSE}{\frac{1}{n}SST} \ &= 1 - \frac{ \frac{1}{n} \sum{i=1}^{n} \big ( y^{(i)} - \hat{y}^{(i)} \big )^{2} } { \frac{1}{n} \sum{i=1}^{n} \big ( y^{(i)} - \mu_{y} \big )^{2} } \ &= 1 - \frac{MSE}{Var(y)} \end{align} $$
Thanks, that extra step makes it more clear. I added it to the errata so that we don't forget to include it in case we make a reprint some time.
Now, let’s briefly show that $R^2$ is indeed just a rescaled version of the MSE:
$$ \begin{align} R^2 &= 1 - \frac{SSE}{SST} \ & = 1 - \frac{\frac{1}{n}SSE}{\frac{1}{n}SST} \ &= 1 - \frac{ \frac{1}{n} \sum{i=1}^{n} \big ( y^{(i)} - \hat{y}^{(i)} \big )^{2} } { \frac{1}{n} \sum{i=1}^{n} \big ( y^{(i)} - \mu_{y} \big )^{2} } \ &= 1 - \frac{MSE}{Var(y)} \end{align} $$