View source: R/accuracy_metrics.R
mean_squared_error | R Documentation |
Mean squared error
mean_squared_error(
y,
y_hat,
return_agg = c("mean", "sum", "vector"),
na.rm = FALSE
)
y |
Vector of observations or ground-truths. |
y_hat |
Vector of predictions. |
return_agg |
Whether to return the |
na.rm |
A logical value indicating whether |
The mean (or total or vectorial) squared error between y
and y_hat
.
mean_squared_error(c(2.3, 4.2, 1.8), c(2.2, 4.6, 1.7))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.