Skip to content

Commit cd8c79b

Browse files
committed
fix printing of coefficient text summary outputs
1 parent 2986496 commit cd8c79b

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

causalpy/pymc_experiments.py

+2-10
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,15 @@ def print_coefficients(self):
3838
for name in self.labels:
3939
coeff_samples = coeffs.sel(coeffs=name)
4040
print(
41-
f"""
42-
{name: <30}{coeff_samples.mean().data:.2f},
43-
94% HDI [{coeff_samples.quantile(0.03).data:.2f},
44-
{coeff_samples.quantile(1-0.03).data:.2f}]
45-
"""
41+
f"{name: <30}{coeff_samples.mean().data:.2f}, 94% HDI [{coeff_samples.quantile(0.03).data:.2f}, {coeff_samples.quantile(1-0.03).data:.2f}]" # noqa: E501
4642
)
4743
# add coeff for measurement std
4844
coeff_samples = az.extract(
4945
self.prediction_model.idata.posterior, var_names="sigma"
5046
)
5147
name = "sigma"
5248
print(
53-
f"""
54-
{name: <30}{coeff_samples.mean().data:.2f},
55-
94% HDI [{coeff_samples.quantile(0.03).data:.2f},
56-
{coeff_samples.quantile(1-0.03).data:.2f}]
57-
"""
49+
f"{name: <30}{coeff_samples.mean().data:.2f}, 94% HDI [{coeff_samples.quantile(0.03).data:.2f}, {coeff_samples.quantile(1-0.03).data:.2f}]" # noqa: E501
5850
)
5951

6052

0 commit comments

Comments
 (0)