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

cache_predictions does not compute all possibilities in EstimatorReport #1093

Closed
glemaitre opened this issue Jan 10, 2025 · 2 comments · Fixed by #1098
Closed

cache_predictions does not compute all possibilities in EstimatorReport #1093

glemaitre opened this issue Jan 10, 2025 · 2 comments · Fixed by #1098
Assignees

Comments

@glemaitre
Copy link
Member

glemaitre commented Jan 10, 2025

cache_predictions does not compute all the predictions that should be cached in EstimatorReport. It should be the cartesian product of the parameters

The underlying bug is in:

if self._ml_task in ("binary-classification", "multiclass-classification"):
if response_methods == "auto":
response_methods = ("predict",)
if hasattr(self._estimator, "predict_proba"):
response_methods = ("predict_proba",)
if hasattr(self._estimator, "decision_function"):
response_methods = ("decision_function",)
pos_labels = self._estimator.classes_
else:
if response_methods == "auto":
response_methods = ("predict",)
pos_labels = [None]
data_sources = ("test",)
Xs = (self._X_test,)
if self._X_train is not None:
data_sources = ("train",)
Xs = (self._X_train,)

We redefine some tuples using = instead of concatenating using +=.

We should add a non-regression tests to check the what is getting cached once we call the function.

@glemaitre glemaitre self-assigned this Jan 10, 2025
@augustebaum
Copy link
Contributor

Can you be more precise? This way someone else might be able to work on this.

@glemaitre
Copy link
Member Author

Sorry about that. It was a reminder to myself and thus I self assigned as well. The bug fix is in the cross validation PR. I might extract it out in another PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants