To limit extreme extrapolation it is possible to 'clamp'
an existing projection to the range of predictor values observed during model
training. This function takes an internal model matrix and restricts the
values seen in the predictor matrix to those observed during training.
Arguments
- model
A
list
with the input data used for inference. Created during model setup.- pred
An optional
data.frame
of the prediction container.
Value
A data.frame
with the clamped predictors.
Note
This function is meant to be used within a certain "engine"
or
within project
.