uber / uber/causalml

CausalML is not compatible with Scikit-Learn Pipeline

Open
#854 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.