context("test-optimize_variables")
test_that("Create a model (neural network) during optimization", {
# Set up some grid
GRIDS <- list(
DAYS = 3,
GRID_PTS = 8,
GRID_BOUND = 0.2,
DECAY = 5000,
TOTAL_PERC = 1,
NN_REP = 1,
NN_THRESH = 0.005,
XG_ROUNDS = 100,
XG_DEPTH = 10,
XG_ETA = 0.2,
XG_GAMMA = 2
)
# --{ Same again => still broken for now }--
expect_equal(1, 1)
# Take a slice of all the metrics
# myres <- footballstats::total.metrics[1:300, ] %>%
# optimize_variables(
# optimizeModels = FALSE,
# GRIDS = GRIDS,
# types = "neuralnetwork"
# )
#
# expect_equal( myres %>% length, 1 )
# expect_equal( myres$neuralnetwork %>% length, 3)
# expect_is( myres$neuralnetwork$model, "nn" )
# expect_equal( myres$neuralnetwork$totalStats %>% length, 7)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.