Produces a set of points for a calibration plot.
getcal(
y,
ypred,
n = 10,
kernel = FALSE,
kernel_sd = 0.05,
alpha = 0.05,
c0 = 0,
c2 = 0.1
)
a list with components x (expected calibration), y (observed calibration), n (number of samples in bins, if relevant), lower/upper (confidence interval on y)
class labels, 0/1 or logical
predictions Pr(Y=1), numeric vector
number of subintervals/points
set to TRUE to use kernel method
kernel width for kernel method; see above
return a pointwise confidence envolope for conservative 1-alpha confidence interval
for computing maximum bias; assume true covariance function is of the form a0+ a1x + a2x^2, with |a0|<c0, |a2|<c2 (c1 does not matter)
for computing maximum bias; assume true covariance function is of the form a0+ a1x + a2x^2, with |a0|<c0, |a2|<c2 (c1 does not matter)
Uses either a binning method or a kernel method to determine height of points.
In both methods, considers n equally spaced subintervals of (0,1)