cascade.sim.simulate_random_regimes
- cascade.sim.simulate_random_regimes(dag, n_obs, rate, interv, random_state=None)[source]
Simulate interventional data based on a causal structure with random interventions
- Parameters:
dag (
DiGraph) – A directed acyclic graph representing the causal structuren_obs (
int) – Number of samplesrate (
float) – Interventional rate per nodeinterv (
Mapping[str,float|Callable[[int,RandomState|int|None],Sequence[float]]]) – Intervention scaling factor \(\lambda\) of each intervention target or sampler function of such (\(\lambda = 0\) for knockout, \(0 \lt \lambda \lt 1\) for knockdown, \(\lambda \gt 1\) for knockup)act – Activation function
snr – Signal to noise ratio
random_state (
RandomState|int|None) – Random state
- Return type:
- Returns:
Simulated dataset