bound_prediction {probably} | R Documentation |
Truncate a numeric prediction column
Description
For user-defined lower_limit
and/or upper_limit
bound, ensure that the values in the
.pred
column are coerced to these bounds.
Usage
bound_prediction(
x,
lower_limit = -Inf,
upper_limit = Inf,
call = rlang::current_env()
)
Arguments
x |
A data frame that contains a numeric column named |
lower_limit , upper_limit |
Single numerics (or |
call |
The call to be displayed in warnings or errors. |
Value
x
with potentially adjusted values.
Examples
data(solubility_test, package = "yardstick")
names(solubility_test) <- c("solubility", ".pred")
bound_prediction(solubility_test, lower_limit = -1)
[Package probably version 1.1.0 Index]