Skip to content

Commit 8579a14

Browse files
committed
less confusing variable names
1 parent 192327d commit 8579a14

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

causalpy/experiments/synthetic_control.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -234,16 +234,16 @@ def _bayesian_plot(
234234
f"treated_unit '{treated_unit}' not found. Available units: {self.treated_units}"
235235
)
236236

237-
pre_pred_plot = self.pre_pred["posterior_predictive"].mu.sel(
237+
pre_pred = self.pre_pred["posterior_predictive"].mu.sel(
238238
treated_units=treated_unit
239239
)
240-
post_pred_plot = self.post_pred["posterior_predictive"].mu.sel(
240+
post_pred = self.post_pred["posterior_predictive"].mu.sel(
241241
treated_units=treated_unit
242242
)
243243

244244
h_line, h_patch = plot_xY(
245245
self.datapre.index,
246-
pre_pred_plot,
246+
pre_pred,
247247
ax=ax[0],
248248
plot_hdi_kwargs={"color": "C0"},
249249
)
@@ -263,7 +263,7 @@ def _bayesian_plot(
263263
# post intervention period
264264
h_line, h_patch = plot_xY(
265265
self.datapost.index,
266-
post_pred_plot,
266+
post_pred,
267267
ax=ax[0],
268268
plot_hdi_kwargs={"color": "C1"},
269269
)
@@ -278,7 +278,7 @@ def _bayesian_plot(
278278
# Shaded causal effect for primary treated unit
279279
h = ax[0].fill_between(
280280
self.datapost.index,
281-
y1=post_pred_plot.mean(dim=["chain", "draw"]).values,
281+
y1=post_pred.mean(dim=["chain", "draw"]).values,
282282
y2=self.datapost_treated.sel(treated_units=treated_unit).values,
283283
color="C0",
284284
alpha=0.25,

0 commit comments

Comments
 (0)