Skip to content

Commit bd0c44f

Browse files
docstrings for causal_dag.py
1 parent 219b5d5 commit bd0c44f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

causal_testing/specification/causal_dag.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,13 +501,18 @@ def depends_on_outputs(self, node: Node, scenario: Scenario) -> bool:
501501

502502
@staticmethod
503503
def remove_hidden_adjustment_sets(minimal_adjustment_sets: list[str], scenario: Scenario):
504+
"""Remove variables labelled as hidden from adjustment set(s)
505+
:param minimal_adjustment_sets: list of minimal adjustment set(s) to have hidden variables removed from
506+
:param scenario: The modelling scenario which informs the variables that are hidden
507+
"""
504508
return [adj for adj in minimal_adjustment_sets if all(not scenario.variables.get(x).hidden for x in adj)]
505509

506510
def identification(self, base_test_case: BaseTestCase, scenario: Scenario = None):
507511
"""Identify and return the minimum adjustment set
508512
509513
:param base_test_case: A base test case instance containing the outcome_variable and the
510514
treatment_variable required for identification.
515+
:param scenario: The modelling scenario relating to the tests
511516
:return minimal_adjustment_set: The smallest set of variables which can be adjusted for to obtain a causal
512517
estimate as opposed to a purely associational estimate.
513518
"""

0 commit comments

Comments
 (0)