context("xgboost_func")
test_that("xgboost works", {
library(xgboost)
dtrain <- xgboost::xgb.DMatrix(data = as.matrix(iris[, 2:4]),
label = as.numeric(iris$Species))
out <- xgboost::xgboost(data = dtrain,
max.depth = 2,
eta = 1,
nthread = 2,
nrounds = 2)
expect_equal(xgboost_wrapper(1), out)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.