cleverly.interventions.Randomizer#

class cleverly.interventions.Randomizer(values: tuple[object, ...], probabilities: tuple[float, ...])[source]#

A finite, known law for the randomizer of a randomized policy.

Díaz, Williams, Hoffman and Schenck (2023, Section 2) admit a policy \(d(a, h, \varepsilon)\) whose randomizer \(\varepsilon\) is drawn independently across units and of everything else, from a law that does not depend on the observed-data distribution. The estimator integrates it out: the policy mean is \(\sum_e p(e)\,E[\bar Q(d(A, H, e), H)]\), linear in the known weights.

Parameters:
valuestuple

The values the randomizer takes. Each one names a branch of the policy.

probabilitiestuple of float

The probability of each value, in the order of values. They are positive and sum to one.

Methods#

Attributes#

Randomizer.values: tuple[object, ...]#
Randomizer.probabilities: tuple[float, ...]#