mlr-org / bbotk

Black-box optimization framework for R.
https://bbotk.mlr-org.com
GNU Lesser General Public License v3.0
21 stars 9 forks source link

OptimInstance$eval_batch ignores .objective_multiplicator #108

Closed mb706 closed 3 years ago

mb706 commented 4 years ago

OptimInstance$objective_function multiplies objectives that should be maximized with -1, but $eval_batch does not.

(Also, I hope you guys thought this through with $objective_function returning a value that differs from what will be in the archive)

mb706 commented 4 years ago

P.S. This line would probably fail if a param has more than one tag (e.g. a tag that is neither "minimize" nor "maximize")

https://github.com/mlr-org/bbotk/blob/166e3e510ca28eb6ce4e0580de28f43b2a7ad911/R/OptimInstance.R#L55

jakob-r commented 4 years ago

OptimInstance$objective_function is just an interface so that you can use the OptimInstance from external optimizers like optim(). So we do not want to log the (eventually) negated output. In all other parts of bbotk we never negate y for the output. Do you have a suggestion how we can make this more clear / Do you still think there is something wrong?

PS: I will fix the tag issue.

jakob-r commented 4 years ago

Tag issue is fixed

mb706 commented 4 years ago

Some thoughts on this:

berndbischl commented 3 years ago
  • objective_multiplicator should probably be publicly accessible

this we can do

for the rest you would need to argue @mb706 why you really need this. atm interface and semantics seem clear to me. which is:

seems pretty clear and good to me?

be-marc commented 3 years ago

objective_multiplicator should probably be publicly accessible

Done by https://github.com/mlr-org/bbotk/commit/e142962c55c00e11b62e796166c0886782094d11.