kpls_nipals | R Documentation |
Function kpls_nipals
fits a NIPALS KPLS (Rosipal & Trejo, 2001).
The kernel Gram matrice is internally centered before the analyses, but the data are not column-wise scaled (there is no argument scale
in the function). If needed, the user has to do the scaling before using the function .
Row observations can eventually be weighted (using argument weights
).
kpls_nipals(X, Y, ncomp, kern = kpol, weights = NULL,
tol = .Machine$double.eps^0.5, maxit = 100, ...)
X |
A |
Y |
A |
ncomp |
The number of scores (= components = latent variables) to consider. |
kern |
A function defining the considered kernel (Default to |
weights |
A vector of length |
tol |
Tolerance level for stopping the NIPALS iterations. |
maxit |
Maximum number of NIPALS iterations. |
... |
Optionnal arguments to pass in the kernel function defined in |
A list of outputs (see examples), such as:
T |
KPLS scores ( |
Rosipal, R., Trejo, L.J., 2001. Kernel Partial Least Squares Regression in Reproducing Kernel Hilbert Space. Journal of Machine Learning Research 2, 97-123.
n <- 8
p <- 4
set.seed(1)
X <- matrix(rnorm(n * p, mean = 10), ncol = p)
y1 <- 100 * rnorm(n)
y2 <- 100 * rnorm(n)
Y <- cbind(y1, y2)
set.seed(NULL)
kpls_nipals(X, Y, ncomp = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.