mean_absolute_error | R Documentation |
mean_absolute_error()
estimates the mean absolute error for the
desired loss unit.
mean_absolute_error(pred, data.valid, y, L2.unit)
pred |
Predictions of outcome. A numeric vector of outcome predictions. |
data.valid |
Test data set. A tibble of data that was not used for prediction. |
y |
Outcome variable. A character vector containing the column names of the outcome variable. |
L2.unit |
Geographic unit. A character scalar containing the column name
of the geographic unit in |
Returns a tibble containing two mean absolute prediction errors. The first is measured at the level of individuals and the second is measured at the context level. The tibble dimensions are 2x3 with variables: measure, value and level.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.