Nothing
testthat::test_that("internal preprocessing is fitted and reusable", {
preprocess <- getFromNamespace(".sense_preprocess", "sense")
bake <- getFromNamespace(".sense_bake", "sense")
config <- list(impute_num = "sample", num_preproc = "scale",
fct_preproc = "one-hot", collapse_char_to = 3L,
missing_fusion = TRUE, selected_filter = "variance", selected_n_feats = 10L)
train <- data.frame(number = c(NA, 2:8), category = c("a", "a", "b", "b", "c", "c", "d", "d"))
state <- preprocess(train, seq_len(nrow(train)), config)
prediction <- bake(state, data.frame(number = c(100, NA), category = c("unseen", "a")))
testthat::expect_equal(names(prediction), names(state$data))
testthat::expect_true(all(is.finite(as.matrix(prediction))))
testthat::expect_gt(prediction[["x1_1"]][1L], 10)
})
testthat::test_that("internal stack has no mlr3pipelines dependency", {
description <- packageDescription("sense")
imports <- if (is.null(description[["Imports"]])) "" else description[["Imports"]]
testthat::expect_false(grepl("mlr3pipelines", imports, fixed = TRUE))
testthat::expect_true(is.function(getS3method("plot", "sense_pipeline")))
})
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.