Step 04Question 2.5 · principal component regression
When the regressors lose their shape
Principal component regression is the usual answer to correlated regressors, and TC4, TC5 and TC6 are strongly correlated. Here it backfires: the components are orthogonal, but none of them looks like a source any more.
The thin singular value decomposition of the standardised time courses gives orthonormal regressors :
All six components are kept, and the same lasso as before is fitted with a very small penalty, ρ = 0.001. Singular vectors are only defined up to sign. The port flips them to match the signs LAPACK returned in 2021, so the plots below match the originals.
Using the 2021 parameters. Results match the report.
Figure 4.1
Singular values of the time courses
np.linalg.svd, which the original plotted as eigenvalues (the eigenvalues of TCᵀTC are their squares). The sixth component is the weakest (σ₆ = 6.050, matching the 2021 value 6.050).Figure 4.2
Principal components Z beside the source time courses
- Regressor Zᵢ (principal component)
- Source TCᵢ
Z1
TC1
Z2
TC2
Z3
TC3
Z4
TC4
Z5
TC5
Z6
TC6
- Σ cT PCR
- 0.362
- Σ cT lasso (ρ = 0.625)
- 5.428
- Zero coefficients
- 121 / 2646
Figure 4.3
What PCR retrieves
- Ground truth
- Retrieved (PCR)
time courses shown as z-scores
PC1 / S1
cS 0.05
cT 0.077
PC2 / S2
cS 0.11
cT 0.187
PC3 / S3
cS 0.05
cT 0.044
PC4 / S4
cS 0.10
cT 0.028
PC5 / S5
cS 0.19
cT 0.022
PC6 / S6
cS 0.26
cT 0.004
Next · Step 05
Bias–variance
Split each estimator's error into bias² and variance as the penalty grows.