You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add sklearn.metrics.cumulative_gain_curve and sklearn.metrics.lift_curve #10003
This is the first time I'm seeing these kinds of plots. I like CG curve at a glance, as an alternative to looking at gradients in an ROC curve, I suppose. Using more familiar terms, we're just plotting recall@k (for each class). Perhaps we should name it as such. Recall@k is something we should probably have implemented for the fixed k case...
the mixed usage of lift and gain in different papers is very confusing. The original paper for lift is here:
Ling C, Li C (1998). “Data Mining for Direct Marketing: Problems and solutions.”
In “Proceedings of the Fourth International Conference on Knowledge
Discovery and Data Mining,” pp. 73–79.
It is also very well explained in Kuhn's book of Applied Predictive Modeling
@jnothman , what @GuillemGSubies provides is convincing to me. Given the utility of these metrics and its usage, which seems to be used, I'm leaning towards accepting this feature.
For any point (p, q) where p < q on the ROC curve, the corresponding point on the lift curve would be (q*X% + p*(1-X%), q), where X is the percent of positive cases in the dataset. Thus, the lift curve is slightly under the ROC curve when p < q. Therefore, the lift index we propose is also closely related to the area under the curve (AUC) index of the ROC curves.
From wikipedia:
The lift curve can also be considered a variation on the receiver operating characteristic (ROC) curve, and is also known in econometrics as the Lorenz or power curve.[1]
+1 for inclusion of the gain curve/CAP. Naming should reflect different strands of literature: cumulative accuracy profile (CAP) [2][4], concentration curve [3], cumulative lift curve [5]. It should work for binary classification as well as regression (models for the expectation).
Some more background
The cumulative gains curve is the same as the Cumulative Accuracy Profile (CAP), see [1] and [4].
From [2]
Moody’s uses Cumulative Accuracy Profiles (CAP), to make visual, qualitative assessments of model performance. While similar tools exist under a variety of different names (lift-curves, dubbed-curves, receiver-operator curves, power curves, etc.).
Activity
jnothman commentedon Nov 4, 2017
This is the first time I'm seeing these kinds of plots. I like CG curve at a glance, as an alternative to looking at gradients in an ROC curve, I suppose. Using more familiar terms, we're just plotting recall@k (for each class). Perhaps we should name it as such. Recall@k is something we should probably have implemented for the fixed k case...
jnothman commentedon Nov 4, 2017
I've not yet understood the utility of lift.
RNAer commentedon Jun 12, 2018
the mixed usage of lift and gain in different papers is very confusing. The original paper for lift is here:
It is also very well explained in Kuhn's book of Applied Predictive Modeling
GuillemGSubies commentedon Jul 18, 2019
Any progress here? An intuitive explanation of the lift curve can be found here:
http://www2.cs.uregina.ca/~dbd/cs831/notes/lift_chart/lift_chart.html
It is like "how much better than the random model I am doing at each percentile"
adrinjalali commentedon Oct 7, 2022
@jnothman , what @GuillemGSubies provides is convincing to me. Given the utility of these metrics and its usage, which seems to be used, I'm leaning towards accepting this feature.
lorentzenchr commentedon Oct 7, 2022
From Ling & Li 1998
From wikipedia:
lorentzenchr commentedon Oct 7, 2022
TLDR
+1 for inclusion of the gain curve/CAP. Naming should reflect different strands of literature: cumulative accuracy profile (CAP) [2][4], concentration curve [3], cumulative lift curve [5]. It should work for binary classification as well as regression (models for the expectation).
Some more background
The cumulative gains curve is the same as the Cumulative Accuracy Profile (CAP), see [1] and [4].
From [2]
References:
[1] Tasche 2006 "Validation of internal rating systems and PD estimates"
https://arxiv.org/pdf/physics/0606071.pdf
[2] Soběhart, J.R., Keenan, S.C., & Stein, R.M. (2000). "Benchmarking Quantitative Default Risk Models: A Validation Methodology"
[3] Denuit, M., Trufin, J. (2021). "Lorenz curve, Gini coefficient, and Tweedie dominance for autocalibrated predictors"
https://dial.uclouvain.be/pr/boreal/object/boreal%3A254535/datastream/PDF_01/view
[4] https://www.listendata.com/2019/09/gini-cumulative-accuracy-profile-auc.html
[5] Ling C, Li C (1998). "Data Mining for Direct Marketing: Problems and solutions."
In Proceedings of the Fourth International Conference on Knowledge Discovery and Data Mining, pp. 73–79.
ogrisel commentedon Apr 4, 2024
The following reference seems also very relevant:
https://arxiv.org/abs/2207.14372
In particular: