-
Notifications
You must be signed in to change notification settings - Fork 24
Support for UQ with conformal prediction #916
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
base: main
Are you sure you want to change the base?
Conversation
2d5adb6 to
6a315d2
Compare
2cbf790 to
340d1e7
Compare
08b732c to
3c609fd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great, I am just writing down some immediate thoughts I had after a quick look before I have a chance to go through it in more detail.
1: Method naming/structure: There are different ways to handle heteroscedacity with conformal methods. As here, one can use some kind of model that predicts quantiles (this can be quantile regression but could also be any other model like random forest or a NN). Alternatively, people have focused on predicting a scaling factor ConformalizedQuantileMLP or something like that (see e.g., paper).
2: What are the pros/cons of using an MLP vs just a standard quantised regression here?
3: I think it would be better to write the ConformalEmulator more along the lines of TransformedEmulator i.e., a wrapper that can take any deterministic model (rather than having a ConformalMLP specifically. It feels that all the conformal components are model agnostic. Is the issue here that we need a name for the emulator to pass to AutoEmulate()?
|
Should we also just add standard quantile regression as an optional UQ emulator (for cases where one might not have enough data to hold out for a conformal set)? |
|
I don't think this PR closes #905 since we still don't let the user specify the test data set (and use all |
radka-j
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! All my comments are really just about naming/docstrings.
Ah I see - #905 is distinct from updates to the |
|
From discussion with @radka-j:
|
|
I was thinking about our discussion yesterday about evaluating conformal intervals using MSLL. I only had a brief look but I don't think we can treat the conformal intervals as a distribution - we don't know if it is normal but also don't have a reason to assume it is uniform. We only have the 2 quantiles we compute (and the mean). |
Yes good point - adding a distribution s imposing an additional assumption so that we can represent as a |
Also revises comments
I think that sounds really good. This discussion made me think about whether in the case of Ensembles we also shouldn't assume normality. One option would be to introduce something like an |
|
Related to some of the discussion here, I also think we might want to update our plots to show 95% intervals (rather than 2 sigma). Can create an issue for that if you agree. |
Yes good point given we have other distributions than normals potentially - let's update this. |
|
Can I check where we are with this PR? |
|
@EdwinB12 waiting for me to do a second review |
Closes #848.
Contributes towards #589.
(merge after #917)
This PR:
Ensemble)ConformalMLPclass (analogous toEnsembleMLP). This supports both constant width and quantile regression derived UQ.ConformalMLPto registry and re-exports (not adding as default emulator)n_samples- this is to enable this to be controlled at lower levels of the API from the high-levelAutoEmulate.output_to_tensorsmethod onConversionMixinto avoid repeated mapping of outputs to tensorsQuestion:
Next steps:
ConformalMLP(e.g. on projectile and other simulators)