Skip to content

Commit

Permalink
Add coverage notes
Browse files Browse the repository at this point in the history
  • Loading branch information
fouodo committed Nov 7, 2024
1 parent f4b2c21 commit c4556a4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions R/Lrner.R
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ Lrner <- R6Class("Lrner",
#'
#' @export
#'
# TODO: Covr me
# nocov start
interface = function (x = "x",
y = "y",
object = "object",
Expand All @@ -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]).
#'
Expand Down Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions R/Model.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
6 changes: 6 additions & 0 deletions R/VarSel.R
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ VarSel <- R6Class("VarSel",
#'
#' @export
#'
# TODO: Convr me
# nocov start
interface = function (x = "x",
y = "y",
object = "object",
Expand All @@ -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]).
#'
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit c4556a4

Please sign in to comment.