Skip to content

Issue associated with Causal Forest DML when calling Score() method #760

@Fan981230

Description

@Fan981230

Hi, thanks for the fascinating work you guys provide!

I'm new to causal inference field and i found this package super to help build model. While i came across an IndexError when trying to call the model.score() as i built a causal forest model.

The model parameter i used is as following:

model = CausalForestDML(
                model_y=RandomForestRegressor(n_estimators=150),
                model_t=RandomForestRegressor(n_estimators=150),
                n_jobs=-1,
                min_var_fraction_leaf=0.5,
                min_var_leaf_on_val=True,
                mc_iters = 4,
                n_estimators=50,
                subforest_size=5
                )
            
        model.tune(Y=Y, T=T, X=X, W=W)
        model.fit(Y=Y, T=T, W=W, X=X, cache_values=False)

And when i call the score method i received the following error:
Screenshot 2023-04-22 at 11 00 22 PM

And my guess for why it happened is the mc_iter parameter, as when i changed the mc_iters = 2, i can run the score method without any error. Really appreciate any advice or help, Thanks!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions