calibScores: Calibration, sharpness, consistency and adaptativity scores

View source: R/calibScores.R

calibScoresR Documentation

Calibration, sharpness, consistency and adaptativity scores

Description

Calibration, sharpness, consistency and adaptativity scores

Usage

calibScores(E, u, X = NULL, nBin = NULL, intrv = NULL)

Arguments

E

(vector) errors

u

(vector) prediction uncertainties

X

(vector/matrix) input features / coordinates (default: 'NULL')

nBin

(integer) number of bins used for statistics (default: 'sqrt(length(E))'). Superseded by 'intrv$nbr' if present.

intrv

(list) intervals generated by 'genIntervals' (default: 'NULL')

Value

A list containing z-scores based statistics(Scal, Su, SX and Stot), ENCE (enceu, enceX) and UCE (uceu, uceX) calibration errors, the NLL and its calibration and sharpness components (nll, calib, sharp). The presence and length of SX, enceX and uceX match the presence and column number of X.

Examples


  uE = sqrt(rchisq(1000, df = 4))  # Re-scale uncertainty
  E  = rnorm(uE, mean=0, sd=uE)    # Generate errors
  calibScores(E, uE)


ppernot/ErrViewLib documentation built on June 1, 2024, 4:33 a.m.