Error in `array(x, c(length(x), 1L), if (!is.null(names(x))) list(names(x), 
    NULL) else NULL)`: 'data' must be of a vector type, was 'NULL'

paths(from = c("COMP", "LIKE"), to = c("CUSA")),
paths(from = c("CUSA"), to = c("CUSL")))
paths(from = c("COMP", "LIKE"), to = c("CUSA", "CUSL")),
# Function to compare the Loss of two models
Results1 <- assess_cvpat_compare(established_model = model_one,
Results2 <- as.data.frame(assess_cvpat(model_one, technique = predict_EA, cores = 1))
## Output originally created using following lines
# write.csv(cbind(Results1,Results2), file = "tests/fixtures/cvpat1.csv")
cvpat_control <- as.matrix(read.csv(file = paste(test_folder,"cvpat1.csv", sep = ""), row.names = 1))
test_that("CVPAT compares models correctly\n", {
expect_equal(as.numeric(unlist(Results1)), as.numeric(cvpat_control[,1:5]), tolerance = 0.1)
test_that("CVPAT assesses model correctly\n", {
expect_equal(as.numeric(unlist(Results2)), as.numeric(cvpat_control[,6:15]), tolerance = 0.1)
# Now check that CVPAT can generalize ----
paths(from = c("COKE"), to = c("CUSA")),
test_that("CVPAT_compare can handle higher_composite\n", {
test_that("CVPAT_assess can handle higher_composite\n", {