pls.kodama | R Documentation |
Partial Least Squares (PLS) regression for test set from training set.
pls.kodama(Xtrain, Ytrain, Xtest, Ytest = NULL, ncomp, scaling = c("centering","autoscaling"), perm.test=FALSE, times=1000)
Xtrain |
a matrix of training set cases. |
Ytrain |
a classification vector. |
Xtest |
a matrix of test set cases. |
Ytest |
a classification vector. |
ncomp |
the number of components to consider. |
scaling |
the scaling method to be used. Choices are " |
perm.test |
a classification vector. |
times |
a classification vector. |
A list with the following components:
B |
the (p x m x length(ncomp)) matrix containing the regression coefficients. Each row corresponds to a predictor variable and each column to a response variable. The third dimension of the matrix B corresponds to the number of PLS components used to compute the regression coefficients. If ncomp has length 1, B is just a (p x m) matrix. |
Ypred |
the (ntest x m x length(ncomp)) containing the predicted values of the response variables for the observations from Xtest. The third dimension of the matrix Ypred corresponds to the number of PLS components used to compute the regression coefficients. |
P |
the (p x max(ncomp)) matrix containing the X-loadings. |
Q |
the (m x max(ncomp)) matrix containing the Y-loadings. |
T |
the (ntrain x max(ncomp)) matrix containing the X-scores (latent components) |
R |
the (p x max(ncomp)) matrix containing the weights used to construct the latent components. |
Stefano Cacciatore
Cacciatore S, Luchinat C, Tenori L
Knowledge discovery by accuracy maximization.
Proc Natl Acad Sci U S A 2014;111(14):5117-22. doi: 10.1073/pnas.1220873111. Link
Cacciatore S, Tenori L, Luchinat C, Bennett PR, MacIntyre DA
KODAMA: an updated R package for knowledge discovery and data mining.
Bioinformatics 2017;33(4):621-623. doi: 10.1093/bioinformatics/btw705. Link
KODAMA.matrix
,KODAMA.visualization
data(iris) data=iris[,-5] labels=iris[,5] ss=sample(150,15) ncomponent=3 z=pls.kodama(data[-ss,], labels[-ss], data[ss,], ncomp=ncomponent) table(z$Ypred[,ncomponent],labels[ss])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.