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
Copy file name to clipboardExpand all lines: Readme.rst
+20-9Lines changed: 20 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,27 +36,36 @@
36
36
scikit-uplift
37
37
===============
38
38
39
-
**scikit-uplift** is a Python module for classic approaches for uplift modeling built on top of scikit-learn.
39
+
**scikit-uplift (sklift)** is an uplift modeling python package that provides fast sklearn-style models implementation, evaluation metrics and visualization tools.
40
40
41
-
Uplift prediction aims to estimate the causal impact of a treatment at the individual level.
41
+
Uplift modeling estimates a causal effect of treatment and uses it to effectively target customers that are most likely to respond to a marketing campaign.
42
+
43
+
**Use cases for uplift modeling:**
44
+
45
+
* Target customers in the marketing campaign. Quite useful in promotion of some popular product where there is a big part of customers who make a target action by themself without any influence. By modeling uplift you can find customers who are likely to make the target action (for instance, install an app) only when treated (for instance, received a push).
46
+
47
+
* Combine a churn model and an uplift model to offer some bonus to a group of customers who are likely to churn.
48
+
49
+
* Select a tiny group of customers in the campaign where a price per customer is high.
42
50
43
51
Read more about uplift modeling problem in `User Guide <https://scikit-uplift.readthedocs.io/en/latest/user_guide/index.html>`__,
44
-
also articles in russian on habr.com: `Part 1 <https://habr.com/ru/company/ru_mts/blog/485980/>`__
52
+
53
+
Articles in russian on habr.com: `Part 1 <https://habr.com/ru/company/ru_mts/blog/485980/>`__
45
54
and `Part 2 <https://habr.com/ru/company/ru_mts/blog/485976/>`__.
46
55
47
56
**Features**:
48
57
49
-
* Comfortable and intuitive style of modelling like scikit-learn;
58
+
* Сomfortable and intuitive scikit-learn-like API;
50
59
51
-
* Applying any estimator adheres to scikit-learn conventions;
60
+
* Applying any estimator compatible with scikit-learn (e.g. Xgboost, LightGBM, Catboost, etc.);
52
61
53
62
* All approaches can be used in sklearn.pipeline (see example (`EN <https://nbviewer.jupyter.org/github/maks-sh/scikit-uplift/blob/master/notebooks/pipeline_usage_EN.ipynb>`__ |Open In Colab3|_, `RU <https://nbviewer.jupyter.org/github/maks-sh/scikit-uplift/blob/master/notebooks/pipeline_usage_RU.ipynb>`__ |Open In Colab4|_));
54
63
55
-
* Almost all implemented approaches solve both the problem of classification and regression;
64
+
* Almost all implemented approaches solve classification and regression problem;
56
65
57
-
* A lot of metrics (Such as *Area Under Uplift Curve* or *Area Under Qini Curve*) are implemented to evaluate your uplift model;
66
+
* More uplift metrics that you have ever seen in one place! Include brilliants like *Area Under Uplift Curve* (AUUC) or *Area Under Qini Curve* (Qini coefficient) with ideal cases;
58
67
59
-
* Useful graphs for analyzing the built model.
68
+
* Nice and useful viz for analyzing a performance model.
60
69
61
70
Installation
62
71
-------------
@@ -149,7 +158,7 @@ See the **RetailHero tutorial notebook** (`EN <https://nbviewer.jupyter.org/gith
@@ -164,6 +173,8 @@ We welcome new contributors of all experience levels.
164
173
- Please see our `Contributing Guide <https://scikit-uplift.readthedocs.io/en/latest/contributing.html>`_ for more details.
165
174
- By participating in this project, you agree to abide by its `Code of Conduct <https://github.com/maks-sh/scikit-uplift/blob/master/.github/CODE_OF_CONDUCT.md>`__.
Copy file name to clipboardExpand all lines: docs/index.rst
+27-14Lines changed: 27 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,28 +8,39 @@
8
8
scikit-uplift
9
9
**************
10
10
11
-
**scikit-uplift (sklift)** is a Python module for basic approaches of uplift modeling built on top of scikit-learn.
11
+
**scikit-uplift (sklift)** is an uplift modeling python package that provides fast sklearn-style models implementation, evaluation metrics and visualization tools.
12
12
13
-
Uplift prediction aims to estimate the causal impact of a treatment at the individual level.
13
+
The main idea is to provide easy-to-use and fast python package for uplift modeling. It delivers the model interface with the familiar scikit-learn API. One can use any popular estimator (for instance, from the Catboost library).
14
14
15
-
Read more about uplift modeling problem in :ref:`User Guide <user_guide>`,
16
-
also articles in russian on habr.com: `Part 1 <https://habr.com/ru/company/ru_mts/blog/485980/>`__
15
+
*Uplift modeling* estimates a causal effect of treatment and uses it to effectively target customers that are most likely to respond to a marketing campaign.
16
+
17
+
**Use cases for uplift modeling:**
18
+
19
+
* Target customers in the marketing campaign. Quite useful in promotion of some popular product where there is a big part of customers who make a target action by themself without any influence. By modeling uplift you can find customers who are likely to make the target action (for instance, install an app) only when treated (for instance, received a push).
20
+
21
+
* Combine a churn model and an uplift model to offer some bonus to a group of customers who are likely to churn.
22
+
23
+
* Select a tiny group of customers in the campaign where a price per customer is high.
24
+
25
+
Read more about *uplift modeling* problem in `User Guide <https://scikit-uplift.readthedocs.io/en/latest/user_guide/index.html>`__,
26
+
27
+
Articles in russian on habr.com: `Part 1 <https://habr.com/ru/company/ru_mts/blog/485980/>`__
17
28
and `Part 2 <https://habr.com/ru/company/ru_mts/blog/485976/>`__.
18
29
19
30
Features
20
31
#########
21
32
22
-
- Comfortable and intuitive style of modelling like scikit-learn;
33
+
- Сomfortable and intuitive scikit-learn-like API;
23
34
24
-
- Applying any estimator adheres to scikit-learn conventions;
35
+
- Applying any estimator compatible with scikit-learn (e.g. Xgboost, LightGBM, Catboost, etc.);
25
36
26
-
- All approaches can be used in sklearn.pipeline. See example of usage: |Open In Colab3|_;
37
+
- All approaches can be used in `sklearn.pipeline`. See the example of usage: |Open In Colab3|_;
27
38
28
-
- Almost all implemented approaches solve both the problem of classification and regression;
39
+
- Almost all implemented approaches solve classification and regression problem;
29
40
30
-
- A lot of metrics (Such as *Area Under Uplift Curve* or *Area Under Qini Curve*) are implemented to evaluate your uplift model;
41
+
- More uplift metrics that you have ever seen in one place! Include brilliants like *Area Under Uplift Curve* (AUUC) or *Area Under Qini Curve* (Qini coefficient) with ideal cases;
31
42
32
-
- Useful graphs for analyzing the built model.
43
+
- Nice and useful viz for analyzing a performance model.
33
44
34
45
35
46
**The package currently supports the following methods:**
We welcome new contributors of all experience levels.
71
+
Sklift is being actively maintained and welcomes new contributors of all experience levels.
61
72
62
-
- Please see our `Contributing Guide <https://scikit-uplift.readthedocs.io/en/latest/contributing.html>`_ for more details.
73
+
- Please see our `Contributing Guide <https://www.uplift-modeling.com/en/latest/contributing.html>`_ for more details.
63
74
- By participating in this project, you agree to abide by its `Code of Conduct <https://github.com/maks-sh/scikit-uplift/blob/master/.github/CODE_OF_CONDUCT.md>`__.
:alt:Cover of User Guide for uplift modeling and causal inference
9
9
10
-
Uplift modeling estimates the effect of communication action on some customer outcome and gives an opportunity to efficiently target customers which are most likely to respond to a marketing campaign.
10
+
Uplift modeling estimates the effect of communication action on some customer outcomes and gives an opportunity to efficiently target customers which are most likely to respond to a marketing campaign.
11
11
It is relatively easy to implement, but surprisingly poorly covered in the machine learning courses and literature.
12
12
This guide is going to shed some light on the essentials of causal inference estimating and uplift modeling.
13
13
@@ -44,5 +44,5 @@ If you find this User Guide useful for your research, please consider citing:
Copy file name to clipboardExpand all lines: docs/user_guide/introduction/cate.rst
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
Causal Inference: Basics
3
3
******************************************
4
4
5
-
In a perfect world, we want to calculate a difference in a person's reaction received communication and the reaction without receiving any communication.
5
+
In a perfect world, we want to calculate a difference in a person's reaction received communication, and the reaction without receiving any communication.
6
6
But there is a problem: we can not make a communication (send an e-mail) and do not make a communication (no e-mail) at the same time.
@@ -29,8 +29,8 @@ But we can estimate CATE or *uplift* of an object:
29
29
30
30
Where:
31
31
32
-
- :math:`W_i \in {0, 1}` - a binary variable: 1 if person :math:`i` receives the treatment :guilabel:`treatment group`, and 0 if person :math:`i` receives no treatment :guilabel:`control group`;
33
-
- :math:`Y_i` - person :math:`i`’s observed outcome, which is actually equal:
32
+
- :math:`W_i \in {0, 1}` - a binary variable: 1 if person :math:`i` receives the :guilabel:`treatment group`, and 0 if person :math:`i` receives no treatment :guilabel:`control group`;
33
+
- :math:`Y_i` - person :math:`i`’s observed outcome, which is equal:
34
34
35
35
.. math::
36
36
Y_i = W_i * Y_i^1 + (1 - W_i) * Y_i^0 = \
@@ -41,12 +41,12 @@ Where:
41
41
42
42
This won’t identify the CATE unless one is willing to assume that :math:`W_i` is independent of :math:`Y_i^1` and :math:`Y_i^0` conditional on :math:`X_i`. This assumption is the so-called *Unconfoundedness Assumption* or the *Conditional Independence Assumption* (CIA) found in the social sciences and medical literature.
43
43
This assumption holds true when treatment assignment is random conditional on :math:`X_i`.
44
-
Briefly this can be written as:
44
+
Briefly, this can be written as:
45
45
46
46
.. math::
47
47
CIA : \{Y_i^0, Y_i^1\} \perp \!\!\! \perp W_i \vert X_i
48
48
49
-
Also introduce additional useful notation.
49
+
Also, introduce additional useful notation.
50
50
Let us define the :guilabel:`propensity score`, :math:`p(X_i) = P(W_i = 1| X_i)`, i.e. the probability of treatment given :math:`X_i`.
:alt:Classification of customers based on their response to a treatment
9
9
:width:268 px
10
10
:height:282 px
11
11
:align:center
12
12
13
-
- :guilabel:`Do-Not-Disturbs` *(a.k.a. Sleeping-dogs)* have a strong negative response to a marketing communication. They are going to purchase if *NOT* treated and will *NOT* purchase *IF* treated. It is not only a wasted marketing budget but also a negative impact. For instance, customers targeted could result in rejecting current products or services. In terms of math: :math:`W_i = 1, Y_i = 0` or :math:`W_i = 0, Y_i = 1`.
13
+
- :guilabel:`Do-Not-Disturbs` *(a.k.a. Sleeping-dogs)* have a strong negative response to marketing communication. They are going to purchase if *NOT* treated and will *NOT* purchase *IF* treated. It is not only a wasted marketing budget but also a negative impact. For instance, customers targeted could result in rejecting current products or services. In terms of math: :math:`W_i = 1, Y_i = 0` or :math:`W_i = 0, Y_i = 1`.
14
14
- :guilabel:`Lost Causes` will *NOT* purchase the product *NO MATTER* they are contacted or not. The marketing budget in this case is also wasted because it has no effect. In terms of math: :math:`W_i = 1, Y_i = 0` or :math:`W_i = 0, Y_i = 0`.
15
15
- :guilabel:`Sure Things` will purchase *ANYWAY* no matter they are contacted or not. There is no motivation to spend the budget because it also has no effect. In terms of math: :math:`W_i = 1, Y_i = 1` or :math:`W_i = 0, Y_i = 1`.
16
-
- :guilabel:`Persuadables` will always respond *POSITIVE* to the marketing communication. They is going to purchase *ONLY* if contacted (or sometimes they purchase *MORE* or *EARLIER* only if contacted). This customer's type should be the only target for the marketing campaign. In terms of math: :math:`W_i = 0, Y_i = 0` or :math:`W_i = 1, Y_i = 1`.
16
+
- :guilabel:`Persuadables` will always respond *POSITIVE* to marketing communication. They are going to purchase *ONLY* if contacted (or sometimes they purchase *MORE* or *EARLIER* only if contacted). This customer's type should be the only target for the marketing campaign. In terms of math: :math:`W_i = 0, Y_i = 0` or :math:`W_i = 1, Y_i = 1`.
17
17
18
18
Because we can't communicate and not communicate with the customer at the same time, we will never be able to observe exactly which type a particular customer belongs to.
0 commit comments