Skip to content

Commit

Permalink
refactor: rename to batch classes
Browse files Browse the repository at this point in the history
  • Loading branch information
be-marc committed Jun 21, 2024
1 parent 7083f4e commit 579ad41
Show file tree
Hide file tree
Showing 14 changed files with 119 additions and 119 deletions.
8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
Collate:
'aaa.R'
'OptimizerSuccessiveHalving.R'
'OptimizerHyperband.R'
'TunerHyperband.R'
'TunerSuccessiveHalving.R'
'OptimizerBatchSuccessiveHalving.R'
'OptimizerBatchHyperband.R'
'TunerBatchHyperband.R'
'TunerBatchSuccessiveHalving.R'
'bibentries.R'
'helper.R'
'zzz.R'
8 changes: 4 additions & 4 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Generated by roxygen2: do not edit by hand

export(OptimizerHyperband)
export(OptimizerSuccessiveHalving)
export(TunerHyperband)
export(TunerSuccessiveHalving)
export(OptimizerBatchHyperband)
export(OptimizerBatchSuccessiveHalving)
export(TunerBatchHyperband)
export(TunerBatchSuccessiveHalving)
export(hyperband_budget)
export(hyperband_n_configs)
export(hyperband_schedule)
Expand Down
10 changes: 5 additions & 5 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# mlr3hyperband (development version)

* compatibility; Work with new bbotk 0.9.0 and mlr3tuning 0.21.0
* compatibility; Work with new bbotk 1.0.0 and mlr3tuning 1.0.0

# mlr3hyperband 0.5.0

Expand All @@ -14,7 +14,7 @@

# mlr3hyperband 0.4.4

* fix: Remove `emoa` from required packages of `OptimizerSuccessiveHalving`.
* fix: Remove `emoa` from required packages of `OptimizerBatchSuccessiveHalving`.

# mlr3hyperband 0.4.3

Expand All @@ -32,23 +32,23 @@

# mlr3hyperband 0.4.0

* feat: New `adjust_minimum_budget` flag in `OptimizerSuccessiveHalving`. The
* feat: New `adjust_minimum_budget` flag in `OptimizerBatchSuccessiveHalving`. The
minimum budget is adjusted in the base stage to use the maximum budget in last
stage.
* feat: New `repetitions` parameter to specify the exact number of repetitions.
Replaced the `repeats` parameter.

# mlr3hyperband 0.3.0

* feat: `TunerHyperband` evaluates configurations of same budget across
* feat: `TunerBatchHyperband` evaluates configurations of same budget across
brackets in parallel now.
* feat: New `repeats` parameter to repeat runs of successive halving and
hyperband until termination.
* fix: Bug where maximization measures were minimized.

# mlr3hyperband 0.2.0

* feat: New `OptimizerHyperband` and `OptimizerSuccessiveHalving` optimizers.
* feat: New `OptimizerBatchHyperband` and `OptimizerBatchSuccessiveHalving` optimizers.

# mlr3hyperband 0.1.2

Expand Down
8 changes: 4 additions & 4 deletions R/OptimizerHyperband.R → R/OptimizerBatchHyperband.R
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#' @title Optimizer Using the Hyperband Algorithm

#' @include OptimizerSuccessiveHalving.R
#' @include OptimizerBatchSuccessiveHalving.R
#' @name mlr_optimizers_hyperband
#' @templateVar id hyperband
#'
#' @description
#' Optimizer using the Hyperband (HB) algorithm.
#' HB runs the [Successive Halving Algorithm][OptimizerSuccessiveHalving] (SHA) with different numbers of stating configurations.
#' HB runs the [Successive Halving Algorithm][OptimizerBatchSuccessiveHalving] (SHA) with different numbers of stating configurations.
#' The algorithm is initialized with the same parameters as Successive Halving but without `n`.
#' Each run of Successive Halving is called a bracket and starts with a different budget `r_0`.
#' A smaller starting budget means that more configurations can be tried out.
Expand Down Expand Up @@ -72,7 +72,7 @@
#'
#' @export
#' @template example_optimizer
OptimizerHyperband = R6Class("OptimizerHyperband",
OptimizerBatchHyperband = R6Class("OptimizerBatchHyperband",
inherit = OptimizerBatch,
public = list(

Expand Down Expand Up @@ -199,4 +199,4 @@ OptimizerHyperband = R6Class("OptimizerHyperband",
)

#' @include aaa.R
optimizers[["hyperband"]] = OptimizerHyperband
optimizers[["hyperband"]] = OptimizerBatchHyperband
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
#'
#' @export
#' @template example_optimizer
OptimizerSuccessiveHalving = R6Class("OptimizerSuccessiveHalving",
OptimizerBatchSuccessiveHalving = R6Class("OptimizerBatchSuccessiveHalving",
inherit = OptimizerBatch,
public = list(

Expand Down Expand Up @@ -179,4 +179,4 @@ OptimizerSuccessiveHalving = R6Class("OptimizerSuccessiveHalving",
)

#' @include aaa.R
optimizers[["successive_halving"]] = OptimizerSuccessiveHalving
optimizers[["successive_halving"]] = OptimizerBatchSuccessiveHalving
8 changes: 4 additions & 4 deletions R/TunerHyperband.R → R/TunerBatchHyperband.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' @title Tuner Using the Hyperband Algorithm
#'
#' @include OptimizerHyperband.R
#' @include OptimizerBatchHyperband.R
#' @name mlr_tuners_hyperband
#' @templateVar id hyperband
#'
Expand All @@ -25,20 +25,20 @@
#'
#' @export
#' @template example_tuner
TunerHyperband = R6Class("TunerHyperband",
TunerBatchHyperband = R6Class("TunerBatchHyperband",
inherit = TunerBatchFromOptimizerBatch,
public = list(

#' @description
#' Creates a new instance of this [R6][R6::R6Class] class.
initialize = function() {
super$initialize(
optimizer = OptimizerHyperband$new(),
optimizer = OptimizerBatchHyperband$new(),
man = "mlr3hyperband::mlr_tuners_hyperband"
)
}
)
)

#' @include aaa.R
tuners[["hyperband"]] = TunerHyperband
tuners[["hyperband"]] = TunerBatchHyperband
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' @title Hyperparameter Tuning with Successive Halving
#'
#' @include OptimizerSuccessiveHalving.R
#' @include OptimizerBatchSuccessiveHalving.R
#' @name mlr_tuners_successive_halving
#' @templateVar id successive_halving
#'
Expand All @@ -24,20 +24,20 @@
#'
#' @export
#' @template example_tuner
TunerSuccessiveHalving = R6Class("TunerSuccessiveHalving",
TunerBatchSuccessiveHalving = R6Class("TunerBatchSuccessiveHalving",
inherit = TunerBatchFromOptimizerBatch,
public = list(

#' @description
#' Creates a new instance of this [R6][R6::R6Class] class.
initialize = function() {
super$initialize(
optimizer = OptimizerSuccessiveHalving$new(),
optimizer = OptimizerBatchSuccessiveHalving$new(),
man = "mlr3hyperband::mlr_tuners_hyperband"
)
}
)
)

#' @include aaa.R
tuners[["successive_halving"]] = TunerSuccessiveHalving
tuners[["successive_halving"]] = TunerBatchSuccessiveHalving
4 changes: 2 additions & 2 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ Jamieson
Lisha
Mattermost
ORCID
OptimizerSuccessiveHalving
OptimizerBatchSuccessiveHalving
Parallelization
Rostamizadeh
SHA
StackOverflow
Stackoverflow
Talwalkar
TunerSuccessiveHalving
TunerBatchSuccessiveHalving
XGBoost
arXiv
bbotk
Expand Down
24 changes: 12 additions & 12 deletions man/mlr_optimizers_hyperband.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions man/mlr_optimizers_successive_halving.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions man/mlr_tuners_hyperband.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 579ad41

Please sign in to comment.