From ecb93a8a9f55b669295e56c3a8eb2cbfbe26b1c3 Mon Sep 17 00:00:00 2001 From: schalkdaniel Date: Tue, 8 Jan 2019 10:14:23 +0100 Subject: [PATCH] trim trailing white spaces --- R/AutoTuner.R | 22 +++++++++++----------- vignettes/tuning-02-tuner.Rmd | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/R/AutoTuner.R b/R/AutoTuner.R index 570e6240f..a30a041a0 100644 --- a/R/AutoTuner.R +++ b/R/AutoTuner.R @@ -1,16 +1,16 @@ #' @title AutoTuner #' #' @description -#' The [AutoTuner] conducts tuning and sets the learners parameter configuration to the best parameters obtained by the tuning. -#' +#' The [AutoTuner] conducts tuning and sets the learners parameter configuration to the best parameters obtained by the tuning. +#' #' Additionally, this class can be used to do nested resampling by passing an [AutoTuner] object to resample. #' #' @section Usage: #' ``` #' # Construction -#' at = AutoTuner$new(learner, resampling, param_set, terminator, +#' at = AutoTuner$new(learner, resampling, param_set, terminator, #' tuner, tuner_settings, ctrl = tune_control(), id = "autotuner") -#' +#' #' # public fields #' at$learner #' ``` @@ -31,10 +31,10 @@ #' List with tuner settings (e.g. see `?TunerGridSearch`) #' #' @section Details: -#' * With `at$learner` the raw learner with the best parameter configuration can be accessed. +#' * With `at$learner` the raw learner with the best parameter configuration can be accessed. #' #' The interface is described in [Learner]. -#' +#' #' @name AutoTuner #' @keywords internal #' @family Learner @@ -46,12 +46,12 @@ #' task$measures = measures #' param_set = paradox::ParamSet$new( #' params = list(paradox::ParamDbl$new("cp", lower = 0.001, upper = 0.1))) -#' +#' #' terminator = TerminatorEvaluations$new(5) -#' -#' at = AutoTuner$new(learner, resampling, param_set, terminator, tuner = TunerGridSearch, +#' +#' at = AutoTuner$new(learner, resampling, param_set, terminator, tuner = TunerGridSearch, #' tuner_settings = list(resolution = 10L)) -#' +#' #' at$train(task) #' at$learner NULL @@ -102,7 +102,7 @@ AutoTuner = R6Class("AutoTuner", inherit = mlr3::Learner, self$learner$param_vals = private$.tuner$tune_result()$param_vals self$learner$train(task) - + private$.is_trained = TRUE return (invisible(self)) diff --git a/vignettes/tuning-02-tuner.Rmd b/vignettes/tuning-02-tuner.Rmd index 33d974060..c27a28c8c 100644 --- a/vignettes/tuning-02-tuner.Rmd +++ b/vignettes/tuning-02-tuner.Rmd @@ -23,7 +23,7 @@ set.seed(123) `mlr3tuning` is an extension of `mlr3` that includes tuning. -## Basis of Tuning +## Basis of Tuning As mentioned in the `tuning-01-fitness-function` vignette, we have to initialize a `FitnessFunction` object to define the hyperparameter space as well as the evaluation technique that is used to estimate the generalization error: @@ -49,7 +49,7 @@ terminator_eval = TerminatorEvaluations$new(5) ## Iterations ```{r} -terminator_eval = TerminatorEvaluations$new(5) +terminator_iters = TerminatorIterations$new(5) ``` ## Basic Search Strategies