Skip to content

allow impute function to set extras attribute - #497

Open
mb706 wants to merge 4 commits into
mainfrom
imputefun_metainfo
Open

mb706 wants to merge 4 commits into
mainfrom
imputefun_metainfo

Conversation

@mb706

@mb706 mb706 commented Aug 28, 2020

Copy link
Copy Markdown
Contributor

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.

@jakob-r

jakob-r commented Sep 7, 2020

Copy link
Copy Markdown
Member

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.

@mb706

mb706 commented Nov 11, 2020

Copy link
Copy Markdown
Contributor Author

I will do this when I get around to it

@mb706

mb706 commented Nov 25, 2023

Copy link
Copy Markdown
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants