View source: R/mark_model_s3.R
| ldmppr_mark_model | R Documentation |
ldmppr_mark_model objects store a fitted mark model and preprocessing
information used to predict marks at new locations and times.
These objects are typically returned by train_mark_model and can be
saved/loaded with save_mark_model and load_mark_model.
ldmppr_mark_model(
engine,
fit_engine = NULL,
xgb_raw = NULL,
recipe = NULL,
outcome = "size",
feature_names = NULL,
rasters = NULL,
info = list()
)
## S3 method for class 'ldmppr_mark_model'
print(x, ...)
## S3 method for class 'ldmppr_mark_model'
summary(object, ...)
## S3 method for class 'summary.ldmppr_mark_model'
print(x, ...)
## S3 method for class 'ldmppr_mark_model'
predict(
object,
new_data = NULL,
sim_realization = NULL,
raster_list = NULL,
scaled_rasters = FALSE,
xy_bounds = NULL,
include_comp_inds = FALSE,
competition_radius = 15,
edge_correction = "none",
seed = NULL,
...
)
save_mark_model(object, path, ...)
## S3 method for class 'ldmppr_mark_model'
save_mark_model(object, path, ...)
load_mark_model(path)
engine |
character string (currently |
fit_engine |
fitted engine object (e.g. |
xgb_raw |
raw xgboost payload (e.g. UBJ) used for rehydration. |
recipe |
a prepped recipes object used for preprocessing new data. |
outcome |
outcome column name (default |
feature_names |
(optional) vector of predictor names required at prediction time. |
rasters |
(optional) list of rasters used for prediction (e.g. for spatial covariates). |
info |
(optional) list of metadata. |
x |
an object of class |
... |
passed to methods. |
object |
a |
new_data |
a data frame of predictors (and possibly outcome columns).
Ignored when |
sim_realization |
optional simulation realization containing |
raster_list |
optional list of rasters used when |
scaled_rasters |
|
xy_bounds |
domain bounds |
include_comp_inds |
|
competition_radius |
positive numeric distance used when |
edge_correction |
edge correction for competition indices ( |
seed |
optional nonnegative integer seed. |
path |
path to an |
The model may be backed by different engines (currently "xgboost" and
"ranger"). For "xgboost", the object can store a serialized booster payload
to make saving/loading robust across R sessions.
print()prints a brief summary.
predict()returns numeric predictions for new data.
an object of class "ldmppr_mark_model".
print(ldmppr_mark_model): Print a brief summary of the mark model.
summary(ldmppr_mark_model): Summarize a mark model.
predict(ldmppr_mark_model): Predict marks for new data.
save_mark_model(ldmppr_mark_model): Save method for ldmppr_mark_model.
ldmppr_mark_model(): Create a mark model container.
print(summary.ldmppr_mark_model): Print a summary produced by summary.ldmppr_mark_model.
save_mark_model(): Save a mark model to disk.
load_mark_model(): Load a saved mark model from disk.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.