diff --git a/R/Param.R b/R/Param.R deleted file mode 100644 index bcde3ab..0000000 --- a/R/Param.R +++ /dev/null @@ -1,52 +0,0 @@ -#' @title Class Param -#' -#' @description -#' Implements a parameter set. Objects from this class contain non-tunable parameters. -#' -#' @export -#' @importFrom R6 R6Class -#' @seealso [ParamLrner] -Param <- R6Class("Param", - public = list( - #' @description - #' Initialize a default parameters list. - #' - #' - #' @param id (`character(1)`)\cr - #' The ID of current parameter object. - #' @param param_list (`list(1)`)\cr - #' List of parameters. - #' - initialize = function (id, param_list) { - private$id = id - private$param_list = param_list - }, - #' @description - #' Printer - #' @param ... (any) \cr - #' - print = function(...){ - cat("Class: Param\n") - cat(sprintf("id : %s\n", private$id)) - cat("Parameter combination\n") - print(private$param_list) - }, - #' @description - #' Getter of parameter ID. - #' - getId = function () { - return(private$id) - }, - #' @description - #' Getter of parameter list. - #' - getParamList = function () { - return(private$param_list) - } - ), - private = list( - id = character(0L), - param_list = NA - ), - cloneable = TRUE -) diff --git a/R/ParamLrner.R b/R/ParamLrner.R deleted file mode 100644 index 9305a0c..0000000 --- a/R/ParamLrner.R +++ /dev/null @@ -1,60 +0,0 @@ -#' @title Class ParamLrner. -#' -#' @description -#' Implement the list of parameters to be passed to the [Lrner] object. -#' Non-tunable parameters and tunable paramters are stored in the object -#' from this class. -#' -#' @export -#' @importFrom R6 R6Class -ParamLrner <- R6Class("ParamLrner", - inherit = Param, - public = list( - #' @description - #' constructor - #' - #' @param id (`character(1)`)\cr - #' See class Param - #' @param param_list (`list(1)`)\cr - #' See class Param - #' @param hyperparam_list (`list(1)`)\cr - #' List of hyperparameters. Default is an empty list. - #' - initialize = function (id, - param_list, - hyperparam_list = list()) { - super$initialize(id = id, param_list = param_list) - private$hyperparam = hyperparam_list - param = c(private$param_list, hyperparam_list) - private$param_lrner = expand.grid(param) - # Do not hash instances from this class. Hash Lrner - # objects instead. - }, - #' @description - #' Printer - #' @param ... (any) \cr - #' - print = function (...) { - cat(sprintf("ParamLrner : %s\n", private$id)) - cat("Learner parameter combination\n") - print(private$param_lrner) - }, - #' @description - #' Getter of learner parameters. - #' - getParamLrner = function() { - return(private$param_lrner) - }, - #' @description - #' Getter of hyperparameters. - #' - getHyperparam = function () { - return(private$hyperparam) - } - ), - private = list( - param_lrner = list(0L), - hyperparam = list(0L) - ), - cloneable = TRUE -) diff --git a/R/ParamVarSel.R b/R/ParamVarSel.R deleted file mode 100644 index 219ce19..0000000 --- a/R/ParamVarSel.R +++ /dev/null @@ -1,41 +0,0 @@ -#' @title Class ParamVarSel. -#' -#' @description -#' Implement the list of parameters to be passed to the [VarSel] object. -#' -#' @export -#' @importFrom R6 R6Class -ParamVarSel <- R6Class("ParamVarSel", - inherit = Param, - public = list( - #' @description - #' constructor - #' - #' @param id (`character(1)`)\cr - #' See class Param - #' @param param_list (`list(1)`)\cr - #' See class Param - #' - initialize = function (id, - param_list) { - super$initialize(id = id, param_list = param_list) - }, - #' @description - #' Printer - #' @param ... (any) \cr - #' - print = function(...){ - cat("Class: ParamVarSel\n") - cat(sprintf("id : %s\n", private$id)) - cat("Parameter combination\n") - print(private$param_list) - }, - #' @description - #' Getter of learner parameters. - #' - getParamVarSel = function() { - return(private$param_list) - } - ), - cloneable = TRUE -)