mlr-org / ParamHelpers

Helpers for parameters in black-box optimization, tuning and machine learning.
https://paramhelpers.mlr-org.com
Other
25 stars 9 forks source link

generateDesign ignores `fun` argument when augmenting(?) #224

Open mb706 opened 4 years ago

mb706 commented 4 years ago

Not sure, but this looks like a bug -- it should probably call fun instead of randomLHS?

jakob-r commented 4 years ago

I already came across this line and decided that it is probably a deliberate decision. This is only called if points got deleted because they do not fulfill the requirements. Also there is a specific augmentation strategy in lhs which also don't use here.

Also this is documented here: https://github.com/mlr-org/ParamHelpers/blob/c2d989ca6f90357e0a80dcf125686aeac626ad9e/R/generateDesign.R#L41-L46

Well, the last sentence is a blatant lie :laughing:

So I would say it's not really a bug. What is your opinion? I would just leave it like that and close this issue if you agree.

mb706 commented 4 years ago

I'm wondering why fun shouldn't just be called a second time. Does it not work with the other lhs::-functions? I'm thinking a user may want to have some biased sampling or call a custom function for some other reason, and would then be annoyed that his function doesn't get called again when augmenting.

jakob-r commented 4 years ago

Feel free to change it :slightly_smiling_face: Maybe the original author wants to have a word @berndbischl :wink: