Compute kernel-PLS decomposition for large on-disk BPCells matrices using the algorithm of Dayal and MacGregor (1997).
# S3 method for class 'IterableMatrix'
kernelpls(X, Y, ncomp, center = TRUE, stripped = FALSE, threads = 1L, ...)An IterableMatrix (features x samples, the BPCells convention). The transpose is handled internally.
A matrix or vector of responses (samples x q).
Integer; number of PLS components to compute.
Logical; whether to center X and Y (default TRUE).
Logical; if TRUE return only coefficients, Xmeans, and
Ymeans for speed (default FALSE).
Integer; number of threads for BPCells parallel computation.
1 (default) = single-threaded;
0 = auto-detect via parallel::detectCores(logical = FALSE);
values \(\ge 2\) use that many threads.
Additional arguments (currently unused).
A list with components:
Regression coefficients (p x q x ncomp array).
X-scores (n x ncomp matrix).
X-loadings (p x ncomp matrix).
Loading weights (p x ncomp matrix).
Y-scores (n x ncomp matrix).
Y-loadings (q x ncomp matrix).
Projection matrix (p x ncomp matrix).
Column means of X (length p).
Column means of Y (length q).
Fitted Y values (n x q x ncomp array).
Residuals (n x q x ncomp array).
Variance explained in X per component (length ncomp).
Total variance in X (scalar).
If stripped = TRUE, only coefficients, Xmeans, and
Ymeans are returned.
Implements the kernel-PLS algorithm (Dayal & MacGregor, 1997) for BPCells on-disk matrices. The large predictor matrix X is accessed from disk column-by-column; the response matrix Y is kept in memory.
Dayal, B. S. and MacGregor, J. F. (1997) Improved PLS algorithms. Journal of Chemometrics, 11, 73–85.