Nothing
## Tests for split select weights
library(blockForest)
context("blockForest_splitweights")
## Tests
test_that("split select weights work", {
expect_silent(blockForest(Species ~ ., iris, num.trees = 5, split.select.weights = c(0.1, 0.2, 0.3, 0.4)))
expect_error(blockForest(Species ~ ., iris, num.trees = 5, split.select.weights = c(0.1, 0.2, 0.3)))
})
test_that("Tree-wise split select weights work", {
num.trees <- 5
weights <- replicate(num.trees, runif(ncol(iris)-1), simplify = FALSE)
expect_silent(blockForest(Species ~ ., iris, num.trees = num.trees, split.select.weights = weights))
weights <- replicate(num.trees+1, runif(ncol(iris)-1), simplify = FALSE)
expect_error(blockForest(Species ~ ., iris, num.trees = num.trees, split.select.weights = weights))
})
test_that("always split variables work", {
expect_silent(blockForest(Species ~ ., iris, num.trees = 10,
always.split.variables = c("Petal.Length", "Petal.Width"), mtry = 2))
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.