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

predict_params is not passed everywhere in MapieClassifier in some settings #614

Open
4 tasks
Valentin-Laurent opened this issue Feb 20, 2025 · 0 comments
Open
4 tasks
Labels
Backlog This is in the MAPIE team development backlog, yet to be prioritised. Contributors welcome 👋🏻 Especially relevant issue/PR for contributors to work on. Other or internal If no other grey tag is relevant or if issue from the MAPIE team

Comments

@Valentin-Laurent
Copy link
Collaborator

Predict params are not passed to the underlying classifiers in some settings:

  • In mapie/estimator/classifier.py, in the prefit setting, we should pass predict_params. Here is the code to fix:
if self.cv == "prefit":
            y_pred_proba = self.single_estimator_.predict_proba(X)
            y_pred_proba = self._check_proba_normalized(y_pred_proba)
  • In mapie/conformity_scores/sets/raps.py, same issue. Fixing this is a bit trickier since the get_conformity_scores score method currently doesn't have access to predict_params. Here is the code to fix:
        self.y_pred_proba_raps = (
            self.predictor.single_estimator_.predict_proba(self.X_raps)
        )
  • We should clarify in the doctstring that predict_params are passed to both predict and predict_proba methods. This may be subject to discussion as this implementation choice may not be relevant.
  • Optional: implement tests to check that the above works
@Valentin-Laurent Valentin-Laurent added Backlog This is in the MAPIE team development backlog, yet to be prioritised. Contributors welcome 👋🏻 Especially relevant issue/PR for contributors to work on. Other or internal If no other grey tag is relevant or if issue from the MAPIE team labels Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backlog This is in the MAPIE team development backlog, yet to be prioritised. Contributors welcome 👋🏻 Especially relevant issue/PR for contributors to work on. Other or internal If no other grey tag is relevant or if issue from the MAPIE team
Projects
None yet
Development

No branches or pull requests

1 participant