brier_score | R Documentation |
Given the observed values and the predicted probabilites of categorical data (of at least two classes) computes the Brier Score.
brier_score(observed, probabilities, remove_na = TRUE)
observed |
( |
probabilities |
( |
remove_na |
( |
Brier score is computed as:
Where R is the number of possible classes in which the event can fall, and N the overall number of instances of all classes. f_ti is the predicted probability for class i. o_ti is 1 if it is i-th class in instant t, 0 otherwise.
A single numeric value with the Brier Score.
Other categorical_metrics:
accuracy()
,
categorical_summary()
,
confusion_matrix()
,
f1_score()
,
kappa_coeff()
,
math_mode()
,
matthews_coeff()
,
pccc()
,
pcic()
,
pr_auc()
,
precision()
,
recall()
,
roc_auc()
,
sensitivity()
,
specificity()
## Not run:
probs <- data.frame(a = c(0.7, 0.2), b = c(0.3, 0.8))
brier_score(factor(c("a", "b")), probs)
probs <- data.frame(
a = c(0.2, 0.8, 0.3),
b = c(0.3, 0.1, 0.3),
c = c(0.5, 0.1, 0.4),
)
brier_score(factor(c("a", "a", "c")), probs)
probs <- data.frame(a = 1, b = 0)
brier_score("a", probs)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.