## Not run:
# x <- matrix(rnorm(100*5),ncol=5)
# c <- 2*x[,1]
# p <- exp(c)/(exp(c)+exp(-c))
# y <- rbinom(100,1,p)
# y[y != 1] <- -1
# x <- as.data.frame(x)
# cv.bst(x, y, ctrl = bst_control(mstop=50), family = "hinge", learner = "ls", type="loss")
# cv.bst(x, y, ctrl = bst_control(mstop=50), family = "hinge", learner = "ls", type="error")
# dat.m <- bst(x, y, ctrl = bst_control(mstop=50), family = "hinge", learner = "ls")
# dat.m1 <- cv.bst(x, y, ctrl = bst_control(twinboost=TRUE, coefir=coef(dat.m),
# xselect.init = dat.m$xselect, mstop=50), family = "hinge", learner="ls")
# ## End(Not run)
Run the code above in your browser using DataLab