Liking cljdoc? Tell your friends :D

org.replikativ.foerster.counterfactual

Counterfactual queries by abduction, action and prediction (Pearl).

A program's sample and observe sites are structural equations (foerster.mechanism). Given evidence and interventions:

  1. abduction — condition the program on the evidence (importance sampling by gfi/generate) and read each weighted factual trace's exogenous noise off its sites;
  2. action — install the interventions;
  3. prediction — run the program again in a world of its own with every other site fed its factual noise, aligned by address.

The result pairs each factual world with its counterfactual twin, under the factual weight: a joint measure, so quantities that need both worlds (probability of necessity, effect of treatment on the treated) are expectations over it. A site that exists only in the counterfactual world draws fresh noise and is listed as :unaligned: its answer is interventional, not counterfactual.

Counterfactual queries by abduction, action and prediction (Pearl).

A program's sample and observe sites are structural equations
(`foerster.mechanism`). Given evidence and interventions:

1. abduction — condition the program on the evidence (importance sampling
   by `gfi/generate`) and read each weighted factual trace's exogenous
   noise off its sites;
2. action — install the interventions;
3. prediction — run the program again in a world of its own with every
   other site fed its factual noise, aligned by address.

The result pairs each factual world with its counterfactual twin, under
the factual weight: a joint measure, so quantities that need both worlds
(probability of necessity, effect of treatment on the treated) are
expectations over it. A site that exists only in the counterfactual world
draws fresh noise and is listed as `:unaligned`: its answer is
interventional, not counterfactual.
raw docstring

counterfactualclj/s

(counterfactual model
                {:keys [evidence interventions particles] :or {particles 1}}
                &
                [opts])

Pairs of factual and counterfactual results of model (a spin, as for foerster.gfi) given :evidence ({address value}, fixed in the factual world) and :interventions ({selector transform}, as for foerster.trace/policy), from :particles importance-weighted factual worlds (default 1: enough when the evidence fixes every noise).

Resolves a vector of {:factual r :counterfactual r' :weight log-w :unaligned [address …]}.

Pairs of factual and counterfactual results of `model` (a spin, as for
`foerster.gfi`) given `:evidence` ({address value},
fixed in the factual world) and `:interventions` ({selector transform}, as
for `foerster.trace/policy`), from `:particles` importance-weighted
factual worlds (default 1: enough when the evidence fixes every noise).

Resolves a vector of {:factual r :counterfactual r' :weight log-w
:unaligned [address …]}.
sourceraw docstring

noise-ofclj/s

(noise-of trace)

{address u} of the sample and observe sites of trace whose law is a mechanism, and the addresses of those that are not.

{address u} of the sample and observe sites of `trace` whose law is a
mechanism, and the addresses of those that are not.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close