Description Usage Arguments Value See Also Examples
Returns the proportion of deviance explained by the predictions. Note: Predictions should be annualized (independent of exposure) Note: high is good. 1 is perfect model, 0 is null model, negative is worse than null model
1 2 3 4 5 6 7 8 9 |
actual |
Array[Numeric] - Values we are aiming to predict. |
predicted |
Array[Numeric] - Values that we have predicted. |
weight |
Optional: Array[Numeric] - Weighting of predictions. If NULL even weighting is used |
family |
String - family of distribution. Must be in |
na.rm |
Optional: boolean - If |
rebase |
Optional: boolean - If |
tweedie_power |
Numeric - power of tweedie distribution if chosen in |
Numeric: value of proportion of deviance
Other Metrics:
metric_deviance()
,
metric_mae()
,
metric_nloglik()
,
metric_pove()
,
metric_rmse()
1 2 3 4 5 6 7 8 | set.seed(666)
actual <- rnorm(n = 10, mean = 10, sd = 3)
predicted <- actual + rnorm(n = 10, mean = 0, sd = 1)
weight <- pmax(rnorm(n = 10, mean = 10, sd = 1) , 0)
metric_pode(actual, predicted)
metric_pode(actual, predicted, weight)
metric_pode(actual, predicted, weight, family="gamma")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.