Description Usage Arguments Details See Also Examples
explained_variation
computes the percentage of variation in one numeric vector
explained by another, also known as the coefficient of determination.
1 | explained_variation(actual, predicted)
|
actual |
The ground truth numeric vector. |
predicted |
The predicted numeric vector, where each element in the vector
is a prediction for the corresponding element in |
explained_variation
subtracts the relative squared error, rse(actual, predicted)
,
from 1, meaning it can return negative values if the predictions are on average further from
the actual values than predictions from a naive model that predicts the mean for every data
point.
1 2 3 | actual <- c(1.1, 1.9, 3.0, 4.4, 5.0, 5.6)
predicted <- c(0.9, 1.8, 2.5, 4.5, 5.0, 6.2)
explained_variation(actual, predicted)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.