Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

31 add support for conformalized bayes #32

Merged
merged 2 commits into from
Dec 1, 2022

Conversation

pat-alt
Copy link
Member

@pat-alt pat-alt commented Nov 29, 2022

No description provided.

@pat-alt pat-alt linked an issue Nov 29, 2022 that may be closed by this pull request
@codecov-commenter
Copy link

Codecov Report

Merging #32 (7dd1b4b) into main (479b94f) will decrease coverage by 8.27%.
The diff coverage is 10.00%.

@@            Coverage Diff             @@
##             main      #32      +/-   ##
==========================================
- Coverage   99.32%   91.04%   -8.28%     
==========================================
  Files           6        7       +1     
  Lines         297      324      +27     
==========================================
  Hits          295      295              
- Misses          2       29      +27     
Impacted Files Coverage Δ
src/ConformalModels/inductive_bayes.jl 0.00% <0.00%> (ø)
src/ConformalModels/inductive_classification.jl 98.41% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@pat-alt
Copy link
Member Author

pat-alt commented Nov 29, 2022

Some very early-stage work on this.

Initially attempted to just standardize/streamline the existing code base, which broadly distinguishes between regressors and classifiers. I thought that to deal with Bayesian models that can produce predictive densities, I'd just need to respecify the the score function as $s(x,y)=-f(y|x,D)$ following Section 2.4 in Angelopoulus (2021). The idea was to then be able to use all existing approaches to regression and classification as before with this new score function.

Unfortunately, this after all seems a little more difficult than anticipated for various reasons. For example, in the case of regression, one can no longer just form intervals based on the quantile $q(\{ s(x_i,y_i) \} _n)$ since the scores represent densities, not residuals. In fact, it seems that one needs to rely on discretization of the output space $\mathcal{Y}$, which can be done efficiently by just sampling from the predictive posterior (see here).

It seems that it will be easier to treat Conformalized Bayes as a separate task for now with separate constructors.

@pat-alt pat-alt merged commit 7dd1b4b into main Dec 1, 2022
@pat-alt pat-alt deleted the 31-add-support-for-conformalized-bayes branch July 6, 2023 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for Conformalized Bayes
2 participants