Description Usage Arguments Details Value Author(s) References See Also Examples
Fits a Least Square-Partial Least Square for logistic regression model. There are 3 extensions.
1 2 3 |
Y |
a vector of length |
X |
a data matrix ( |
D |
a data matrix ( |
W |
weight matrix. If |
ncomp |
a positive integer. |
method |
one of the 3 extensions of LS-PLS for logistic regression models. |
penalized |
if TRUE the parameter associated with |
lambda |
coefficient of ridge penalty. If |
nbrIterMax |
maximal number of iterations. To use only if |
threshold |
used for the stopping rule. To use only if |
This function fits LS-PLS models. With the argument "method" the user can choose one of the three extensions of LS-PLS for logistic regression (LS-PLS-IRLS, R-LS-PLS, IR-LS-PLS). For more details see references.
coefficients |
vector of length |
cvg |
the 0-1 value indicating convergence of the algorithm (1 for convergence, 0 otherwise). |
orthCoef |
coefficients matrix ( |
projection |
the projection matrix used to convert |
intercept |
the constant of the model. |
Caroline Bazzoli, Thomas Bouleau, Sophie Lambert-Lacroix
Caroline Bazzoli, Sophie Lambert-Lacroix. Classification using LS-PLS with logistic regression based on both clinical and gene expression variables. 2017. <hal-01405101>
cv.lspls.glm
,predict.lspls.glm
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | #Data
data(BreastCancer)
#vector of responses
Y<-BreastCancer$Y
#Genetic data
X<-BreastCancer$X
#Clinical data
D<-BreastCancer$D
#SIS selection
X<-scale(X)
X<-SIS.selection(X=X,Y=Y,pred=50)
#Cross validation, 90% of our datasets is used to compose learning samples
#method LS-PLS-IRLS
ncompopt.lsplsirls<-cv.lspls.glm(Y=Y,X=X,D=D,folds=5,ncompmax=5,proportion=0.9,
method="LS-PLS-IRLS")$ncompopt
#method R-LS-PLS
cv<-cv.lspls.glm(Y=Y,X=X,D=D,ncompmax=5,proportion=0.9,method="R-LS-PLS",
lambda.grid=exp(log(10^seq(-3,2,0.7))),penalized=TRUE,
nbrIterMax=15,threshold=10^(-12))
ncompopt.rlspls<-cv$ncompopt
lambdaopt.rlspls<-cv$lambdaopt
#method IR-LS-PLS
ncompopt.irlspls<-cv.lspls.glm(Y=Y,X=X,D=D,ncompmax=5,proportion=0.9,
method="IR-LS-PLS",nbrIterMax=15,threshold=10^(-12))$ncompopt
#fitting model
fit.lsplsirls<-fit.lspls.glm(Y=Y,X=X,D=D,ncomp=ncompopt.lsplsirls,method="LS-PLS-IRLS")
fit.rlspls<-fit.lspls.glm(Y=Y,X=X,D=D,ncomp=ncompopt.rlspls,method="R-LS-PLS",
lambda=lambdaopt.rlspls,penalized=TRUE,nbrIterMax=15,
threshold=10^(-12))
fit.irlspls<-fit.lspls.glm(Y=Y,X=X,D=D,ncomp=ncompopt.irlspls,method="IR-LS-PLS",
nbrIterMax=15,threshold=10^(-12))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.