TST: Added test for dump

This commit is contained in:
terrytangyuan 2015-09-07 21:36:52 -04:00
parent 339a53d9d4
commit 78afd6c772

View File

@ -0,0 +1,17 @@
context('Test helper functions')
require(xgboost)
data(agaricus.train, package='xgboost')
data(agaricus.test, package='xgboost')
train <- agaricus.train
test <- agaricus.test
bst <- xgboost(data = train$data, label = train$label, max.depth = 2,
eta = 1, nthread = 2, nround = 2,objective = "binary:logistic")
test_that("dump works", {
capture.output(print(xgb.dump(bst)))
})