z <- kyphosis[,c(2:4,1)]
set.seed(37771)
i <- sample(1:81, size=7, replace=TRUE)
dfTe <- z[i,]
i <- setdiff(1:81, i)
dfTr <- z[i,]
yh_logistic(dfTr, dfTe)
yh_logistic(dfTr, dfTe, alpha=1)
## Not run: #cross-validation, takes a few minutes
# X <- kyphosis[,3:4]
# y <- kyphosis[,4]
# cgcv(X, y, yh=yh_logistic, NCores=8)
# cgcv(X, y, yh=yh_logistic, NCores=8, alpha=1)
# cgcv(X, y, yh=yh_logistic, NCores=8, alpha=0.5)
# cgcv(X, y, yh=yh_logistic, NCores=8, alpha=0.02)
# #
# ## End(Not run)
Run the code above in your browser using DataLab