tests/testthat/test-Q2_calculation_forclassfication.R

test_that("Q2_calculation_forclassification works", {

  classification_prediction_matrix <- classModel$yPred
  y <- Yotu
  Q2_calculation_forclassification(classification_prediction_matrix,
  y)
  ### There should be one Q2 for each value
  expect_equal(length(Q2_calculation_forclassification(classification_prediction_matrix,y)),
               length(levels(y)) )
})

Try the MUVR2 package in your browser

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

MUVR2 documentation built on Sept. 16, 2024, 9:06 a.m.