Brier score for binary classification problems defined as $$
\frac{1}{n} \sum_{i=1}^n w_i (I_i - p_i)^2.
$$
Note that this (more common) definition of the Brier score is equivalent to the
original definition of the multi-class Brier score (see mbrier()) divided by 2.
(factor())
True (observed) labels.
Must have the exactly same two levels and the same length as response.
prob
(numeric())
Predicted probability for positive class.
Must have exactly same length as truth.
positive
(character(1))
Name of the positive class.
sample_weights
(numeric())
Vector of non-negative and finite sample weights.
Must have the same length as truth.
The vector gets automatically normalized to sum to one.
Defaults to equal sample weights.