brier: Compute Brier scores

View source: R/MPMutils.R

brierR Documentation

Compute Brier scores

Description

Compute Brier scores for a given dataset.

Usage

brier(data, status, k = 5, method = "CV", ...)

Arguments

data

An (n, m) matrix or data.frame with no outcome attribute.

status

A vector of length n, containing the outcome.

k

number of cross-validation iterations (default = 5).

method

One of the GenerateLearningsets methods, including: "LOOCV", "CV", "MCCV", and "bootstrap" (default = "CV").

...

Currently ignored.

Value

A vector of Brier scores of length n (one value per subject).

Author(s)

Fernando Palluzzi fernando.palluzzi@gmail.com

References

Slawski M, Daumer M, Boulesteix AL. CMA - a comprehensive Bioconductor package for supervised classification with high dimensional data. BMC Bioinformatics 9, 439 (2008). <https://doi.org/10.1186/1471-2105-9-439>

Brier GW. Verification of forecasts expressed in terms of probability. Monthly Weather Review. 1950;78(1):1-3. <https://doi.org/10.1175/1520-0493(1950)078<0001:VOFEIT>2.0.CO;2>

See Also

loss

Examples


# Extract a subset of 300 subjects and an outcome vector of length 30 
# from the default simulated dataset

x <- mosaic::sample(mpm.us, 300, replace = FALSE, prob = NULL)
y <- x$y
x <- x[, 2:15]
print(dim(x))
print(length(y))

# Compute brier scores
E <- brier(x, y)
print(quantile(E))


Morphonodepredictivemodel/morphonode documentation built on Feb. 15, 2023, 4:51 a.m.