Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
sdaza committed Jan 1, 2025
1 parent a755008 commit db824af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion experiment_utils/estimators.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def __calculate_stabilized_weights(self, data: pd.DataFrame) -> pd.DataFrame:
) * (
1 - p_treatment
)

data["tips_stabilized_weight"] = data[self.treatment_col] * p_treatment + (
1 - data[self.treatment_col]
) * data["propensity_score"] / (1 - data["propensity_score"]) * (1 - p_treatment)
Expand Down
3 changes: 1 addition & 2 deletions experiment_utils/experiment_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ def __init__(
"ATE": "ips_stabilized_weight",
"ATC": "cips_stabilized_weight"}


def __check_input(self) -> None:

# dataframe is empty
Expand Down Expand Up @@ -416,7 +415,7 @@ def get_effects(self, min_binary_count: int = 100, adjustment: Optional[str] = N
for outcome in self.outcomes:
if adjustment == 'IPW':
output = models[adjustment](data=temp_pd, outcome_variable=outcome, covariates=relevant_covariates,
weight_column=self.target_weights[self.target_ipw_effect])
weight_column=self.target_weights[self.target_ipw_effect])
else:
output = models[adjustment](data=temp_pd, outcome_variable=outcome, covariates=relevant_covariates)
output['adjustment'] = adjustment_label
Expand Down

0 comments on commit db824af

Please sign in to comment.