cleverly.datasets.weekly_orders_truth#

cleverly.datasets.weekly_orders_truth() → dict[str, float][source]#

Return the exact weekly order share under each plan and tilt, and each contrast.

Returns:
dict of str to float

ey_regimen[<plan> @ t=<week>] for each key of ORDER_PLANS and ORDER_TILTS and each week from 1 to 3; ate_regimen[<plan> vs never @ t=<week>] for the plans other than never; and ate_regimen[odds x2 vs natural course @ t=<week>]. These are the labels a fit reports.

See also

make_weekly_orders

The generator whose law these truths enumerate.

ORDER_PLANS

The plans this function evaluates.

Notes

Under a plan or a tilt, tracking loss is removed, and the offer of each week is drawn from the plan’s chance given the customer’s path so far. A tilt by a factor \(\delta\) multiplies the odds of the scoring system’s chance \(\pi\) of an offer, so the offer chance is \(\delta \pi / (\delta \pi + 1 - \pi)\).

Examples

>>> from cleverly.datasets import weekly_orders_truth
>>> truth = weekly_orders_truth()
>>> round(truth["ate_regimen[always vs never @ t=1]"], 3)
0.178
>>> round(truth["ate_regimen[odds x2 vs natural course @ t=3]"], 3)
0.013