View source: R/rmw_predict_the_test_set.R
rmw_predict_the_test_set | R Documentation |
rmw_calculate_model
.rmw_predict_the_test_set
uses data withheld from the training of the
model and therefore can be used for investigating overfitting.
rmw_predict_the_test_set(model, df)
model |
A ranger model object from |
df |
Input data used to calculate |
Tibble.
Stuart K. Grange
# Load package
library(dplyr)
# Prepare example data
data_london_prepared <- data_london %>%
filter(variable == "no2") %>%
rmw_prepare_data()
# Use the test set for prediction
rmw_predict_the_test_set(
model_london,
df = data_london_prepared
)
# Predict, then produce a hex plot of the predictions
rmw_predict_the_test_set(
model_london,
df = data_london_prepared
) %>%
rmw_plot_test_prediction()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.