Repository navigation
Replies: 1 comment
|
Yes. The from causalml.inference.meta import BaseSClassifier
from causalml.metrics.sensitivity import Sensitivity
from xgboost import XGBClassifier
sens = Sensitivity(
df=df, inference_features=features, p_col="pihat",
treatment_col="treatment", outcome_col="y",
learner=BaseSClassifier(learner=XGBClassifier()),
)
sens.sensitivity_analysis(
methods=["Placebo Treatment", "Random Cause", "Subset Data", "Random Replace"],
sample_size=0.5,
)Leave |
0 replies
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.
I am using s_learner for my causal modeling (BaseSClassifier(learner=XGBClassifier))
However, when I trying to access the sensitivity for the model, it reported an error for the function
ate_new, ate_new_lower, ate_new_upper = self.get_ate_ci(X, p, treatment_new, y)
ValueError: not enough values to unpack (expected 3, got 1)
My main question here is can I do the sensitivity analysis for S_learner? If yes, how to do that. I am not sure if I missed some settings that can make it work.
Thank you
All reactions