From ec3fdf5961164e141d3dfc03de8ad5df73852f48 Mon Sep 17 00:00:00 2001 From: nikosbosse Date: Mon, 15 Mar 2021 23:21:36 +0100 Subject: [PATCH] make criteria to classify a forecast as binary stricter --- R/eval_forecasts.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/eval_forecasts.R b/R/eval_forecasts.R index 844ac8e97..96d09b437 100644 --- a/R/eval_forecasts.R +++ b/R/eval_forecasts.R @@ -332,7 +332,7 @@ eval_forecasts <- function(data = NULL, } if (all.equal(data$true_value, as.integer(data$true_value)) == TRUE) { - if (all(data$true_value %in% c(0,1))) { + if (all(data$true_value %in% c(0,1)) && all(data$prediction >= 0) && all(data$prediction <= 1)) { target_type = "binary" } else { target_type = "integer"