View source: R/random_forest_model.R
model_rf | R Documentation |
Build a forecasting model for counts using random forest, benchmarked against our standard GLM approach. Forecasting for random forest is performed recursively so that we can compare models over the training data.
model_rf( dat, train_start, test_start, forecast_start, horizon, lag_order, seed = NULL )
dat |
Dataframe for a single species as prepared by prep_dat_glm. |
train_start |
First YrQtr for train set. |
test_start |
First YrQtr for test set. |
forecast_start |
First YrQtr for forecast set. |
horizon |
Number of survey periods to forecast. |
lag_order |
Number of lags to include in model. |
seed |
Optional seed to set so that random forest results can be replicated. |
Dataframe with random forest train/test predictions and glm benchmark train/test predictions.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.