Partial Least Squares
Study guide: Exam MAS-I
Partial Least Squares (PLS) is a supervised dimension reduction method. Like Principal Components Regression, it builds M new features Z_1, \dots, Z_M as linear combinations of the predictors and fits a least squares linear model to them. Unlike PCR, it uses the response Y to choose those features, so they approximate the predictors and are also related to the response.
Z_m = \sum_{j=1}^{p} \phi_{jm} X_j
\phi_{j1} = \frac{\sum_{i=1}^{n}(x_{ij} - \bar{x}_j)(y_i - \bar{y})}{\sum_{i=1}^{n}(x_{ij} - \bar{x}_j)^2}
y_i = \theta_0 + \sum_{m=1}^{M} \theta_m z_{im} + \epsilon_i
- First direction. Standardize the
ppredictors. Then set each\phi_{j1}equal to the coefficient from the simple Linear Regression ofYontoX_j(the second line). That coefficient is proportional to the correlation betweenYandX_j. SoZ_1puts the most weight on the variables most strongly related to the response. - Later directions. Regress each variable on
Z_1and keep the residuals. The residuals are the informationZ_1has not explained. ComputeZ_2from them in exactly the same wayZ_1was computed from the original data, and repeat until there areMdirections. Finally, fitYonZ_1, \dots, Z_Mby least squares, just as in PCR. - Tuning.
Mis a tuning parameter, usually chosen by Cross-Validation. The predictors and the response are generally standardized first. - Against PCR. PCR finds its directions without using
Y, so nothing guarantees that the directions that best explain the predictors are also the best ones for predicting the response (see Principal Components Analysis, Unsupervised Learning). The first PLS direction fits the predictors less closely than the first principal component, but it explains the response better (see Supervised Learning). - In practice. PLS is popular in chemometrics. It often performs no better than ridge regression (see Regularization) or PCR. Supervised dimension reduction can reduce bias, but it can also increase variance, so on balance PLS gains little over PCR. As in PCR, the new features are linear combinations of the original predictors, not a subset of them (see Variable Selection).
Computing the First PLS Direction Four auto policies have two standardized predictors, vehicle value
X_1and annual mileageX_2(each with mean0and\sum x^2 / n = 1), and claim costyin $000:
Policy x_1x_2y1 -1-1.422 -10.263 1-0.244 11.48Find the first PLS direction
Z_1, then the PLS fit withM = 1and its fitted value for policy 4.Answer
\bar y = 5, soy - \bar y = (-3, 1, -1, 3). Each predictor has mean0and\sum x_{ij}^2 = 4, so the simple-regression slopes are\begin{align*} \phi_{11} &= \frac{(-1)(-3) + (-1)(1) + (1)(-1) + (1)(3)}{4} \\ &= 1.0 \\ \phi_{21} &= \frac{(-1.4)(-3) + (0.2)(1) + (-0.2)(-1) + (1.4)(3)}{4} \\ &= 2.2 \end{align*}The direction
z_{i1} = 1.0\,x_{i1} + 2.2\,x_{i2}gives scores(-4.08, -0.56, 0.56, 4.08), with mean0. Regressingyonz_1:\begin{align*} \hat\theta_1 &= \frac{\sum z_{i1}(y_i - \bar y)}{\sum z_{i1}^2} \\ &= \frac{23.36}{33.92} \\ &= 0.6887 \\ \hat\theta_0 &= 5 \end{align*}Policy 4's fitted value is
5 + 0.6887(4.08) = 7.81, or $7,810.Mileage gets 2.2 times the weight of vehicle value because it is far more correlated with claim cost:
r = 0.98against0.45, which is the same ratio. For comparison, these two standardized predictors have correlation0.6, and their first principal component weights them equally,(0.707, 0.707). PCA picks its direction without ever looking aty.
PLS or PCR? Which of these statements are true?
I. PLS uses the response to choose its directions, and PCR does not. II. A PLS fit with
M = 3directions on 50 predictors uses only 3 of the 50 predictors. III. Because it is supervised, PLS can be expected to beat PCR.Answer Only I.
I is true. The first PLS direction weights each
X_jby its simple-regression coefficient onY. PCR's components depend only on the predictors.II is false. Each
Z_mis a linear combination of the predictors, so all 50 still feed the fit. The dimension is reduced to 3, but no predictors are dropped.III is false. ISLR notes that PLS often does no better than ridge regression or PCR in practice. Supervision can reduce bias, but it can also increase variance, so the overall benefit relative to PCR is a wash.