test_that("ESM Support Vectro Machine", {
data("abies")
require(dplyr)
# Using k-fold partition method
set.seed(10)
abies2 <- abies %>%
na.omit() %>%
group_by(pr_ab) %>%
dplyr::slice_sample(n = 10) %>%
group_by()
abies2 <- part_random(
data = abies2,
pr_ab = "pr_ab",
method = c(method = "rep_kfold", folds = 3, replicates = 5)
)
abies2
# Without threshold specification and with kfold
esm_svm_t1 <- esm_svm(
data = abies2,
response = "pr_ab",
predictors = c("aet", "cwd", "tmin", "ppt_djf"),
partition = ".part",
thr = NULL
)
expect_equal(length(esm_svm_t1), 3)
expect_equal(class(esm_svm_t1), "list")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.