From: Benjamin Auder Date: Fri, 11 Jun 2021 17:02:44 +0000 (+0200) Subject: Fix regression X-Git-Url: https://git.auder.net/variants/Cwda/vendor/normalize.css?a=commitdiff_plain;h=1fdc3c344600de5932439a434abeff4b14e6591f;p=agghoo.git Fix regression --- diff --git a/R/R6_AgghooCV.R b/R/R6_AgghooCV.R index 9cdf19e..2734d69 100644 --- a/R/R6_AgghooCV.R +++ b/R/R6_AgghooCV.R @@ -98,7 +98,7 @@ AgghooCV <- R6::R6Class("AgghooCV", all_predictions[,v] <- private$pmodels[[v]]$model(X) if (private$task == "regression") # Easy case: just average each row - rowSums(all_predictions) + return (rowMeans(all_predictions)) # "Hard" classification: apply(all_predictions, 1, function(row) { t <- table(row) diff --git a/test/compareToCV.R b/test/compareToCV.R index d3b9011..a124dd2 100644 --- a/test/compareToCV.R +++ b/test/compareToCV.R @@ -37,6 +37,8 @@ standardCV <- function(data, target, task = NULL, gmodel = NULL, params = NULL, } } } + else + mean(abs(y1 - y2)) } }