Return registered assumptions, optionally filtered by method, usage, or type.
Source code in causalinf/assumptions.py
| def get_assumptions(method=None, usage=None, assumption_type=None, include_general=True):
"""Return registered assumptions, optionally filtered by method, usage, or type."""
method = _normalize_filter(method)
usage = _normalize_filter(usage)
assumption_type = _normalize_filter(assumption_type)
result = []
for assumption in ASSUMPTIONS.values():
if method and not _method_matches(assumption.method, method, include_general):
continue
if usage and usage not in assumption.usage:
continue
if assumption_type and assumption.assumption_type != assumption_type:
continue
result.append(assumption)
return result
|