empb_score#

empulse.metrics.empb_score(y_true, y_score, *, clv, alpha=6, beta=14, incentive_fraction=0.05, contact_cost=15, check_input=True)[source]#

empb but only returning the EMPB score.

EMPB presumes a situation where identified churners are contacted and offered an incentive to remain customers. Only a fraction of churners accepts the incentive offer, this fraction is described by a \(Beta(\alpha, \beta)\) distribution. As opposed to empc, the incentive cost is a fraction of the customer lifetime value, rather than a fixed value. For detailed information, consult the paper [1].

See also

empb : to also return the fraction of the customer base that should be targeted to maximize profit.

empc_score : for a similar metric, but with a fixed incentive cost.

Parameters:
y_true1D array-like, shape=(n_samples,)

Binary target values (‘churn’: 1, ‘no churn’: 0).

y_score1D array-like, shape=(n_samples,)

Target scores, can either be probability estimates or non-thresholded decision values.

alphafloat, default=6

Shape parameter of the beta distribution of the probability that a churner accepts the incentive (alpha > 1).

betafloat, default=14

Shape parameter of the beta distribution of the probability that a churner accepts the incentive (beta > 1).

clvfloat or 1D array-like, shape=(n_samples)

If float: average customer lifetime value of retained customers. If array: customer lifetime value of each customer when retained.

incentive_fractionfloat, default=0.05

Cost of incentive offered to a customer, as a fraction of customer lifetime value (0 < incentive_fraction < 1).

contact_costfloat, default=15

Cost of contacting a customer (contact_cost > 0).

check_inputbool, default=True

Perform input validation. Turning off improves performance, useful when using this metric as a loss function.

Returns:
empbfloat

Expected Maximum Profit Measure for B2B Customer Churn

References

[1]

Janssens, B., Bogaert, M., Bagué, A., & Van den Poel, D. (2022). B2Boost: Instance-dependent profit-driven modelling of B2B churn. Annals of Operations Research, 1-27.