CausalML is not compatible with Scikit-Learn Pipeline
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6k
- Forks
- 877
- PR merge metrics
- No merged PRs in 30d
Description
Describe the solution you'd like
Swap the arguments treatment and y in the fit function.
To change the order of arguments in the fit function from X, treatment, y to X, y, treatment for compatibility with sklearn
Additional context
When using causalml models in the sklearn pipeline, it is necessary to write adapters
Because pipeline expects the following order: X, y, other arguments, and in fit in causalml the following order: X, treatment, y
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 locating the causalml model fit methods that currently accept X, treatment, y and trace how they are used across the package. Check compatibility with sklearn Pipeline, then verify that the affected models accept X, y, treatment in the expected order without breaking existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, scikit-learn
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100