-
Notifications
You must be signed in to change notification settings - Fork 15
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
limit the range of numeric predictions #142
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good😎
In general, I think the arguments to this function would be well-served by the rlang type checkers. There are a good few edge cases (>1-length numeric to upper_limit, non-data-frame x) that would be caught by those utilities, and their messages are quite informative.
library(dplyr) | ||
library(rlang) | ||
data("solubility_test", package = "modeldata") | ||
tune2 <- function() call("tune", "test") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this function ever going to have to deal with tune()
values. I guess I'm using my mental model from parsnip here, where upstream packages take care of tune()
calls before we send specs off to fit()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might erroneously receive that from users. I'd err on the side of over-checking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added an error for these values (instead of just passing)
Co-authored-by: Simon P. Couch <[email protected]>
Just added them. This would be a good set of issues for TDD 🥳 |
Co-authored-by: Simon P. Couch <[email protected]>
A simple post-processor that can cap the range of predicted values form regression models.