cleverly.datasets.pricing_truth#
- cleverly.datasets.pricing_truth(factors: Iterable[float] = (1.06, 1.25), nodes: tuple[int, int] = (8, 24)) dict[str, float][source]#
Return the exact mean renewal and revenue under each plan, and the effect of each plan.
A plan maps the price the engine would set to a new price. The mean outcome under the plan is a sum over the eight engagement paths of a Gauss–Legendre integral over usage and the three natural prices. The integral splits each price band at every break of the plan. The engagement and the engine’s next price respond to the assigned prices, as the law has them.
- Parameters:
- Returns:
dictofstrtofloatey_regimen[<plan>]andey_revenue[<plan>], the mean renewal and the mean revenue under each plan.ate_regimen[<plan> vs natural_prices]andate_revenue[<plan> vs natural_prices], the effect of each plan on both. These are the labels a fit reports.ate_engagement_held[<plan>],ate_engine_held[<plan>]andate_both_held[<plan>]forprice_upandprice_down, the decomposition below.
See also
make_sequential_pricingThe generator whose law this truth integrates.
PRICE_PLANSThe plans this function evaluates.
price_riseA plan with another factor.
Notes
An outcome regression on the usage, the engagement, and the prices can hold two things at the values the engine’s own prices produced. The decomposition keys give the effect on renewal when the plan’s prices enter the renewal model and one or both of these stay natural.
ate_engagement_held: the engagement model reads the natural price gap.ate_engine_held: the engine’s next price mean reads the natural price gap.ate_both_held: both read the natural gap. This is the limit of the estimate from a logistic regression of the renewal on the usage, the engagement, and the three prices, with the prices replaced by the plan’s prices.
Examples
>>> from cleverly.datasets import pricing_truth >>> truth = pricing_truth() >>> round(truth["ate_regimen[price_up vs natural_prices]"], 4) -0.1003 >>> truth["ate_regimen[price_down vs natural_prices]"] > 0.1 True