File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
causal_testing/specification Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -214,15 +214,17 @@ def __str__(self):
214
214
)
215
215
216
216
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 ]:
218
218
"""Construct a list of metamorphic relations based on the DAG or cyclic graph.
219
219
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.
223
224
224
225
: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.
226
228
:return: A list containing ShouldCause and ShouldNotCause metamorphic relations.
227
229
"""
228
230
metamorphic_relations = []
You can’t perform that action at this time.
0 commit comments