classifierplots icon indicating copy to clipboard operation
classifierplots copied to clipboard

Cant't understand the qbeta function in calibration_plot

Open liuhongwei2018 opened this issue 5 years ago • 1 comments

In the calibration.R, qbeta function was used to calculate true probability in the calibration_plot, such as "qbeta(c(llb=0.025, lb=0.25, y=0.5, ub=0.75, uub=0.965), 0.5+positive, 0.5+bucket_size-positive)". Sorry I can't understand that. Could you please provide some expanations or some papers. Thank you!

liuhongwei2018 avatar Sep 18 '19 09:09 liuhongwei2018

It should actually be 0.975 to be even on both sides... so there's a small issue there. It's using the fact that the beta function is the conjugate prior of the Bernoulli.

I believe this is sometimes called the Jeffreys interval, and it's a relatively standard way of calculating a binomial confidence interval. https://en.wikipedia.org/wiki/Binomial_proportion_confidence_interval#Wilson_score_interval--%20wikipedia

HuwCampbell avatar Sep 22 '19 07:09 HuwCampbell