Skip to content

Commit 677d211

Browse files
committed
Merge branch 'master' into feature_noisy
2 parents d8dc631 + 5db3127 commit 677d211

File tree

185 files changed

+6255
-2749
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+6255
-2749
lines changed

.Rbuildignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@
1616
^vignettes/.+_cache$
1717
^vignettes/.+_files$
1818
^vignettes/.+\.html$
19+
.github
20+
.covrignore

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ src/*.so
1010
plots
1111
tests/testthat/Rplots.pdf
1212
*.sublime-*
13-
vignettes/*_cache/
1413
vignettes/*_files/
1514
vignettes/*.html
1615
vignettes/*.R
17-
docs/articles/*_cache/
16+
*_cache
1817
.Rproj.user

.travis.yml

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,44 @@
11
language: r
2+
dist: trusty
23
sudo: false
34
cache: packages
4-
55
r:
6-
- release
7-
- devel
8-
9-
r_github_packages:
10-
- jimhester/covr
11-
6+
- release
7+
- devel
8+
r_packages:
9+
- devtools
10+
- animation #vignettes: animation.Rmd
11+
- e1071 #vignette: machine_learning_with_mlrmbo.Rmd
12+
- pkgdown
13+
- covr
14+
addons:
15+
apt:
16+
packages:
17+
- imagemagick
1218
env:
19+
matrix:
20+
- _R_CHECK_LENGTH_1_CONDITION_=true
1321
global:
14-
- secure: "e2QLomaUqNvpHnGNdBXS4VO2/UWokrKl9UgYrqWo+fhpXaJiJuONNPNL44BuWZR2Cy7noTHrevVbTKBkGpqJR42mkjzcjd6qyR1Ctiveir+84/HTtmexouIUn5OFRH5dgyt/gquld31RlHlSYoKho3nZ7D7SnVExov9tp2FGRhU="
15-
16-
# commented out because this call always needed 10+ minutes and time outed for travis
22+
secure: efki/PoCvROHC5GMOWqL3hiYeU/no71mnw927ZLF/D0eo3L0aBjT6533KWy3S8w+kg4ilgZzoS5/Nu6PuVFmfPmOiXKj95ZZVkuHDjnAiBFPsowneruOAYNMpwGlM1A3Z3T6jTjtX+FtvlgukhVNrkNoXFy5SmZ5pclic0Z7zfM=
23+
before_script:
24+
- R --no-save <<< 'library("devtools"); document()'
1725
after_success:
18-
- Rscript -e 'covr::codecov()'
26+
- 'if [[ "$TRAVIS_PULL_REQUEST" == "false" && "$TRAVIS_BRANCH" == "master" && "$TRAVIS_R_VERSION_STRING" == "release" && "$TRAVIS_EVENT_TYPE" != "cron" ]] ; then
27+
R --no-save <<< "devtools::install(); pkgdown::build_site()";
28+
git checkout master;
29+
export TRAVIS_COMMIT_MSG="$(git log --format=%B --no-merges -n 1)";
30+
git config --global user.name "Travis CI";
31+
git config --global user.email "$COMMIT_AUTHOR_EMAIL";
32+
git config credential.helper "store --file=.git/credentials";
33+
echo "https://${GH_TOKEN}:@github.com" >> .git/credentials;
34+
git config push.default matching;
35+
git add --force man/*;
36+
git add --force README.md;
37+
git add --force docs/*;
38+
git rm -r --cached $(find . -type d -name "*_cache");
39+
git commit man DESCRIPTION NAMESPACE README.md docs -m "update auto-generated documentation [ci skip]" -m "$TRAVIS_COMMIT_MSG" || true;
40+
git push;
41+
fi;'
42+
- 'if [[ "$TRAVIS_R_VERSION_STRING" == "devel" && "$TRAVIS_EVENT_TYPE" != "cron" ]] ; then
43+
Rscript -e "covr::coveralls()";
44+
fi;'

DESCRIPTION

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
Package: mlrMBO
2-
Title: A Toolbox for Model-Based Optimization of Expensive Black-Box Functions
2+
Title: Bayesian Optimization and Model-Based Optimization of Expensive Black-Box Functions
33
Description: Flexible and comprehensive R toolbox for model-based optimization
4-
('MBO'), also known as Bayesian optimization. It is designed for both single-
5-
and multi-objective optimization with mixed continuous, categorical and
6-
conditional parameters. The machine learning toolbox 'mlr' provide dozens
7-
of regression learners to model the performance of the target algorithm with
8-
respect to the parameter settings. It provides many different infill criteria
9-
to guide the search process. Additional features include multi-point batch
10-
proposal, parallel execution as well as visualization and sophisticated
11-
logging mechanisms, which is especially useful for teaching and understanding
12-
of algorithm behavior. 'mlrMBO' is implemented in a modular fashion, such that
13-
single components can be easily replaced or adapted by the user for specific use
14-
cases.
4+
('MBO'), also known as Bayesian optimization. It implements the Efficient
5+
Global Optimization Algorithm and is designed for both single- and multi-
6+
objective optimization with mixed continuous, categorical and conditional
7+
parameters. The machine learning toolbox 'mlr' provide dozens of regression
8+
learners to model the performance of the target algorithm with respect to
9+
the parameter settings. It provides many different infill criteria to guide
10+
the search process. Additional features include multi-point batch proposal,
11+
parallel execution as well as visualization and sophisticated logging
12+
mechanisms, which is especially useful for teaching and understanding of
13+
algorithm behavior. 'mlrMBO' is implemented in a modular fashion, such that
14+
single components can be easily replaced or adapted by the user for specific
15+
use cases.
1516
Authors@R: c(
16-
person("Bernd", "Bischl", email = "[email protected]", role = c("aut")),
17-
person("Jakob", "Bossek", email = "[email protected]", role = "aut"),
18-
person("Jakob", "Richter", email = "[email protected]", role = c("aut", "cre")),
17+
person("Bernd", "Bischl", email = "[email protected]", role = c("aut"), comment = c(ORCID = "0000-0001-6002-6980")),
18+
person("Jakob", "Richter", email = "[email protected]", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-4481-5554")),
19+
person("Jakob", "Bossek", email = "[email protected]", role = "aut", comment = c(ORCID = "0000-0002-4121-4668")),
1920
person("Daniel", "Horn", email = "[email protected]", role = "aut"),
20-
person("Michel", "Lang", email = "[email protected]", role = "aut"),
21-
person("Janek", "Thomas", email = "[email protected]", role = "aut"))
21+
person("Michel", "Lang", email = "[email protected]", role = "aut", comment = c(ORCID = "0000-0001-9754-0393")),
22+
person("Janek", "Thomas", email = "[email protected]", role = "aut", comment = c(ORCID = "0000-0003-4511-6245")))
2223
License: BSD_2_clause + file LICENSE
2324
URL: https://github.com/mlr-org/mlrMBO
2425
BugReports: https://github.com/mlr-org/mlrMBO/issues
@@ -52,13 +53,13 @@ Suggests:
5253
party,
5354
randomForest,
5455
rmarkdown,
56+
rgenoud,
5557
rpart,
5658
testthat,
57-
eaf,
5859
covr
5960
LazyData: yes
6061
Encoding: UTF-8
6162
ByteCompile: yes
62-
Version: 1.1.2
63+
Version: 1.1.3
6364
RoxygenNote: 6.0.1
6465
VignetteBuilder: knitr

NAMESPACE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Generated by roxygen2: do not edit by hand
22

3+
S3method(initCrit,InfillCritAdaCB)
34
S3method(initCrit,InfillCritCB)
45
S3method(initCrit,default)
56
S3method(plot,MBOMultiObjResult)
@@ -39,6 +40,7 @@ export(initSMBO)
3940
export(makeMBOControl)
4041
export(makeMBOInfillCrit)
4142
export(makeMBOInfillCritAEI)
43+
export(makeMBOInfillCritAdaCB)
4244
export(makeMBOInfillCritCB)
4345
export(makeMBOInfillCritDIB)
4446
export(makeMBOInfillCritEI)

NEWS.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# mlrMBO 1.1.2
2+
3+
* Adaptive infill criterions. Infill criterions now have to support an `progress` argument. Termination criterions now can supply a `progress` return value.
4+
* Fix for parEGO + EI (Issue #407)
5+
* `save.on.disk` now can take arbitrary numeric vectors to specify iterations, when to save on disk.
6+
* Spelling mistakes for infill criterions will now be cought. (Issue #417)
7+
18
# mlrMBO 1.1.1
29

310
* `makeMBOControl()` has `on.surrogate.error` argument which enables random proposals if the surrogate model fails.

R/OptState.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ NULL
3939
# @param time.used \code{integer(1)} \cr
4040
# The time in seconds we are already used for optimization since the very start.
4141
# This counts all iterations together and is necessary for continuation with a given time budget.
42+
# @param progress \code{numeric(1)} \cr
43+
# The progress in percent determined by the termination criterion.
4244

4345
# IMPORTANT NOTE:
4446
# See this as a constructor and it's variables as member variables.
@@ -48,7 +50,7 @@ NULL
4850

4951
makeOptState = function(opt.problem, loop = 0L, tasks = NULL, models = NULL,
5052
time.model = NULL, opt.result = NULL, state = "init", opt.path = NULL,
51-
time.last.saved = Sys.time(), loop.starttime = Sys.time(), time.used = 0L, time.created = Sys.time()) {
53+
time.last.saved = Sys.time(), loop.starttime = Sys.time(), time.used = 0L, progress = 0, time.created = Sys.time()) {
5254

5355
opt.state = new.env()
5456

@@ -65,6 +67,7 @@ makeOptState = function(opt.problem, loop = 0L, tasks = NULL, models = NULL,
6567
opt.state$time.last.saved = time.last.saved
6668
opt.state$loop.starttime = loop.starttime
6769
opt.state$time.used = time.used
70+
opt.state$progress = progress
6871

6972
opt.state$random.seed = getRandomSeed()
7073
opt.state$time.created = time.created

R/OptState_getter.R

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ getOptStateTasks = function(opt.state) {
3434
tasks
3535
}
3636

37+
getOptStateDesigns = function(opt.state) {
38+
tasks = getOptStateTasks(opt.state)
39+
lapply(tasks, getTaskData)
40+
}
41+
3742
getOptStateTimeModel = function(opt.state) {
3843
opt.path = getOptStateOptPath(opt.state)
3944
time.model = opt.state$time.model
@@ -119,17 +124,23 @@ getOptStateState = function(opt.state) {
119124

120125
getOptStateTermination = function(opt.state) {
121126
terminate = shouldTerminate.OptState(opt.state)
127+
setOptStateProgress(opt.state, terminate$progress)
122128
# update only if termination condition is met
123129
if (terminate$term) {
124130
setOptStateState(opt.state, terminate$code)
125131
}
126132
terminate
127133
}
128134

135+
getOptStateProgress = function(opt.state) {
136+
opt.state$progress
137+
}
138+
129139
getOptStateValidStates = function() {
130140
c("init", "iter", getOptStateValidTerminationStates())
131141
}
132142

133143
getOptStateValidTerminationStates = function() {
134144
c("term.iter", "term.time", "term.exectime", "term.yval", "term.feval", "term.custom")
135145
}
146+

R/OptState_setter.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,9 @@ setOptStateState = function(opt.state, state) {
5858
opt.state$state = state
5959
invisible()
6060
}
61+
62+
setOptStateProgress = function(opt.state, progress) {
63+
assertNumber(progress, null.ok = TRUE)
64+
opt.state$progress = progress
65+
invisible()
66+
}

R/SMBO.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ updateSMBO = function(opt.state, x, y) {
6969
assertNumeric(y[[1]], len = control$n.objectives)
7070

7171

72-
infill.values = control$infill.crit$fun(points = x, models = getOptStateModels(opt.state)[[1]], control = control, design = convertOptPathToDf(opt.path, control), attributes = TRUE, iter = getOptStateLoop(opt.state))
72+
infill.values = control$infill.crit$fun(points = x, models = getOptStateModels(opt.state)[[1]], control = control, designs = getOptStateDesigns(opt.state), attributes = TRUE, iter = getOptStateLoop(opt.state))
7373

7474
prop = makeProposal(
7575
control = control,

0 commit comments

Comments
 (0)