mlrMBO icon indicating copy to clipboard operation
mlrMBO copied to clipboard

allow impute function to set extras attribute

Open mb706 opened this issue 3 years ago • 3 comments

Allow things like

makeMBOControl(
    impute.y.fun = function(x, y, opt.path, ...) {
      structure(-log(1/4), extras = list(metainfo = 2))  # log loss of dumbest possible prediction for 4 classes (i.e. nucleotide prediction)
    }, ...
)

otherwise, setting extras attribute in the actual function gives an error whenever a value is imputed, since opt.path doesn't allow points to have missing "extra(s)" for individual points.

mb706 avatar Aug 28 '20 08:08 mb706

Would you include that in a test? Does not have to be a new one. You could just add the extras into an existing one.

jakob-r avatar Sep 07 '20 10:09 jakob-r

I will do this when I get around to it

mb706 avatar Nov 11 '20 17:11 mb706

@jakob-r this has tests now, you can merge it when / if you are making a new release for CRAN...

mb706 avatar Nov 25 '23 21:11 mb706