
Invert the target transform without letting it explode
Source:R/target_transform.R
invert_target_transform.RdClamps to the calibration range on the modelling scale BEFORE exponentiating, then inverts. For untransformed properties the clamp still applies, which costs nothing and keeps predictions physically plausible.
Arguments
- y_hat
Numeric vector of predictions on the modelling scale
- prop
Property name
- bounds
List from
target_bounds(), orNULLto skip clamping (which restores the old, unbounded behaviour)- floor_zero
Clamp the result at 0 for non-negative properties (default
TRUE; concentrations cannot be negative)