tune.cosso {cosso} | R Documentation |
Tuning procedure for cosso
Description
Compute K-fold cross-validated score and plot cross-validated score against a grid values of smooth parameter M.
Usage
tune.cosso(object,folds=5,plot.it=TRUE)
Arguments
object |
a cosso object. |
folds |
number of folds for corss-validation. Default is |
plot.it |
if |
Value
OptM |
the optimal smoothing parameter for M. |
M |
used tuning grid points. |
cvm |
the mean cross-validated error/minus log-likelihood. |
cvsd |
estimate of standard error of |
Author(s)
Hao Helen Zhang and Chen-Yen Lin
See Also
Examples
## Binomial
set.seed(20130310)
x=cbind(rbinom(150,1,.7),matrix(runif(150*5,0,1),nc=5))
trueProb=1/(1+exp(-x[,1]-sin(2*pi*x[,2])-5*(x[,4]-0.4)^2))
y=rbinom(150,1,trueProb)
B.Obj=cosso(x,y,family="Bin",nbasis=30)
tune.cosso(B.Obj,4,TRUE)
[Package cosso version 2.1-2 Index]