-
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
Add support to conformalized Bayes for Regression tasks #125
Conversation
…partially changed predict in inductive_bayes.jl
…r regression predict is not updated yet. Bayesclassifier not clear
…rn. probably due to mm.fit parameters
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.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
JuliaFormatter
[JuliaFormatter] reported by reviewdog 🐶
where ``\mathcal{D}_{\text{calibration}}`` denotes the designated calibration data. | |
""" | |
function MMI.predict(conf_model::BayesRegressor, fitresult, Xnew) | |
fμ, fvar = MMI.predict(conf_model.model, fitresult, MMI.reformat(conf_model.model, Xnew)...) |
[JuliaFormatter] reported by reviewdog 🐶
return fμ, fvar | |
end |
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
… to be updated from the old file.
… and i think the whole thing should be generalized to support distribution.
@MojiFarmanbar there is a compatibility issue between laplaceredux and the Random package affecting ONLY julia 1.7 I think the issue is that the laplaceredux package only support Random 1.9 or 1.10 when Random seems to be at version 1.7 conformalprediction.jl does not seem to have the same problem because in compat it has Random = "1.7, 1.8, 1.9, 1.10" do we need to make a new small release of lapalceredux? |
i will try |
@Rockdeldiablo i would suggest let's focus on classification part. for this we can wait for Patrick, he is more experienced than me regarding packaging in Julia. I will also look at it |
Let's remove legacy compat and just use |
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.
Overall looking really good to me but some minor comments as discussed.
Let's change this PR to 'Bayes Regression only', properly document and test things and then merge.
Then classification in another final PR
src/conformal_models/heuristics.jl
Outdated
return: | ||
- the probability of observing a value y given a mean fμ and a variance fvar. | ||
""" | ||
function ConformalBayes(y, fμ, fvar) |
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.
Can we use a different name for the function (or in any case not use camel case)
@pat-alt if i remove the assert a lot of test fails because the test file is written so that normal deterministic neural networks are used for regression. It's not a problem of BayesRegressor. what do i do? |
@pat-alt how do i solve this issue? models() it's not recognized as a command |
Ahh I think this is because LaplaceRedux has not been added to MLJ's model registry. Could you open an issue for that on LR.jl please? For now I think here we will indeed have to depend on LR.jl to have access to the model type |
so for now i reintroduce the assert and install laplaceredux so that the tests do not give errors? then, when laplaceredux is added to MLJ we can remove this constrain |
Yes, let's do that 👍🏽 |
add the support to conformalized bayes for regression tasks to conformalprediction.jl (part of gsoc 24)