rmw_predict | R Documentation |
Function to predict using a ranger random forest.
rmw_predict(model, df = NA, se = FALSE, n_cores = NULL, verbose = FALSE)
model |
A ranger model object from |
df |
Input data to be used for predictions. |
se |
If |
n_cores |
Number of CPU cores to use for the model predictions. |
verbose |
Should the function give messages? |
Numeric vector or a named list containing two numeric vectors.
Stuart K. Grange
# Load package
library(dplyr)
# Prepare example data
data_london_prepared <- data_london %>%
filter(variable == "no2") %>%
rmw_prepare_data()
# Make a prediction with the examples
vector_prediction <- rmw_predict(
model_london,
df = data_london_prepared
)
# Make a prediction with standard errors too
list_prediction <- rmw_predict(
model_london,
df = data_london_prepared,
se = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.