causal_testing.specification.scenario

This module holds the Scenario Class

Module Contents

Classes

Scenario

A scenario defines the setting by listing the endogenous variables, their

class causal_testing.specification.scenario.Scenario(variables: collections.abc.Iterable[causal_testing.specification.variable.Variable], constraints: set[str] = None)

A scenario defines the setting by listing the endogenous variables, their datatypes, distributions, and any constraints over them. This is a common practice in CI and is analogous to an investigator specifying “we are interested in individuals over 40 who regularly eat cheese” or whatever. A scenario, here, is not a specific test case; it just defines the population of interest, in our case “runs of the model with parameters meeting the constraints”. The model may have other inputs/outputs which the investigator may choose to leave out. These are then exogenous variables and behave accordingly.

Parameters:
  • variables ({Variable}) – The set of endogenous variables.

  • constraints ({str}) – The set of constraints relating the endogenous variables.

Attr variables:

Attr constraints:

hidden_variables() set[causal_testing.specification.variable.Variable]

Get the set of hidden variables

:return The variables marked as hidden. :rtype: {Variable}