test_that("leave one out prediction works for knn", {
data(hgsc)
class <- attr(hgsc, "class.true")
id <- seq_along(class)
mod <- classification(hgsc[id[-1], ], class[id[-1]], "knn")
pred <- prediction(mod, hgsc, class, id[1])
expect_length(pred, 1)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.