@@ -349,8 +349,8 @@ def adjustment_set_is_minimal(self, treatments: list[str], outcomes: list[str],
349
349
proper_backdoor_graph , treatments , outcomes , smaller_adjustment_set
350
350
):
351
351
logger .info (
352
- f "Z={ adjustment_set } is not minimal because Z'=Z\\ {{'{ variable } '}}="
353
- f" { smaller_adjustment_set } is also a valid adjustment set."
352
+ "Z=%s is not minimal because Z'=Z\\ {{'%s '}}="
353
+ "%s is also a valid adjustment set." % ( adjustment_set , variable , smaller_adjustment_set )
354
354
)
355
355
return False
356
356
@@ -393,16 +393,16 @@ def constructive_backdoor_criterion(
393
393
394
394
if not set (covariates ).issubset (set (self .graph .nodes ).difference (descendents_of_proper_casual_paths )):
395
395
logger .info (
396
- f "Failed Condition 1: Z={ covariates } **is** a descendent of some variable on a proper causal "
397
- f "path between X={ treatments } and Y={ outcomes } ."
396
+ "Failed Condition 1: Z=%s **is** a descendent of some variable on a proper causal "
397
+ "path between X=%s and Y=%s." % ( covariates , treatments , outcomes )
398
398
)
399
399
return False
400
400
401
401
# Condition (2)
402
402
if not nx .d_separated (proper_backdoor_graph .graph , set (treatments ), set (outcomes ), set (covariates )):
403
403
logger .info (
404
- f "Failed Condition 2: Z={ covariates } **does not** d-separate X={ treatments } and Y={ outcomes } in"
405
- f " the proper back-door graph relative to X and Y."
404
+ "Failed Condition 2: Z=%s **does not** d-separate X=%s and Y=%s in"
405
+ " the proper back-door graph relative to X and Y." , { covariates , treatments , outcomes }
406
406
)
407
407
return False
408
408
0 commit comments