auepc_score#
- empulse.metrics.auepc_score#
Area Under the Expected Profit Curve (AUEPC).
Calculate the area under the ratio of the expected profit of the model and the perfect model. The expected profit is based on the EMPB’s definition of profit. AUEPC 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. For detailed information, consult the paper [1].
clvis required and should be a 1D array-like with one value per sample. Seeempb_scoreto instead return the maximum profit.Methods
__call__(y_true, y_score, *, clv, alpha=6, beta=14, incentive_fraction=0.05, contact_cost=15)Compute the area under the expected profit curve.
AUEPC scores a whole ranking rather than a single decision, so it has no
optimal_thresholdoroptimal_rate. Useempb_score’s methods, which share its definition of profit, to find the threshold or targeted fraction that maximizes the expected profit.References
[1]Rahman, S., Janssens, B., Bogaert, M. (2025). Profit-Driven Pre-Processing in B2B Customer Churn Modeling using Fairness Techniques. Journal of Business Research.
Examples
from empulse.metrics import auepc_score y_true = [0, 1, 0, 1, 0, 1, 0, 1] y_score = [0.1, 0.2, 0.3, 0.4, 0.5, 0.7, 0.8, 0.9] clv = [100, 200, 150, 300, 120, 250, 180, 220] auepc_score(y_true, y_score, clv=clv, alpha=6, beta=14, incentive_fraction=0.05, contact_cost=15)