Skip to content

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

Open
@Valentin-Laurent

Description

@Valentin-Laurent

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    BacklogThis is in the MAPIE team development backlog, yet to be prioritised.Contributors welcome 👋🏻Especially relevant issue/PR for contributors to work on.Other or internalIf no other grey tag is relevant or if issue from the MAPIE team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions