squared | R Documentation |
Calculates square distances from the true outcome, i.e. squared differences between the outcome and fitted class probability as defined in the formula of the Brier score.
squared(x, ...)
## S3 method for class 'predx'
squared(x, ...)
## S3 method for class 'caretx'
squared(x, newdata = NULL, ...)
x |
|
... |
extra arguments passed to methods, currently none. |
newdata |
test data set (optional). |
The sum of squared distances between fitted and outcome over
all observations is the Brier score, which ranges from 0 to 1 for binary
classification models and from 0 to 2 for multi-class classifiers.
In each case, 0 indicates a perfect concordance, while 1 or 2
(binary or multi level) hallmarks a completely false prediction.
For regression, squared working residuals are returned.
squared()
is a S3 generic function.
For predx
objects, a data frame with
the columns .outcome
and .fitted
representing the true outcome
and predicted class assignment, respectively, and square_dist
with the
squared distance from the outcome.
Brier GW. VERIFICATION OF FORECASTS EXPRESSED IN TERMS OF PROBABILITY. Mon Weather Rev (1950) 78:1–3. doi:10.1175/1520-0493(1950)078<0001:vofeit>2.0.co;2
Goldstein-Greenwood J. A Brief on Brier Scores | UVA Library. (2021) Available at: https://library.virginia.edu/data/articles/a-brief-on-brier-scores
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.