tests/testthat/test-Prediction.R

test_that("predict_and_evaluate works as expected", {
  data("SampledData")
  result <- predict_and_evaluate(sampled_data)
  
  expect_is(result, "list")
  expect_named(result, c("predictions", "comparison", "RMSE", "MAE", "R2"))
  expect_true(is.numeric(result$RMSE))
  expect_true(is.numeric(result$MAE))
  expect_true(is.numeric(result$R2))
})

Try the SLOS package in your browser

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

SLOS documentation built on April 12, 2025, 2:25 a.m.