You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While the inclusion criteria are, strictly speaking, not (yet) fulfilled, I think that this approach adds value. There are, however, 2 critical questions
Where to stop: There are infinitely many distributions on [0, 1] and all of them could be used for calibration.
Ah, sorry - I wasn't aware of the inclusion criteria; those seem sensible. As you probably also saw, the two beta calibration papers together are currently slightly below 200 citations.
Regarding 1 (where to stop): don't the inclusion criteria precisely say where to stop? I.e., calibration approaches should be i) relatively widely used/cited, and ii) provide clear benefits over existing approaches? Beta calibration seems to check both marks, since it (as I understand it) subsumes logistic regression and is clearly superior in many cases, including the important case of an already well-calibrated model. They have quite extensive experiments in their papers showing the superiority.
The only other calibration methods that might check these boxes and that I can immediately think of would be BBQ and maybe this more recent method, so I think it's not like you'd be opening the floodgates to dozens of calibration methods. (I might be completely wrong about that, though...)
Regarding 2: Sure, that makes sense. Should I contact them and ask whether they would like for it to be included here?
One other thing I just noticed: beta calibration is only specified for the binary classification case. (They do have an equally well-cited extension for the multivariate case, and code is also available for that, but that would probably be a separate discussion.) Both current methods in CalibratedClassifierCV apparently also support the multivariate case. (Cool!) Would it be a problem to add a method that only works in the binary case?
In any case it's your call, of course, and I also understand if you consider this too experimental / niche.
To give some background / motivation for this, I was basically just looking for a simple but reasonable calibration method in the low-data regime where isotonic regression is not applicable. Beta calibration seemed an attractive option for this, while LR has significant limitations.
As a member of the research group of the Beta calibration paper, allow me to expand on the previous discussion.
Inclusion criteria: As of today (22/01/2024) both papers are more than 3 years old and have more than 200 citations together [1,2]. To be more precise, the original paper [1] was invited to be extended to the Electronic Journal of Statistics [2]. This is the reason that the citations are split into two papers.
Proposed solution: Include an additional method beta indicating that it is a parametric method that can be used for probabilistic models with finite support (0,1). The method has 3 parameters to be fitted, but we proposed a 2 parameter and 1 parameter version by forcing additional constraints. Given the simplicity of scikit-learn, this could be choosen by an internal cross-validation, or could be a user option.
Regarding the multiclass setting: The existing methods in scikit-learn (sigmoid and isotonic) and the proposed method beta are all intended to be used in binary classification and are commonly extended to multiclass in a one-vs-the-rest manner with an additional step of normalisation (which is not the correct solution). As a co-author of Dirichlet calibration we would also be happy to add this method for the multiclass case. The method is more than 3 years old and has more than 200 citations [3]. However, I assume this should be discussed in another issue.
EDIT: Corrected explanation about [2] being published after [1].
References
[1] Beta calibration: a well-founded and easily implemented improvement on logistic calibration for binary classifiers M Kull, T Silva Filho, P Flach. Proceedings of the 20th International Conference on Artificial Intelligence and Statistics, PMLR 54:623-631, 2017. (157 citations in Google Scholar)
[2] Beyond sigmoids: How to obtain well-calibrated probabilities from binary classifiers with beta calibration M Kull, TM Silva Filho, P Flach, Electron. J. Statist. 11 (2) 5052 - 5080, 2017. https://doi.org/10.1214/17-EJS1338SI (86 citations in Google Scholar)
[3] Beyond temperature scaling: Obtaining well-calibrated multi-class probabilities with dirichlet calibration M Kull, M Perello Nieto, M Kängsepp, T Silva Filho, H Song, P Flach Advances in neural information processing systems 32, 2019 (273 citations in Google Scholar)
Reacted by Eike Petersen, Yo Hsiao and Olivier Grisel
Citation-wise, it is a bit on the boundary. I‘m personally inclined to include it as it is statistically sound and „the next best/simplest“ method after the logistic/Platt calibration.
Sigmoid should be applied only on classification models with infinite support
@perellonieto Could you explain what you mean? And how it differs from beta calibration?
As you said, multiclass calibration is best discussed in a new separate issue.
In most cases, what matters for an application is to define well the utility associated with predictions and potential decisions. Knowing this utility enables making educated choices on the pipeline. Calibration is only an intermediate step here and a proxy on the final benefits (an incomplete one). The main calibration methods often work well enough here and to go further what matters is to understand downstream logic.
My feelings are echoed in the analysis of business logics and data science at booking.com (published here https://dl.acm.org/doi/10.1145/3292500.3330744 ), where an interesting tidebit is the mention that performance on internal benchmark correlated weakly with business value.
Do you argue against inclusion?
I do. Each line of code that we add to scikit-learn leads to a maintenance cost and makes the library harder to move forward (eg supporting more compute backends). I believe that beta calibration will provide limited value to most users and we should focus on other things.
In addition, I worry about the problem of crowding in the library: the forest hiding the tree. Having a small number of well documented and well explained choices probably helps users asking the right questions.
Activity
lorentzenchr commentedon Feb 10, 2023
While the inclusion criteria are, strictly speaking, not (yet) fulfilled, I think that this approach adds value. There are, however, 2 critical questions
e-pet commentedon Feb 10, 2023
Ah, sorry - I wasn't aware of the inclusion criteria; those seem sensible. As you probably also saw, the two beta calibration papers together are currently slightly below 200 citations.
Regarding 1 (where to stop): don't the inclusion criteria precisely say where to stop? I.e., calibration approaches should be i) relatively widely used/cited, and ii) provide clear benefits over existing approaches? Beta calibration seems to check both marks, since it (as I understand it) subsumes logistic regression and is clearly superior in many cases, including the important case of an already well-calibrated model. They have quite extensive experiments in their papers showing the superiority.
The only other calibration methods that might check these boxes and that I can immediately think of would be BBQ and maybe this more recent method, so I think it's not like you'd be opening the floodgates to dozens of calibration methods. (I might be completely wrong about that, though...)
Regarding 2: Sure, that makes sense. Should I contact them and ask whether they would like for it to be included here?
One other thing I just noticed: beta calibration is only specified for the binary classification case. (They do have an equally well-cited extension for the multivariate case, and code is also available for that, but that would probably be a separate discussion.) Both current methods in CalibratedClassifierCV apparently also support the multivariate case. (Cool!) Would it be a problem to add a method that only works in the binary case?
In any case it's your call, of course, and I also understand if you consider this too experimental / niche.
To give some background / motivation for this, I was basically just looking for a simple but reasonable calibration method in the low-data regime where isotonic regression is not applicable. Beta calibration seemed an attractive option for this, while LR has significant limitations.
perellonieto commentedon Jan 22, 2024
As a member of the research group of the Beta calibration paper, allow me to expand on the previous discussion.
Inclusion criteria: As of today (22/01/2024) both papers are more than 3 years old and have more than 200 citations together [1,2]. To be more precise, the original paper [1] was invited to be extended to the Electronic Journal of Statistics [2]. This is the reason that the citations are split into two papers.
Current alternative: As one of the main developers of the existing library (https://github.com/betacal/python/) , we would be happy to include our code in scikit-learn. If necessary, I could help with the integration.
Current calibration methods in scikit-learn: The current methods in scikit-learn (https://scikit-learn.org/stable/modules/generated/sklearn.calibration.CalibratedClassifierCV.html#sklearn.calibration.CalibratedClassifierCV) are
sigmoidandisotonic. Sigmoid should be applied only on classification models with infinite support, and isotonic being non-parametric requires more data than Beta calibration (three, two, or even one parameter). Beta calibration could be added using the current implementation of Platt's scaling (we use the scikit-learn implementation of Logistic Regresssion).Proposed solution: Include an additional method
betaindicating that it is a parametric method that can be used for probabilistic models with finite support (0,1). The method has 3 parameters to be fitted, but we proposed a 2 parameter and 1 parameter version by forcing additional constraints. Given the simplicity of scikit-learn, this could be choosen by an internal cross-validation, or could be a user option.Regarding the multiclass setting: The existing methods in scikit-learn (
sigmoidandisotonic) and the proposed methodbetaare all intended to be used in binary classification and are commonly extended to multiclass in a one-vs-the-rest manner with an additional step of normalisation (which is not the correct solution). As a co-author of Dirichlet calibration we would also be happy to add this method for the multiclass case. The method is more than 3 years old and has more than 200 citations [3]. However, I assume this should be discussed in another issue.EDIT: Corrected explanation about [2] being published after [1].
References
[1] Beta calibration: a well-founded and easily implemented improvement on logistic calibration for binary classifiers M Kull, T Silva Filho, P Flach. Proceedings of the 20th International Conference on Artificial Intelligence and Statistics, PMLR 54:623-631, 2017. (157 citations in Google Scholar)
[2] Beyond sigmoids: How to obtain well-calibrated probabilities from binary classifiers with beta calibration M Kull, TM Silva Filho, P Flach, Electron. J. Statist. 11 (2) 5052 - 5080, 2017. https://doi.org/10.1214/17-EJS1338SI (86 citations in Google Scholar)
[3] Beyond temperature scaling: Obtaining well-calibrated multi-class probabilities with dirichlet calibration M Kull, M Perello Nieto, M Kängsepp, T Silva Filho, H Song, P Flach Advances in neural information processing systems 32, 2019 (273 citations in Google Scholar)
lorentzenchr commentedon Feb 11, 2024
@scikit-learn/core-devs This meeds a decision.
Citation-wise, it is a bit on the boundary. I‘m personally inclined to include it as it is statistically sound and „the next best/simplest“ method after the logistic/Platt calibration.
@perellonieto Could you explain what you mean? And how it differs from beta calibration?
As you said, multiclass calibration is best discussed in a new separate issue.
jjerphan commentedon Feb 12, 2024
Is a sklibration package probabl?
GaelVaroquaux commentedon Feb 12, 2024
lorentzenchr commentedon Feb 12, 2024
@GaelVaroquaux Could you expand a bit? Do you argue against inclusion?
GaelVaroquaux commentedon Feb 12, 2024