Causal Effects
@validate_call
def causal_effects(actions: Union[str, dict[str, tuple[float, float]]],
fixed: dict[str, float] = None,
interval: float = 0.90,
observation_noise=False) -> pd.DataFrame
Get the causal effects of actions on the model.
Arguments:
actions
Union[str, dict[str, tuple[np.ndarray, np.ndarray]]] - A dictionary representing the actions.fixed
dict - A dictionary representing the fixed nodes.interval
float - The interval at which to simulate the action.observation_noise
bool - Whether to include observation noise.
Returns:
pd.DataFrame
- A dataframe representing the causal effects of the actions.
Example:
model.causal_effects( ... {"x": [0, 1]} ... )