Skip to content

Commit

Permalink
remove DiceOptim from suggests (#492)
Browse files Browse the repository at this point in the history
* remove DiceOptim from suggests

* various fixes

* revert unwanted tic change
  • Loading branch information
jakob-r authored May 22, 2020
1 parent 4c60cc9 commit efc63c9
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ Suggests:
cmaesr (>= 1.0.3),
ggplot2,
DiceKriging,
DiceOptim,
earth,
emoa,
GGally,
Expand All @@ -52,6 +51,7 @@ Suggests:
nnet,
party,
randomForest,
reshape2,
rmarkdown,
rgenoud,
rpart,
Expand All @@ -60,5 +60,5 @@ Suggests:
LazyData: yes
Encoding: UTF-8
ByteCompile: yes
RoxygenNote: 7.0.2
RoxygenNote: 7.1.0
VignetteBuilder: knitr
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ S3method(print,MBOExampleRunMultiObj)
S3method(print,MBOInfillCrit)
S3method(print,MBOMultiObjResult)
S3method(print,MBOResult)
S3method(print,OptState)
S3method(renderExampleRunPlot,MBOExampleRun)
S3method(renderExampleRunPlot,MBOExampleRunMultiObj)
export(crit.aei)
Expand Down
3 changes: 2 additions & 1 deletion R/OptState.R
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ makeOptState = function(opt.problem, loop = 0L, tasks = NULL, models = NULL,

opt.state$random.seed = getRandomSeed()
opt.state$time.created = time.created
class(opt.state) = append(class(opt.state), "OptState")
class(opt.state) = append("OptState", class(opt.state))
opt.state
}

Expand Down Expand Up @@ -122,6 +122,7 @@ makeOptStateMboResult = function(opt.state) {
mbo.result
}

#' @export
print.OptState = function(x, ...) {
catf("OptSate")
catf("Actual state: %s", getOptStateState(x))
Expand Down
4 changes: 3 additions & 1 deletion man/trafos.Rd

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

4 changes: 2 additions & 2 deletions tests/testthat/test_check_design.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ test_that("test checks for initial design and new design", {
expect_true(any(checked))
expect_true(any(!checked))

design = data.frame(x = c("a", "b"))
new.design = data.frame(x = c("a", "c", "b", "d", "a", NA))
design = data.frame(x = c("a", "b"), stringsAsFactors = TRUE)
new.design = data.frame(x = c("a", "c", "b", "d", "a", NA), stringsAsFactors = TRUE)
expect_equal(checkPredictionData(new.design, design),
c(TRUE, FALSE, TRUE, FALSE, TRUE, FALSE))
})
1 change: 1 addition & 0 deletions tests/testthat/test_smbo.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ test_that("human in the loop smbo works", {
ctrl = makeMBOControl()

opt.state = initSMBO(par.set = ps, design = des, control = ctrl)
expect_output(print(opt.state), "init")
prop = proposePoints(opt.state)
expect_list(prop)
expect_data_frame(prop$prop.points)
Expand Down

0 comments on commit efc63c9

Please sign in to comment.