py-why / py-why/EconML

Multidimensional treatment with XGBRegressior support

Open
#536 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
4.8k
Forks
827
PR merge metrics
No merged PRs in 30d

Description

Is it possible to use CausalForestDML with a multidimensional treatment (5 continuous columns) with XGBRegressor? I see model_y accepts XGBRegressor, but model_t complains in a following way:

def _validate_meta_shape(data):
    if hasattr(data, 'shape'):
		assert len(data.shape) == 1 or (len(data.shape) == 2 and (data.shape[1] == 0 or data.shape[1] == 1))

during fit method. I'm using causal_model = CausalForestDML(model_t=XGBRegressor(), model_y=XGBRegressor(), random_state=0).

Do you know what raises the issue?

Greetings

Contributor guide

No contributing guide indexed for this repository

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

Reproduce the issue with CausalForestDML using XGBRegressor for both model_t and model_y, then trace the failure from fit into _validate_meta_shape. Check how multidimensional treatments are validated and whether the requested combination is supported. Done should be a documented resolution with appropriate regression coverage if support is added.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.