From 583adc5f737262190f0fd1c769f499dbcd7011a5 Mon Sep 17 00:00:00 2001 From: mb706 Date: Tue, 19 Nov 2024 12:29:29 +0100 Subject: [PATCH] LearnerAvg mark HPs as required --- R/LearnerAvg.R | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/R/LearnerAvg.R b/R/LearnerAvg.R index 3affe225f..885526740 100644 --- a/R/LearnerAvg.R +++ b/R/LearnerAvg.R @@ -59,11 +59,11 @@ LearnerClassifAvg = R6Class("LearnerClassifAvg", inherit = LearnerClassif, public = list( initialize = function(id = "classif.avg") { ps = ps( - measure = p_uty(custom_check = check_class_or_character("MeasureClassif", mlr_measures), tags = "train"), - optimizer = p_uty(custom_check = check_optimizer, tags = "train"), + measure = p_uty(custom_check = check_class_or_character("MeasureClassif", mlr_measures), tags = c("train", "required")), + optimizer = p_uty(custom_check = check_optimizer, tags = c("train", "required")), log_level = p_uty( custom_check = crate(function(x) check_string(x) %check||% check_integerish(x), .parent = topenv()), - tags = "train" + tags = c("train", "required") ) ) ps$values = list(measure = "classif.ce", optimizer = "nloptr", log_level = "warn") @@ -135,9 +135,9 @@ LearnerRegrAvg = R6Class("LearnerRegrAvg", inherit = LearnerRegr, public = list( initialize = function(id = "regr.avg") { ps = ps( - measure = p_uty(custom_check = check_class_or_character("MeasureRegr", mlr_measures), tags = "train"), - optimizer = p_uty(custom_check = check_optimizer, tags = "train"), - log_level = p_uty(tags = "train", + measure = p_uty(custom_check = check_class_or_character("MeasureRegr", mlr_measures), tags = c("train", "required")), + optimizer = p_uty(custom_check = check_optimizer, tags = c("train", "required")), + log_level = p_uty(tags = c("train", "required"), function(x) check_string(x) %check||% check_integerish(x)) ) ps$values = list(measure = "regr.mse", optimizer = "nloptr", log_level = "warn")