Replies: 1 comment 1 reply
-
Currently, we assume that the learner for ml_l ist a regressor see DoubleMLPLR as the You should use a regressor or external predictions for |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi I am trying to perform causal analysis with an outcome and treatment that are both binary. Here is my code:
'''
obj_dml_data = dml.DoubleMLData(data,y_col='binary_outcome',d_cols='binary_treatment')
dml_mlplr = dml.DoubleMLPLR(obj_dml_data,
ml_l = RandomForestClassifier(),
ml_m = RandomForestClassifier(),
n_folds = 5)
summary = dml_mlplr.fit(store_predictions=True).summary
summary
"""
Outcome:
data = {
'oef': ['binary_treatment'],
'std err': [0.509206],
't': [44.761216],
'P>|t|': [0.0],
'2.5 %': [0.48691],
'97.5 %': [0.531503]
}
I do get an output but I see this warning and would like to get some clarification on what it means:
'Learner provided for ml_l is probably invalid: RandomForestClassifier() is (probably) no regressor.'
What exactly does this mean? do I need to you a different dml model other than DoubleMLPLR?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions