mlrMBO icon indicating copy to clipboard operation
mlrMBO copied to clipboard

FocusSearch doesn't handle discrete vector parameters

Open mb706 opened this issue 8 years ago • 4 comments

In particular, I reliably get an error here when I have a discrete vector parameter, since val is a list and setdiff(val.names, val) can make val.names empty even when it was length(par$values) > 1L before.

Should I, in general, assume that mlrMBO wasn't designed to handle vector parameters and give up right now, or is this worth a fix?

mb706 avatar Mar 05 '16 20:03 mb706

Addendum: this is a bug anyway since to.del is a number and always ranges from 1 to length(par$values) - 1, no matter what val was.

mb706 avatar Mar 05 '16 22:03 mb706

As commented in PR #202, infillOptFocus cannot, in principle, handle parameters that have requirements depending on discrete vector parameters. One would need to either adapt something in ParamHelpers or automatically rewrite the requirements and decompose vector params into scalar params. This is a bit tricky, but I've done something similar here with the help of this function.

mb706 avatar Mar 07 '16 21:03 mb706

@berndbischl Please review PR #202 PR #257

jakobbossek avatar Sep 18 '16 23:09 jakobbossek

@berndbischl: ping

jakobbossek avatar Oct 26 '16 18:10 jakobbossek