We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d6f3ef4 commit fa9fedcCopy full SHA for fa9fedc
causalml/propensity.py
@@ -214,7 +214,9 @@ def compute_propensity_score(
214
if treatment_pred is None:
215
treatment_pred = treatment.copy()
216
if p_model is None:
217
- p_model = ElasticNetPropensityModel(calibrate=calibrate_p)
+ p_model = ElasticNetPropensityModel(
218
+ clip_bounds=clip_bounds, calibrate=calibrate_p
219
+ )
220
221
p_model.fit(X, treatment)
222
@@ -226,7 +228,4 @@ def compute_propensity_score(
226
228
logger.info("predict_proba not available, using predict instead")
227
229
p = p_model.predict(X_pred)
230
- # force the p values within the range
- p = np.clip(p, clip_bounds[0], clip_bounds[1])
231
-
232
return p, p_model
0 commit comments