View source: R/get_predictions.R
get_predictions | R Documentation |
Returns model predictions from a model fitted with rf()
, rf_repeat()
, or rf_spatial()
.
get_predictions(model)
model |
A model produced by |
A vector with predictions, or median of the predictions across repetitions if the model was fitted with rf_repeat()
.
if(interactive()){ #loading example data data(plant_richness_df) #fitting a random forest model rf.model <- rf( data = plant_richness_df, dependent.variable.name = "richness_species_vascular", predictor.variable.names = colnames(plant_richness_df)[5:21], n.cores = 1, verbose = FALSE ) #get vector of predictions x <- get_predictions(rf.model) x }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.