-
Notifications
You must be signed in to change notification settings - Fork 111
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
Added binary classification support to MAPIE using the mondrian conformal predictor #230
base: master
Are you sure you want to change the base?
Conversation
Hey, I have tried to read the error logs of the failed tests, but they seem to be failing at the level of installing numpy, and I cannot see a reason as to why this happens. If anyone has some advice so that I can fix it that would be much appreciated. |
…ian conformal now complete
Can we get this merged? would be super useful |
Hello @adamzenith, Thank you for submitting your pull request to propose the Mondrian Conformal Predictor. I have read with interest your modifications and proposals to implement this method. I hope I understood correctly and that the correction elements I bring you will be relevant. Don't hesitate to share your feedback with me! 1. Your PR in a nutshellYou have proposed an implementation of the Mondrian Conformal Predictor as a method of the MapieClassifier.
2. Our feedback on the PRWe believe that the Mondrian Conformal Predictor could be a good enhancement in MAPIE as it has been mentioned and popularized in related work on drug discovery. However, at this time, we lack evidence for comparison with existing methods in MAPIE as proof of the compelling value of using this method in specific use cases. We need concrete examples (in jupyter notebooks for example) that demonstrate that Mondrian Conformal Predictor is better than other methods in MAPIE for solving binary or unbalanced multi-class problems. This will be a demonstration not only for us but for all MAPIE users. We invite you to consult the existing notebooks to help you. 3. Additional comments to improve your codeMy suggestions are about modifications to make your code as generic as possible.
4. Actions to be takenI propose a list of actions to help you improve your proposal and help us integrate it into MAPIE:
I remain available if you have any questions and thank you in advance for your feedback. |
I tested this out myself and it worked well. Nice job. |
Would be very helpfull!! |
Description
Mapie was unable to perform confidence estimation on binary classification problems. To address this issue, I have implemented the mondrian conformal as a method of the MapieClassifier. This method is described in detail on page 5 of this paper, but in essence it uses the quantiles of each class to determine inclusion in the prediction set, as opposed to one quantile found from both classes. This method is not constrained to binary classification, and should work for imbalanced multiclass problems as well.
Closes #216
Type of change
Please remove options that are irrelevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
I also tested the changes on a workflow where mapie was included, and altering the method to mondrian gave similar results.
Checklist
make lint
make type-check
make tests
make coverage
make doc
I do unfortunately not have much experience writing tests, and do not know the best way to do this, so if anyone can assist on that front with help or advice I would be grateful.