tests/testthat/test_shortcut.R

context("Test shortcut for DALEX explainers")

mlm <- lm(quality ~., data = live::wine)
expl <- DALEX::explain(mlm, live::wine, live::wine$quality)

testthat::test_that("DALEX integration is okay", {
  testthat::expect_is(
    local_approximation(expl, live::wine[5, ], "quality", 500),
    "live_explainer"
    )
})

Try the live package in your browser

Any scripts or data that you put into this service are public.

live documentation built on Feb. 28, 2019, 5:05 p.m.