-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Add sklearn.metrics.cumulative_gain_curve and sklearn.metrics.lift_curve #10003
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
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... |
I've not yet understood the utility of lift. |
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 |
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" |
@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. |
From Ling & Li 1998
From wikipedia:
|
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 backgroundThe cumulative gains curve is the same as the Cumulative Accuracy Profile (CAP), see [1] and [4].
References: |
The following reference seems also very relevant: https://arxiv.org/abs/2207.14372 In particular: |
Description
I recently added
plot_cumulative_gain
andplot_lift_curve
methods to https://github.com/reiinakano/scikit-plot. To do this, I built an adhoc version ofcumulative_gain_curve
closely following thesklearn.metrics.roc_curve
interface at https://github.com/reiinakano/scikit-plot/blob/master/scikitplot/helpers.py#L157. Let me know ifsklearn.metrics.cumulative_gain_curve
is something you'd be interested in adding into scikit-learn. I could add example docs for plotting gain and lift curves as well.Reference I followed for lift and gain: https://www.ibm.com/support/knowledgecenter/en/SSLVMB_23.0.0/spss/tutorials/mlp_bankloan_outputtype_02.html
The text was updated successfully, but these errors were encountered: