Skip to content

Commit 9d2fb23

Browse files
committed
fixes/linting
1 parent d67cf34 commit 9d2fb23

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

causal_testing/specification/metamorphic_relation.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -214,15 +214,17 @@ def __str__(self):
214214
)
215215

216216

217-
def generate_metamorphic_relations(dag: CausalDAG, skip_ancestors: bool) -> list[MetamorphicRelation]:
217+
def generate_metamorphic_relations(dag: CausalDAG, skip_ancestors: bool = False) -> list[MetamorphicRelation]:
218218
"""Construct a list of metamorphic relations based on the DAG or cyclic graph.
219219
220-
If is_causal_dag is True, this list contains a ShouldCause relation for every edge, and a ShouldNotCause
221-
relation for every (minimal) conditional independence relation implied by the structure of the DAG.
222-
If is_causal_dag is False, it skips checks assuming the graph is acyclic and works on general graphs with loops/cycles.
220+
If skip_ancestors is False, this list contains a ShouldCause relation for every edge, and a
221+
ShouldNotCause relation for every (minimal) conditional independence relation implied by
222+
the structure of the DAG. If skip_ancestors is True, it skips checks assuming the graph
223+
is acyclic and works on general graphs with loops/cycles.
223224
224225
:param CausalDAG dag: Graph from which the metamorphic relations will be generated.
225-
:param bool is_causal_dag: Specifies whether the input graph is a causal DAG or a cyclic graph.
226+
:param bool skip_ancestors: Boolean parameter to determine if the ancestor checks
227+
should be skipped. Default is False.
226228
:return: A list containing ShouldCause and ShouldNotCause metamorphic relations.
227229
"""
228230
metamorphic_relations = []

0 commit comments

Comments
 (0)