Fix #201: focussearch now handles discrete vector parameters (cont.)#257
Fix #201: focussearch now handles discrete vector parameters (cont.)#257
Conversation
also general focussearch bugfixes
Parameters that have discrete vector params in their requirement can not be handled by infillOptFocus, so trying to do that now gives an error.
| to.del = sample(val.names, 1) | ||
| newmap = newmap[newmap != to.del] | ||
| names(newmap) = names(par$values) | ||
| discrete.vector.mapping[[dfindex]] <<- newmap |
There was a problem hiding this comment.
we need the updated discrete.vector.mapping outside of the lapply
| if (par$type %nin% c("discretevector", "logicalvector")) { | ||
| val.names = names(par$values) | ||
| # remove current val from delete options, should work also for NA | ||
| val.names = val.names[!sapply(par$values, identical, y=val)] # remember, 'val' can be any type |
| } | ||
| } else if (isDiscrete(par)) { | ||
| # randomly drop a level, which is not val | ||
| if (length(par$values) <= 1L) { |
| if(x$disc2 == "c") tmp3 = 500 | ||
| assert(is.list(x$discVec)) | ||
| assert(x$discVec[[1]] %in% c("a", "b", "c")) | ||
| assert(x$discScal %in% c("x", "y", "z")) |
There was a problem hiding this comment.
This is not what assert is for. Use expect_is/expect_true and expect_subset
|
i will take this now. |
15b7e6c to
9108ff2
Compare
9108ff2 to
d167503
Compare
|
Just had a look, a) general look/review afaik good2go now (if travis is green) |
0febb72 to
a1eb197
Compare
|
ping @berndbischl |
c3cfc07 to
9648acf
Compare
|
this is really not so good what happens here:
|
|
Okay. So we are waiting for the PR in ParamHelpers for "splitVectorParamsFunction" and then we will refactor the code. |
9648acf to
15b7e6c
Compare
I was not able to take over PR #202 and keep it there. But I was able to pull the branch here it is