kfolds2coeff | R Documentation |
This fonction extracts coefficients from k-fold cross validated partial least squares regression models
kfolds2coeff(pls_kfolds)
pls_kfolds |
an object that is a k-fold cross validated partial least squares regression models either lm or glm |
This fonctions works for plsR and plsRglm models.
coef.all |
matrix with the values of the coefficients for each
leave one out step or |
Only for NK=1
and leave one out CV
Frédéric Bertrand
frederic.bertrand@utt.fr
https://fbertran.github.io/homepage/
Nicolas Meyer, Myriam Maumy-Bertrand et Frédéric Bertrand (2010). Comparing the linear and the logistic PLS regression with qualitative predictors: application to allelotyping data. Journal de la Societe Francaise de Statistique, 151(2), pages 1-18. http://publications-sfds.math.cnrs.fr/index.php/J-SFdS/article/view/47
kfolds2Pressind
, kfolds2Press
,
kfolds2Mclassedind
, kfolds2Mclassed
and
summary
to extract and transform
results from k-fold cross validation.
data(Cornell)
XCornell<-Cornell[,1:7]
yCornell<-Cornell[,8]
bbb <- PLS_lm_kfoldcv(dataY=yCornell,dataX=XCornell,nt=3,K=nrow(XCornell),keepcoeffs=TRUE,
verbose=FALSE)
kfolds2coeff(bbb)
boxplot(kfolds2coeff(bbb)[,2])
rm(list=c("XCornell","yCornell","bbb"))
data(pine)
Xpine<-pine[,1:10]
ypine<-pine[,11]
bbb2 <- cv.plsR(object=ypine,dataX=Xpine,nt=4,K=nrow(Xpine),keepcoeffs=TRUE,verbose=FALSE)
kfolds2coeff(bbb2)
boxplot(kfolds2coeff(bbb2)[,1])
rm(list=c("Xpine","ypine","bbb2"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.