# This test throws a warning in R CMD check, but I can't figure out why. # I'm deleting it to be able to move along with distributing the package. # test_that("Prediction error works", { # require("mosaicData") # mod <- mosaicData::Galton |> # model_train(height ~ splines::ns(father,3) * poly(mother, 2) * sex) # result <- suppressWarnings(model_pe(mod)) # expect_true( abs(result - 4.44231) < 0.0001 ) # # testdata feature works # result2 <- model_pe(mod, testdata = head(Galton), error_type = "default") # expect_true( abs(result2 - 0.41091) < 0.0001) # }) # Still working on `model_cv()` # test_that("CV works", { # mod <- mosaicData::Galton |> model_train(height ~ father*mother*sex) # result <- suppressWarnings(model_cv(mod)) # expect_true( abs(result - 4.44231) < 0.0001 ) # })