/usr/share/doc/r-cran-caret/tests/testthat/test_minimal.R is in r-cran-caret 6.0-78+dfsg1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | context('Minimal Tests')
stats <- caret:::basic2x2Stats(factor(0:1), factor(0:1), pos='1', neg='0')
expect_equal(stats[['Sensitivity']], 1)
expect_equal(stats[['Specificity']], 1)
expect_equal(stats[['Pos Pred Value']], 1)
expect_equal(stats[['Neg Pred Value']], 1)
test_that("resampling method 'none' doesn't conflict with default tuneLength", {
data(BloodBrain)
expect_error(train(bbbDescr, logBBB,
method = "earth",
tuneLength = 2,
trControl = trainControl(method = "none")))
expect_error(train(bbbDescr, logBBB,
method = "earth",
tuneLength = 2,
trControl = trainControl(method = "none")))
expect_error(train(mpg ~ cyl + disp, data = mtcars,
method = "gam",
tuneLength = 2,
trControl = trainControl(method = "none")))
})
|