# NOT RUN {
## A simple gtb.train example with linear regression:
x <- runif(500, 0, 4)
y <- rnorm(500, x, 1)
x.test <- runif(500, 0, 4)
y.test <- rnorm(500, x.test, 1)
mod <- gbt.train(y, as.matrix(x))
## predict is overloaded
y.pred <- predict( mod, as.matrix( x.test ) )
plot(x.test, y.test)
points(x.test, y.pred, col="red")
# }
Run the code above in your browser using DataLab