diff --git a/R/Lrner.R b/R/Lrner.R index 3a5c795..8b45a96 100644 --- a/R/Lrner.R +++ b/R/Lrner.R @@ -104,6 +104,8 @@ Lrner <- R6Class("Lrner", #' #' @export #' + # TODO: Covr me + # nocov start interface = function (x = "x", y = "y", object = "object", @@ -124,6 +126,7 @@ Lrner <- R6Class("Lrner", original = c(x, y, object, data)) private$param_interface = param_interface }, + # nocov end #' @description #' Tains the current learner (from class [Lrner]) on the current training data (from class [TrainData]). #' @@ -188,10 +191,13 @@ Lrner <- R6Class("Lrner", lrn_param$x = train_data$getData() lrn_param$y = train_data$getTargetValues() } else { + # TODO: covr me + # nocov start x_name = private$param_interface[private$param_interface$standard == "x", "original"] y_name = private$param_interface[private$param_interface$standard == "y", "original"] lrn_param[[x_name]] = train_data$getData() lrn_param[[y_name]] = train_data$getTargetValues() + # nocov end } base_model = do.call(eval(parse(text = lrn)), lrn_param) model = Model$new(lrner = self, diff --git a/R/Model.R b/R/Model.R index b809895..187defb 100644 --- a/R/Model.R +++ b/R/Model.R @@ -188,10 +188,13 @@ Model <- R6Class("Model", pred_param[["object"]] = pred_param_object pred_param[["data"]] = pred_param_data } else { + # TODO: covr me + # nocov start object_name = param_interface[param_interface$standard == "object", "original"] data_name = param_interface[param_interface$standard == "data", "original"] pred_param[[object_name]] = pred_param_object pred_param[[data_name]] = pred_param_data + # nocov end } lrn_package = private$lrner$getPackage() if (is.null(lrn_package)) { diff --git a/R/VarSel.R b/R/VarSel.R index 8e20539..2b7a3a5 100644 --- a/R/VarSel.R +++ b/R/VarSel.R @@ -86,6 +86,8 @@ VarSel <- R6Class("VarSel", #' #' @export #' + # TODO: Convr me + # nocov start interface = function (x = "x", y = "y", object = "object", @@ -106,6 +108,7 @@ VarSel <- R6Class("VarSel", original = c(x, y, object, data)) private$param_interface = param_interface }, + # nocov end #' @description #' Tains the current learner (from class [Lrner]) on the current training data (from class [TrainData]). #' @@ -145,10 +148,13 @@ VarSel <- R6Class("VarSel", varsel_param$x = train_data$getData() varsel_param$y = train_data$getTargetValues() } else { + # TODO: covr me + # nocov start x_name = private$param_interface[private$param_interface$standard == "x", "original"] y_name = private$param_interface[private$param_interface$standard == "y", "original"] varsel_param[[x_name]] = train_data$getData() varsel_param[[y_name]] = train_data$getTargetValues() + # nocov end } varselected = do.call(eval(parse(text = varsel)), varsel_param)