Nothing
context("Tests functions explain and shap.")
test_that("functions explain and shap give previous results", {
set.seed(42)
airq.ens <- pre(Ozone ~ ., data=airquality, ntrees = 10)
expl <- explain(airq.ens, newdata = airquality, deprecation.message = FALSE)
# save_to_test(expl, "explain")
expect_equal(expl, read_to_test("explain"))
SHAP <- shap(airq.ens, newdata = airquality[1:10, ], reference_data = airquality)
# save_to_test(SHAP$marginal, "SHAP_marginal")
expect_equal(SHAP$marginal, read_to_test("SHAP_marginal"))
# save_to_test(SHAP$interactions, "SHAP_interact")
expect_equal(SHAP$interactions, read_to_test("SHAP_interact"))
})
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.