Nothing
data <- bnlearn::learning.test
scorer <- CreateScorer(data = data)
cache <- BuildCache(scorer)
cached_scorer <- CachedScorer(scorer)
testthat::test_that('CachedScorer returns function', {
testthat::expect_true(methods::is(cached_scorer, 'function'))
})
testthat::test_that('Cached scorer looks up correct score', {
testthat::expect_true(cached_scorer('A', c('B', 'C')) < 0.0)
testthat::expect_true(cached_scorer('A', c()) < 0.0)
testthat::expect_true(cached_scorer('A', NULL) < 0.0)
testthat::expect_equal(cached_scorer('A', c('B', 'C')),
BNLearnScorer('A', c('B', 'C'), data = data))
testthat::expect_equal(cached_scorer('A', c()),
BNLearnScorer('A', c(), data = data))
})
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.