Learn R Programming

measures (version 0.3)

BrierScaled: Brier scaled

Description

Brier score scaled to [0,1], see http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3575184/.

Usage

BrierScaled(probabilities, truth, negative, positive)

Arguments

probabilities

[numeric] vector of predicted probabilities

truth

vector of true values

negative

negative class

positive

positive class

Examples

Run this code
# NOT RUN {
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
BrierScaled(probabilities, truth, negative, positive)
# }

Run the code above in your browser using DataLab