if (FALSE) {
library(h2o)
h2o.init()
prostate.hex <- h2o.importFile(
"https://s3.amazonaws.com/h2o-public-test-data/smalldata/logreg/prostate.csv",
destination_frame="prostate.hex"
)
prostate.hex$CAPSULE <- as.factor(prostate.hex$CAPSULE)
prostate.hex$RACE <- as.factor(prostate.hex$RACE)
prostate.h2o <- h2o.gbm(x = 3:9, y = "CAPSULE", training_frame = prostate.hex,
distribution = "bernoulli", ntrees = 100, max_depth = 5, min_rows = 10, learn_rate = 0.1)
h_val <- h2o.h(prostate.h2o, prostate.hex, c('DPROS','DCAPS'))
}
Run the code above in your browser using DataLab