scikit-learn / scikit-learn/scikit-learn
Can't instantiate pipeline with placeholder to search in GridSearchCV
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 67.3k
- Forks
- 27.4k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 58
Description
A cosmetic complaint:
It's not possible to instantiate a pipeline with a placeholder like in #12272 and grid-search the final estimator. If the final estimator is None, there is no score method and so GridSearchCV refuses to run.
I'm not sure if this is worth fixing or how to most elegantly fix it, but it's a bit ugly.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the Pipeline and GridSearchCV implementations and reproduce the failure with a None final estimator and a parameter grid. Define the intended placeholder behavior, then add regression coverage showing that GridSearchCV can search the final estimator without requiring a score method prematurely.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100