The function gsim
performs prediction using LambertLacroix and Peyre's GSIM algorithm.
1 
Xtrain 
a (ntrain x p) data matrix of predictors. 
Ytrain 
a ntrain vector of responses. 
Xtest 
a (ntest x p) matrix containing the predictors for the test data
set. 
Lambda 
a positive real value. 
hA 
a strictly positive real value. 
hB 
a strictly positive real value. 
NbIterMax 
a positive integer. 
The columns of the data matrices Xtrain
and Xtest
may not be standardized,
since standardizing is performed by the function gsim
as a preliminary step
before the algorithm is run.
The procedure described in LambertLacroix and Peyre (2005) is used to estimate
the projection direction beta. When Xtest
is not equal to NULL, the procedure predicts the labels for these new predictor variables.
A list with the following components:
Ytest 
the ntest vector containing the predicted labels for the observations from

beta 
the p vector giving the projection direction estimated. 
hB 
the value of hB used in step B of GSIM (value given by the user or estimated by plugin if the argument value was equal to NULL) 
DeletedCol 
the vector containing the column number of 
Cvg 
the 01 value indicating convergence of the algorithm (1 for convergence, 0 otherwise). 
Sophie LambertLacroix (http://membrestimc.imag.fr/Sophie.Lambert/) and Julie Peyre (http://wwwlmc.imag.fr/lmcsms/Julie.Peyre/).
S. LambertLacroix, J. Peyre . (2006) Local likelyhood regression in generalized linear singleindex models with applications to microarrays data. Computational Statistics and Data Analysis, vol 51, n 3, 20912113.
gsim.cv
, mgsim
, mgsim.cv
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  # load plsgenomics library
library(plsgenomics)
# load Colon data
data(Colon)
IndexLearn < c(sample(which(Colon$Y==2),12),sample(which(Colon$Y==1),8))
Xtrain < Colon$X[IndexLearn,]
Ytrain < Colon$Y[IndexLearn]
Xtest < Colon$X[IndexLearn,]
# preprocess data
resP < preprocess(Xtrain= Xtrain, Xtest=Xtest,Threshold = c(100,16000),Filtering=c(5,500),
log10.scale=TRUE,row.stand=TRUE)
# perform prediction by GSIM
res < gsim(Xtrain=resP$pXtrain,Ytrain= Ytrain,Xtest=resP$pXtest,Lambda=10,hA=50,hB=NULL)
res$Cvg
sum(res$Ytest!=Colon$Y[IndexLearn])

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.