Describe how partial least squares (PLS) builds its first component, and how it differs from principal components regression (PCR). Take centred X with X⊤X=4I2, X⊤y=(4,3)⊤ for n=4 samples: what are the first PLS direction and the one-component fit coefficients, and how do they compare with OLS?

Supervised learning, Partial least squares
Level L4 Advanced. Length Long. Nature Th+Mat Both.

What's being asked

Whether you know PLS chooses directions using y (maximising covariance) while PCR uses only the variance of X.

Key idea

The first PLS direction maximises Cov⁡(Xw,y)2 over unit w, giving w1∝X⊤y. PCR instead takes the directions of largest variance of X, ignoring y.

Steps

  1. Standardise the columns and centre y. PLS seeks z=Xw with ∥w∥=1 that maximises (y⊤Xw)2. By Cauchy–Schwarz the optimum is w1=X⊤y/∥X⊤y∥.
  2. Regress y on z1=Xw1 to get θ1=z1⊤y/z1⊤z1. Then make the remaining columns of X orthogonal to z1 (deflate) and repeat for the next component.
  3. PCR picks the top eigenvectors of X⊤X without looking at y, so a high-variance direction that is unrelated to y can be kept and a low-variance but predictive direction dropped. PLS trades some variance for relevance.
  4. Numbers: X⊤y=(4,3) has norm 5, so w1=(0.8,0.6).
  5. ∥z1∥2=w1⊤X⊤Xw1=4∥w1∥2=4, and z1⊤y=w1⊤X⊤y=0.8⋅4+0.6⋅3=5. So θ1=5/4=1.25.
  6. One-component fit: β^PLS=θ1w1=(1.0,0.75).
  7. OLS: β^=(X⊤X)−1X⊤y=(1,0.75). They are identical because X⊤X∝I: all directions have equal variance, so a single PLS step already captures all the relevant signal (PCR cannot choose a direction here, since the eigenvalues tie).

Common mistakes

How long your answer should be

Half a page to one page; 6 minutes.

Read this

Previous in Supervised learning: A 1-D dataset has x=−1 with y=0 and x=+1 with y=1, and the model is P(y=1∣x)=σ(wx) (no intercept). How do you show that the maximum-likelihood estimate does not exist, what happens to the Hessian, and how does an L2 penalty fix it?
Next in Supervised learning: How is the optimal leaf weight w∗=−G/(H+λ) and the split gain derived in XGBoost's second-order objective? How do you apply it to 6 samples with logistic loss, current prediction F=0 (so p=0.5), labels 1,1,0 in the left candidate leaf and 1,0,0 in the right, λ=1, γ=0.1?