8000 make cross_val_predict use cross_validate · Issue #27000 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

make cross_val_predict use cross_validate #27000

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

Open
adrinjalali opened this issue Aug 3, 2023 · 9 comments
Open

make cross_val_predict use cross_validate #27000

adrinjalali opened this issue Aug 3, 2023 · 9 comments
Labels
API Moderate Anything that requires some knowledge of conventions and best practices

Comments

@adrinjalali
Copy link
Member
adrinjalali commented Aug 3, 2023

Right now cross_val_score is a wrapper for cross_validate, but cross_val_predict has its own implementation.

We could make it also a wrapper around cross_validate, but for that to happen, we need to make cross_validate also return predictions. For that, we would also need to be able to pass y_pred, y_true to scorers instead of passing the estimator, which would also remove the need to cache in _MultimetricScorer and make things quite a bit cleaner.

cc @glemaitre

xref: #26896 (review)

@adrinjalali adrinjalali added Moderate Anything that requires some knowledge of conventions and best practices API labels Aug 3, 2023
@navaneethkulal8
Copy link

Hi, @adrinjalali, can I work on this? How should I proceed further?

@adrinjalali
Copy link
Member Author

@navaneethkulal8 as you can see this issue is labeled as "moderate" and best left to someone who's quite familiar with the code base. And easier issue might be better for you to start on.

@navaneethkulal8
Copy link

Thanks for the feedback, @adrinjalali

@Andrew-Wang-IB45
Copy link
Contributor

Hi @adrinjalali, I would like to work on this issue.

@Andrew-Wang-IB45
Copy link
Contributor

We could make it also a wrapper around cross_validate, but for that to happen, we need to make cross_validate also return predictions. For that, we would also need to be able to pass y_pred, y_true to scorers instead of passing the estimator, which would also remove the need to cache in _MultimetricScorer and make things quite a bit cleaner.

I am wondering why we need to pass y_pred, y_true to scorers instead of passing the estimator. From my understanding, if cross_val_predict were to be a wrapper around cross_validate, then once we obtain the predictions, we can use these values instead of recomputing them during the scoring process. What other reasons may I be missing?

@Andrew-Wang-IB45 Andrew-Wang-IB45 removed their assignment Aug 21, 2023
@sadepu1915
Copy link
sadepu1915 commented Nov 6, 2023

@adrinjalali
I will work on this ..

@adrinjalali
Copy link
Member Author

@sadepu1915 This is not an easy one to start with, and requires quite a bit of familiarity with the codebase.

@sadepu1915
Copy link
sadepu1915 commented Nov 9, 2023

@adrinjalali
sure , I am feeling I have decent understanding of code :-) I might be wrong ... let me try

you can pitch me idea or any approach plan on how to attack on this

@adrinjalali
Copy link
Member Author

@glemaitre had some ideas regarding the scorer API which would accept y_true, y_pred I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Moderate Anything that requires some knowledge of conventions and best practices
Projects
None yet
Development

No branches or pull requests

4 participants
0