cleverly.datasets.offers_truth#

cleverly.datasets.offers_truth(nodes: int = 48) → dict[str, float][source]#

Return the exact week-4 full-price share under each plan, and each contrast with no offers.

Under a deterministic plan the offers follow from the engagement path, and the intervention removes consent loss. The mean is a sum over the sixteen engagement paths of an integral over tenure, which a Gauss–Hermite rule evaluates.

Parameters:
nodesint, default=48

Number of Gauss–Hermite nodes for tenure.

Returns:
dict of str to float

ey_regimen[<plan>] for each key of OFFER_PLANS, and ate_regimen[<plan> vs none] for each plan except none. These are the labels a fit reports.

See also

make_sequential_offers

The generator whose law this truth integrates.

OFFER_PLANS

The plans this function evaluates.

Notes

The rule of a plan reads the engagement of the week it acts in, so the enumeration needs no offer path beyond the one the rule gives.

Examples

>>> from cleverly.datasets import offers_truth
>>> truth = offers_truth()
>>> sorted(truth)[:2]
['ate_regimen[discount vs none]', 'ate_regimen[shipping vs none]']
>>> truth["ate_regimen[win_back vs none]"] > 0.05
True