Skip to contents

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.

Usage

clamp_predictions(model, pred)

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.

References

Phillips, S. J., Anderson, R. P., Dudík, M., Schapire, R. E., & Blair, M. E. (2017). Opening the black box: An open-source release of Maxent. Ecography. https://doi.org/10.1111/ecog.03049