Skip to main content

causalEffects

causalEffects(actions, fixed?, interval?, observationNoise?): Promise<any>

Get the causal effects of actions on the model. This function estimates the causal impact of specified actions on the model outcomes.

Parameters

NameTypeDefault valueDescription
actionsanyundefinedA dictionary representing the actions to simulate.
fixedObject{}A dictionary representing fixed nodes, if any.
intervalnumber0.9The interval at which to simulate the action.
observationNoisebooleanfalseWhether to include observation noise.

Returns

Promise<any>

A Promise resolving to the causal effects of the actions, including median, lower, and upper outcome estimates.

Throws

If the server request fails or returns an unexpected status code.

Example

const model = await client.getModel('test-model');
const causalEffects = await model.causalEffects({ 'x': [0, 1] });
console.log(causalEffects);