3
$\begingroup$

What do the red ellipses mean to us in the chart below? Does it have a relationship with RMSE values?

enter image description here

Figure 3.11 from Elements of Statistical Learning by Hastie, Tibshirani, and Friedman

$\endgroup$
3
2
$\begingroup$

The ellipses are the level sets of the loss function, which would be square loss (the loss function in OLS), which looks like an up-opening parabola that is spun around. Here is the equation for the simple linear regression depicted in your image.

$$L(y,\hat{\beta})=\sum_{i=1}^n \bigg( y_i-\big(\hat{\beta}_0+\hat{\beta}_1x_i\big)\bigg)^2$$

Yikes! But it’s actually not that bad because:

1) A computer is going to do the heavy lifting.

2) It just means the sum of the squared residuals. (Do you see why?)

The level sets are the shapes formed by intersecting horizontal planes with the function. Think about slicing a bowl this way; it would be a bunch of circles. Now compress the bowl so it’s rim is elliptical instead of circular; the slices are ellipses.

Note that L1 and L2 regularization apply in more generality than a regression that uses square loss. You can regularization in GLMs like logistic regression, for instance.

$\endgroup$
3
  • $\begingroup$ If there are n points in the validation data, should I consider these ellipses as graphic representation of the residues of these points? I may have asked with mixed and incomplete information, sorry. $\endgroup$ May 15 '20 at 14:28
  • $\begingroup$ The $n$ refers to the points in the training set you then find the $\beta$ giving the smallest value of the loss function. (In OLS, that is the familiar $\beta=(X^TX)^{-1}X^T$.) So no, the ellipses have nothing to do with the points in the validation set, and the number of ellipses has nothing to do with the number of points used for training. Are you familiar with either loss functions or multivariable calculus? (Univariate calculus?) $\endgroup$
    – Dave
    May 15 '20 at 15:00
  • $\begingroup$ When I say residues, I actually meant the loss function value. thanks for the explanation and help. Yes, I'm familiar with the topics, but sometimes it can get confused. $\endgroup$ May 16 '20 at 9:55

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