Skip to content

Commit

Permalink
docs: improve readme
Browse files Browse the repository at this point in the history
  • Loading branch information
be-marc committed Feb 10, 2022
1 parent d788050 commit 9f211d7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ learner = lrn("classif.rpart",
# create graph learner with subsampling
graph_learner = as_learner(po("subsample") %>>% learner)
# tag budget parameter
# increase subsample rate from ~ 3.4% to 100%
graph_learner$param_set$values$subsample.frac = to_tune(p_dbl(3^-3, 1, tags = "budget"))
# set parallel backend
Expand Down Expand Up @@ -145,7 +145,8 @@ objective = ObjectiveRFun$new(
)
# optimize branin function with hyperband
result = bb_optimize(objective, method = "hyperband", search_space = search_space, term_evals = NULL, eta = 2)
result = bb_optimize(objective, method = "hyperband", search_space = search_space,
term_evals = NULL, eta = 2)
# optimized parameters
result$par
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ learner = lrn("classif.rpart",
# create graph learner with subsampling
graph_learner = as_learner(po("subsample") %>>% learner)

# tag budget parameter
# increase subsample rate from ~ 3.4% to 100%
graph_learner$param_set$values$subsample.frac = to_tune(p_dbl(3^-3, 1, tags = "budget"))

# set parallel backend
Expand Down Expand Up @@ -139,7 +139,8 @@ objective = ObjectiveRFun$new(
)

# optimize branin function with hyperband
result = bb_optimize(objective, method = "hyperband", search_space = search_space, term_evals = NULL, eta = 2)
result = bb_optimize(objective, method = "hyperband", search_space = search_space,
term_evals = NULL, eta = 2)

# optimized parameters
result$par
Expand Down

0 comments on commit 9f211d7

Please sign in to comment.