Skip to content

Commit

Permalink
Merge pull request #314 from py-why/fix_policy_score
Browse files Browse the repository at this point in the history
fix policy score
  • Loading branch information
AlxdrPolyakov authored Aug 30, 2024
2 parents 0cd350e + d1d1416 commit 0572ea7
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions causaltune/scoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,16 +513,7 @@ def policy_risk_score(
# Calculate propensity scores using the pre-fitted propensity model
propensity_scores = (
self.psw_estimator.estimator.propensity_model.predict_proba(
df.drop(
[
'index',
'variant',
'Y',
'dy',
'yhat'
],
axis=1
)
df[['random'] + self.psw_estimator._effect_modifier_names]
)
)
if propensity_scores.ndim == 2:
Expand Down

0 comments on commit 0572ea7

Please sign in to comment.