predict_models: Predict models

Description Usage Arguments Value

View source: R/predict_models.R

Description

Predict models

Usage

1
2
predict_models(data, select_cols = NULL, blend = NULL,
  passed_args = NULL, occ_col = "occ", keep_models = TRUE, ...)

Arguments

data

A data frame with columns "model" and "test" containing the fitted models and test datasets, respectively.

select_cols

Columns to select.

blend

Default is NULL. Only has to be set when an mlist object has been fitted. Defines how model predictions are blended. Options: "average" for averaging predictions, or "logistic" for model stacking with logistic regression.

passed_args

Default is NULL. Only has to be set when an mlist object has been fitted. List of lists with arguments to be passed on to predict function (as used in do.call)

occ_col

Name of the response (occurence) column in data.

keep_models

Whether to keep the model objects in the output data frame. Can be set to FALSE to reduce object size.

...

arguments passed on to predict

Value

A data frame with added column "prediction" containing the model predictions.


juoe/sdmflow documentation built on Feb. 23, 2020, 7:38 p.m.