Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow impute function to set extras attribute #497

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

mb706
Copy link
Contributor

@mb706 mb706 commented Aug 28, 2020

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
Copy link
Member

jakob-r commented Sep 7, 2020

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
Copy link
Contributor Author

mb706 commented Nov 11, 2020

I will do this when I get around to it

@mb706
Copy link
Contributor Author

mb706 commented Nov 25, 2023

@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