Brier {measures} | R Documentation |
Brier score
Description
The Brier score is defined as the quadratic difference between the probability and the value (1,0) for the class. That means we use the numeric representation 1 and 0 for our target classes. It is similiar to the mean squared error in regression. multiclass.brier is the sum over all one vs. all comparisons and for a binary classifcation 2 * brier.
Usage
Brier(probabilities, truth, negative, positive)
Arguments
probabilities |
[numeric] vector of predicted probabilities |
truth |
vector of true values |
negative |
negative class |
positive |
positive class |
Examples
n = 20
set.seed(125)
truth = as.factor(sample(c(1,0), n, replace = TRUE))
probabilities = runif(n)
response = as.factor(as.numeric(probabilities > 0.5))
positive = 1
negative = 0
Brier(probabilities, truth, negative, positive)
[Package measures version 0.3 Index]