cleverly.datasets.offer_after_no_order#

cleverly.datasets.offer_after_no_order(previous_order: Any) → Any[source]#

Return the win-back offer: a code for a customer who did not order last week.

Parameters:
previous_orderarray_like of float

Last week’s order, 1 for an order and 0 for none. In week 1 it is the order of week 0, the week before the campaign.

Returns:
ndarray of float

1.0 (send the code) where previous_order is 0, and 0.0 elsewhere.

See also

ORDER_PLANS

The three plans of the weekly-outcomes tutorial.

Examples

>>> from cleverly.datasets import offer_after_no_order
>>> offer_after_no_order([0, 1, 0]).tolist()
[1.0, 0.0, 1.0]