View source: R/classif_mbrier.R
mbrier | R Documentation |
Measure to compare true observed labels with predicted probabilities in multiclass classification tasks.
mbrier(truth, prob, ...)
truth |
( |
prob |
( |
... |
( |
Brier score for multi-class classification problems with k
labels defined as
\frac{1}{n} \sum_{i=1}^n \sum_{j=1}^k (I_{ij} - p_{ij})^2.
I_{ij}
is 1 if observation x_i
has true label j
, and 0 otherwise.
p_{ij}
is the probability that observation x_i
belongs to class j
.
Note that there also is the more common definition of the Brier score for binary
classification problems in bbrier()
.
Performance value as numeric(1)
.
Type: "classif"
Range: [0, 2]
Minimize: TRUE
Required prediction: prob
Brier GW (1950). “Verification of forecasts expressed in terms of probability.” Monthly Weather Review, 78(1), 1–3. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1175/1520-0493(1950)078<0001:vofeit>2.0.co;2")}.
Other Classification Measures:
acc()
,
bacc()
,
ce()
,
logloss()
,
mauc_aunu()
,
mcc()
,
zero_one()
set.seed(1)
lvls = c("a", "b", "c")
truth = factor(sample(lvls, 10, replace = TRUE), levels = lvls)
prob = matrix(runif(3 * 10), ncol = 3)
colnames(prob) = levels(truth)
mbrier(truth, prob)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.