Skip to content

Interface: CounterfactualRequest

@kortexya/reasoninglayer


@kortexya/reasoninglayer / CounterfactualRequest

Defined in: src/types/causal.ts:153

Request to evaluate a counterfactual query.

Uses Pearl’s three-step algorithm: abduction, action, prediction.

antecedentValue: unknown

Defined in: src/types/causal.ts:155

Antecedent value: what we are hypothetically setting the variable to.


antecedentVariable: string

Defined in: src/types/causal.ts:157

Antecedent: the variable to intervene on in the counterfactual world.


consequentVariable: string

Defined in: src/types/causal.ts:159

Consequent: the variable whose value we want to predict.


evidence: Record<string, unknown>

Defined in: src/types/causal.ts:161

Evidence: observed variable values.