Learn R Programming

sNPLS (version 0.1.3)

sNPLS: Fit a sNPLS model

Description

Fits a N-PLS regression model imposing a L1 penalization on wj and wk matrices

Usage

sNPLS(XN, Y, ncomp = 2, conver = 1e-16, max.iteration = 10000, keepJ = rep(ncol(XN), ncomp), keepK = rep(rev(dim(XN))[1], ncomp), silent = F)

Arguments

XN
A three-way array containing the predictors.
Y
A matrix containing the response.
ncomp
Number of components in the projection
conver
Convergence criterion
max.iteration
Maximum number of iterations
keepJ
Number of variables to keep for each component
keepK
Number of 'times' to keep for each component
silent
Show output?

Value

A fitted sNPLS model

References

C. A. Andersson and R. Bro. The N-way Toolbox for MATLAB Chemometrics & Intelligent Laboratory Systems. 52 (1):1-4, 2000.

Shen, H. and Huang, J. Z. (2008). Sparse principal component analysis via regularized low rank matrix approximation. Journal of Multivariate Analysis 99, 1015-1034

Examples

Run this code
X_npls<-array(rpois(7500, 10), dim=c(50, 50, 3))

Y_npls<-matrix(2+0.4*X_npls[,5,1]+0.7*X_npls[,10,1]-0.9*X_npls[,15,1]+
0.6*X_npls[,20,1]- 0.5*X_npls[,25,1]+rnorm(50), ncol=1)

fit<-sNPLS(X_npls, Y_npls, ncomp=3, keepJ = rep(2,3) , keepK = rep(1,3))

Run the code above in your browser using DataLab