Skip to content

Error when making predictions with nuisance models #344

Discussion options

You must be logged in to vote

Hi @RandallJEllis - thanks for pointing this out.

I think this question is also related to my answer in #342 which I have to adjust a bit. Sorry for the confusion.

When you do:

data = DoubleMLData.from_arrays(x=Z_train, y=Y_train, d=T_train)

You use the default value for use_other_treat_as_covariate, which is True (I thought it was False 😅) .

So in fact, for each treatment, when estimating E[ Y | Z* ] and E[ T | Z* ], Z* contains the two covariates Z as well as the 49 other treatment columns. This is why LGBM puts out the dimensionality error in the code provided. If you set it to

data = DoubleMLData.from_arrays(x=Z_train, y=Y_train, d=T_train, use_other_treat_as_covariate=False)

the er…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@RandallJEllis
Comment options

Answer selected by RandallJEllis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants