PLSRegression validation ledger#
Status: validated; NIPALS PLS2 regression.
Authority: Wold et al. (1984), DOI 10.1137/0905052.
Frozen convention: center X and Y; optionally scale each column by sample standard deviation (
ddof=1). At each component, alternate X weights and Y scores, normalize the X weight to unit norm, then use regression-mode deflationX <- X-t p^TandY <- Y-t q^T.Initialization: a thin SVD of the residual cross-covariance supplies its leading right singular vector; the initial Y score is its target projection. Each residual block is divided by its largest magnitude before forming the cross-covariance, which preserves the singular directions without introducing an avoidable raw-product overflow. This initialization avoids zero starts and subdominant stationary points that can arise from selecting one Y column. The subsequent NIPALS updates retain the public
tolandmax_iterlimits.Mapping: X rotations are
R=W(P^T W)^-1; predictions in standardized space areX R Q^T, then target scaling and the fitted intercept are restored.predictevaluates this affine map through the fitted two-part centering state, which is algebraically identical toX @ coef_ + intercept_but avoids catastrophic cancellation at large common offsets. The coefficient attributes record that algebraic affine form; direct raw evaluation is not the numerical prediction contract on ill-conditioned offsets. Target means are restored through their fitted reference and offset with compensated addition; a roundedy_mean_therefore does not erase representable target variation. Unrepresentable predictions fail explicitly. Passing targets totransformreturns both X scores and target projection scores;fit_transform(X, y)follows that paired convention.Stopping: sign-invariant X-weight change; every component must converge. Fitting normalizes both residual blocks by powers of two before iteration and restores the score and loading units afterward. It checks residual X and Y residual amplitudes and rejects rank-deficient score or rotation systems. The target rotations use the direct SVD pseudoinverse of the loading matrix, preserving weak representable target directions. Degenerate X weights, Y weights, scores, or prematurely exhausted Y residuals are explicit failures. Diagnostics report the relative residual sum of squares, avoiding an unrepresentable raw SSE without changing the fitted NIPALS problem.
Evidence: exact low-rank multiresponse prediction, transform dimensions, coefficient/intercept identity at ordinary scale, reference-shifted prediction, scaling, clone, and non-convergence tests. Regression tests also compare multi-component predictions against independent direct-SVD regression deflation, including target permutations, orthogonal first targets, tiny leading-mode contamination, and nearly tied modes.
Complexity:
O(Tkn(p+q) + knpq + k min(p,q)^2 max(p,q) + (p+q)k^2 + k^3 + pqk)time andO(n(p+q) + pq)peak memory; symbols follow the method catalog. Rdimtools is not an oracle.