You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a model, predictors can be added via add_predictors . Currently this function supports only SpatRaster (and eventually stars) objects, but a case can be made that for very large predictors (talking several GBs), it is more efficient to directly supply the extracted covariates (which could also be prepared in any other way).
Reason is that internally predictors are extracted and saved as data.frame for projection, which however is inefficient for large Raster layers.
The alternative would be to supply an already extracted data.frame with predictors.
Predictions in that case will be conducted only with inference_only=TRUE setting in train(). Spatial predictions can then be done via scenario() |> add_predictors() |> project().
This way also tile predictors could be supplied, thus allowing for better parallization
Allow data.frames to be supplied to add_predictors
Check that projections and training work
Add unit test
The text was updated successfully, but these errors were encountered:
When creating a model, predictors can be added via
add_predictors
. Currently this function supports onlySpatRaster
(and eventuallystars
) objects, but a case can be made that for very large predictors (talking several GBs), it is more efficient to directly supply the extracted covariates (which could also be prepared in any other way).Reason is that internally predictors are extracted and saved as
data.frame
for projection, which however is inefficient for large Raster layers.The alternative would be to supply an already extracted
data.frame
with predictors.Predictions in that case will be conducted only with
inference_only=TRUE
setting intrain()
. Spatial predictions can then be done viascenario() |> add_predictors() |> project()
.This way also tile predictors could be supplied, thus allowing for better parallization
Allow data.frames to be supplied to
add_predictors
Check that projections and training work
Add unit test
The text was updated successfully, but these errors were encountered: