limit the range of numeric predictions#142
Conversation
simonpcouch
left a comment
There was a problem hiding this comment.
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.
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.
It might erroneously receive that from users. I'd err on the side of over-checking
There was a problem hiding this comment.
I added an error for these values (instead of just passing)
Co-authored-by: Simon P. Couch <simonpatrickcouch@gmail.com>
Just added them. This would be a good set of issues for TDD 🥳 |
Co-authored-by: Simon P. Couch <simonpatrickcouch@gmail.com>
A simple post-processor that can cap the range of predicted values form regression models.