@@ -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
- "Z=%s is not minimal because Z'=Z\\ {{'%s'}}="
353
- "%s is also a valid adjustment set." % ( adjustment_set , variable , smaller_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
@@ -394,15 +394,15 @@ def constructive_backdoor_criterion(
394
394
if not set (covariates ).issubset (set (self .graph .nodes ).difference (descendents_of_proper_casual_paths )):
395
395
logger .info (
396
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 )
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
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 }
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