-
Notifications
You must be signed in to change notification settings - Fork 12
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
Docs #33
Conversation
I've now run the MAPIE tutorial with gradient boosting instead of polynomial reg and the results are the same (so this is not an implementation issue): Quite puzzled now: looking at the chart, test coverage left and right of the training points is very low. I guess we don't have exchangeability in this case or I'm just misunderstanding the marginal coverage property. @aangelopoulos @valeman perhaps you can enlighten me? Sorry if trivial, I have serious brain fog right now. |
…that should be/is accepted by every model
Codecov Report
@@ Coverage Diff @@
## main #33 +/- ##
===========================================
- Coverage 99.32% 86.45% -12.87%
===========================================
Files 6 9 +3
Lines 297 384 +87
===========================================
+ Hits 295 332 +37
- Misses 2 52 +50
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
When using polynomial regression as opposed to gradient boosting, the results look better (in some cases). But this is driven by the fact that separate fits for subsets of the data (CV, Jackknife, ...) reflect the underlying stochasticity of the data. Again, I suppose exchangeability is violated: I draw training data from Edit: Also Section 3 of the MAPIE tutorial seems to be looking at pretty much the same thing. |
Hey @pat-alt ! Happy to help! I think you have the right idea --- the example that you've given comes from an extreme covariate shift. Without using the covariate shift technique, conformal will only give you the marginal guarantee if the new data is i.i.d. with your old data... so the regions with no training data don't really matter, since they occur with very low probability. My suggestion would be this. If you like the way the Bayesian NN performs in this setting, use it as your heuristic notion of uncertainty. Then calibrate it with conformal. Best of both worlds! |
Got it - thank you very much! I'm gradually working my way through your tutorial (which is fantastic by the way!). Both Conformalized Bayes #31 and covariate shift conformal #39 are on the to-do list 😄 Thanks again for your help - much appreciated! |
Thanks Pat!! This package that you are building is great!! |
Some early work on regression docs (-> blog post). In regions of the domain that were not seen during training, predictive uncertainty should be really high (no?). See, for example, my results for a Bayesian Neural Network lifted from LaplaceRedux.jl:
When I run a similar experiment using CP (here split conformal for XGBoost), results look very different:
Considering how CP works, I don’t find this result too surprising, it’s just not great and I’m now a bit confused as to how exactly the coverage guarantees work.
The chart is produced in this notebook, where I’ve been trying to replicate this tutorial from MAPIE.
It would be useful to cross-check the results against the MAPIE results (notebook stored here). In there they don't really look at values of
x
outside of the training range at the prediction stage, but it should be straight-forward to make adjustments to the code in the notebook. (EDIT: done below)