Skip to content

Commit

Permalink
Merge branch 'release/v0.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
maks-sh committed Apr 28, 2020
2 parents 7e83f38 + 921923a commit 7854df2
Show file tree
Hide file tree
Showing 15 changed files with 1,252 additions and 92 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ fabric.properties
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

notebooks/RetailHero-data/*
notebooks/content/*
notebooks/catboost_info
notebooks/*.tmp

Expand Down
21 changes: 14 additions & 7 deletions Readme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,18 @@
.. |Docs| image:: https://readthedocs.org/projects/scikit-uplift/badge/?version=latest
.. _Docs: https://scikit-uplift.readthedocs.io/en/latest/

.. _RU: https://nbviewer.jupyter.org/github/maks-sh/scikit-uplift/blob/master/notebooks/RetailHero.ipynb
.. _EN: https://nbviewer.jupyter.org/github/maks-sh/scikit-uplift/blob/master/notebooks/RetailHero_EN.ipynb

.. |Open In Colab1| image:: https://colab.research.google.com/assets/colab-badge.svg
.. _Open In Colab1: https://colab.research.google.com/github/maks-sh/scikit-uplift/blob/master/notebooks/RetailHero_EN.ipynb

.. |Open In Colab2| image:: https://colab.research.google.com/assets/colab-badge.svg
.. _Open In Colab2: https://colab.research.google.com/github/maks-sh/scikit-uplift/blob/master/notebooks/RetailHero.ipynb


.. |Open In Colab3| image:: https://colab.research.google.com/assets/colab-badge.svg
.. _Open In Colab3: https://colab.research.google.com/github/maks-sh/scikit-uplift/blob/master/notebooks/pipeline_usage_EN.ipynb

.. |Open In Colab4| image:: https://colab.research.google.com/assets/colab-badge.svg
.. _Open In Colab4: https://colab.research.google.com/github/maks-sh/scikit-uplift/blob/master/notebooks/pipeline_usage_RU.ipynb

.. _scikit-uplift.readthedocs.io: https://scikit-uplift.readthedocs.io/en/latest/
.. _Part 1: https://habr.com/ru/company/ru_mts/blog/485980/
.. _Part 2: https://habr.com/ru/company/ru_mts/blog/485976/
Expand Down Expand Up @@ -50,9 +53,13 @@ More about uplift modelling problem read in russian on habr.com: `Part 1`_ and `

* Applying any estimator adheres to scikit-learn conventions;

* 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|_))

* Almost all implemented approaches solve both the problem of classification and regression;

* A lot of metrics (Such as *Area Under Uplift Curve* or *Area Under Qini Curve*) are implemented to evaluate your uplift model.
* A lot of metrics (Such as *Area Under Uplift Curve* or *Area Under Qini Curve*) are implemented to evaluate your uplift model;

* Useful graphs for analyzing the built model.

Installation
-------------
Expand Down Expand Up @@ -89,7 +96,7 @@ And if you now point your browser to ``_build/html/index.html``, you should see
Quick Start
-----------

See the **RetailHero tutorial notebook** (`EN`_ |Open In Colab1|_, `RU`_ |Open In Colab2|_) for details.
See the **RetailHero tutorial notebook** (`EN <https://nbviewer.jupyter.org/github/maks-sh/scikit-uplift/blob/master/notebooks/RetailHero_EN.ipynb>`__ |Open In Colab1|_, `RU <https://nbviewer.jupyter.org/github/maks-sh/scikit-uplift/blob/master/notebooks/RetailHero.ipynb>`__ |Open In Colab2|_) for details.

**Train and predict uplift model**

Expand Down Expand Up @@ -157,7 +164,7 @@ Important links
- Official source code repo: https://github.com/maks-sh/scikit-uplift/
- Issue tracker: https://github.com/maks-sh/scikit-uplift/issues
- Release History: https://scikit-uplift.readthedocs.io/en/latest/changelog.html
===============
Expand Down
19 changes: 19 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,24 @@
* 🔨 something that previously didn’t work as documentated – or according to reasonable expectations – should now work.
* ❗️ you will need to change your code to have the same effect in the future; or a feature will be removed in the future.

## Version 0.1.1

### [sklift.viz](https://scikit-uplift.readthedocs.io/en/latest/api/viz.html)

* 💥 Add [plot_uplift_by_percentile](https://scikit-uplift.readthedocs.io/en/latest/api/viz.html#sklift.viz.base.plot_uplift_by_percentile) by [@ElisovaIra](https://github.com/ElisovaIra).
* 🔨 Fix bug with import [plot_treatment_balance_curve](https://scikit-uplift.readthedocs.io/en/latest/api/viz.html#sklift.viz.base.plot_treatment_balance_curve).

### [sklift.metrics](https://scikit-uplift.readthedocs.io/en/latest/api/metrics.html)

* 💥 Add [response_rate_by_percentile](https://scikit-uplift.readthedocs.io/en/latest/api/viz.html#sklift.metrics.metrics.response_rate_by_percentile) by [@ElisovaIra](https://github.com/ElisovaIra).
* 🔨 Fix bug with import [uplift_auc_score](https://scikit-uplift.readthedocs.io/en/latest/api/metrics.html#sklift.metrics.metrics.uplift_auc_score) and [qini_auc_score](https://scikit-uplift.readthedocs.io/en/latest/metrics.html#sklift.metrics.metrics.qini_auc_score).
* 📝 Fix typos in docstrings.

### Miscellaneous

* 💥 Add tutorial ["Example of usage model from sklift.models in sklearn.pipeline"](https://nbviewer.jupyter.org/github/maks-sh/scikit-uplift/blob/master/notebooks/pipeline_usage_EN.ipynb).
* 📝 Add link to Release History in main Readme.md.

## Version 0.1.0

### [sklift.models](https://scikit-uplift.readthedocs.io/en/latest/api/models.html)
Expand All @@ -19,6 +37,7 @@

* 💥 Add [treatment_balance_curve](https://scikit-uplift.readthedocs.io/en/latest/api/metrics.html#sklift.metrics.metrics.treatment_balance_curve) by [@spiaz](https://github.com/spiaz).
* ❗️ The metrics `auuc` and `auqc` are now respectively renamed to [uplift_auc_score](https://scikit-uplift.readthedocs.io/en/latest/api/metrics.html#sklift.metrics.metrics.uplift_auc_score) and [qini_auc_score](https://scikit-uplift.readthedocs.io/en/latest/metrics.html#sklift.metrics.metrics.qini_auc_score). So, `auuc` and `auqc` will be removed in 0.2.0.
* ❗️ Add a new parameter `startegy` in [uplift_at_k](https://scikit-uplift.readthedocs.io/en/latest/metrics.html#sklift.metrics.metrics.uplift_at_k).

### [sklift.viz](https://scikit-uplift.readthedocs.io/en/latest/api/viz.html)

Expand Down
12 changes: 11 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
.. _Part 1: https://habr.com/ru/company/ru_mts/blog/485980/
.. _Part 2: https://habr.com/ru/company/ru_mts/blog/485976/

.. |Open In Colab3| image:: https://colab.research.google.com/assets/colab-badge.svg
.. _Open In Colab3: https://colab.research.google.com/github/maks-sh/scikit-uplift/blob/master/notebooks/pipeline_usage_EN.ipynb

.. |Open In Colab4| image:: https://colab.research.google.com/assets/colab-badge.svg
.. _Open In Colab4: https://colab.research.google.com/github/maks-sh/scikit-uplift/blob/master/notebooks/pipeline_usage_RU.ipynb

**************
scikit-uplift
**************
Expand All @@ -18,9 +24,13 @@ Features

* Applying any estimator adheres to scikit-learn conventions;

* 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|_))

* Almost all implemented approaches solve both the problem of classification and regression;

* A lot of metrics (Such as *Area Under Uplift Curve* or *Area Under Qini Curve*) are implemented to evaluate your uplift model.
* A lot of metrics (Such as *Area Under Uplift Curve* or *Area Under Qini Curve*) are implemented to evaluate your uplift model;

* Useful graphs for analyzing the built model.


**The package currently supports the following methods:**
Expand Down
15 changes: 11 additions & 4 deletions docs/tutorials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
.. |Open In Colab2| image:: https://colab.research.google.com/assets/colab-badge.svg
:target: https://colab.research.google.com/github/maks-sh/scikit-uplift/blob/master/notebooks/RetailHero.ipynb

.. _Example of usage model from sklift.models in sklearn.pipeline: https://nbviewer.jupyter.org/github/maks-sh/scikit-uplift/blob/master/notebooks/pipeline_usage_EN.ipynb
.. |Open In Colab3| image:: https://colab.research.google.com/assets/colab-badge.svg
:target: https://colab.research.google.com/github/maks-sh/scikit-uplift/blob/master/notebooks/pipeline_usage_EN.ipynb
.. |Open In Colab4| image:: https://colab.research.google.com/assets/colab-badge.svg
:target: https://colab.research.google.com/github/maks-sh/scikit-uplift/blob/master/notebooks/pipeline_usage_RU.ipynb

**********
Tutorials
Expand All @@ -12,10 +17,12 @@ Tutorials
Basic
########

It is better to start scikit-uplift from the basic tutorial.
It is better to start scikit-uplift from the basic tutorials.

* `The overview of the basic approaches to solving the Uplift Modeling problem`_
* In Englsih: `nbviewer <https://nbviewer.jupyter.org/github/maks-sh/scikit-uplift/blob/master/notebooks/RetailHero_EN.ipynb>`_ | `github <https://github.com/maks-sh/scikit-uplift/blob/master/notebooks/RetailHero_EN.ipynb>`_ |Open In Colab1|
* In Russian: `nbviewer <https://nbviewer.jupyter.org/github/maks-sh/scikit-uplift/blob/master/notebooks/RetailHero.ipynb>`_ | `github <https://github.com/maks-sh/scikit-uplift/blob/master/notebooks/RetailHero.ipynb>`_ |Open In Colab2|

* In English: `nbviewer <https://nbviewer.jupyter.org/github/maks-sh/scikit-uplift/blob/master/notebooks/RetailHero_EN.ipynb>`__ | `github <https://github.com/maks-sh/scikit-uplift/blob/master/notebooks/RetailHero_EN.ipynb>`__ |Open In Colab1|
* In Russian: `nbviewer <https://nbviewer.jupyter.org/github/maks-sh/scikit-uplift/blob/master/notebooks/RetailHero.ipynb>`__ | `github <https://github.com/maks-sh/scikit-uplift/blob/master/notebooks/RetailHero.ipynb>`__ |Open In Colab2|

* `Example of usage model from sklift.models in sklearn.pipeline`_
* In English: `nbviewer <https://nbviewer.jupyter.org/github/maks-sh/scikit-uplift/blob/master/notebooks/pipeline_usage_EN.ipynb>`__ | `github <https://github.com/maks-sh/scikit-uplift/blob/master/notebooks/pipeline_usage_EN.ipynb>`__ |Open In Colab3|
* In Russian: `nbviewer <https://nbviewer.jupyter.org/github/maks-sh/scikit-uplift/blob/master/notebooks/pipeline_usage_RU.ipynb>`__ | `github <https://github.com/maks-sh/scikit-uplift/blob/master/notebooks/pipeline_usage_RU.ipynb>`__ |Open In Colab4|
28 changes: 28 additions & 0 deletions notebooks/Readme.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.. _The overview of the basic approaches to solving the Uplift Modeling problem: https://nbviewer.jupyter.org/github/maks-sh/scikit-uplift/blob/master/notebooks/RetailHero_EN.ipynb
.. |Open In Colab1| image:: https://colab.research.google.com/assets/colab-badge.svg
:target: https://colab.research.google.com/github/maks-sh/scikit-uplift/blob/master/notebooks/RetailHero_EN.ipynb
.. |Open In Colab2| image:: https://colab.research.google.com/assets/colab-badge.svg
:target: https://colab.research.google.com/github/maks-sh/scikit-uplift/blob/master/notebooks/RetailHero.ipynb

.. _Example of usage model from sklift.models in sklearn.pipeline: https://nbviewer.jupyter.org/github/maks-sh/scikit-uplift/blob/master/notebooks/pipeline_usage_EN.ipynb
.. |Open In Colab3| image:: https://colab.research.google.com/assets/colab-badge.svg
:target: https://colab.research.google.com/github/maks-sh/scikit-uplift/blob/master/notebooks/pipeline_usage_EN.ipynb
.. |Open In Colab4| image:: https://colab.research.google.com/assets/colab-badge.svg
:target: https://colab.research.google.com/github/maks-sh/scikit-uplift/blob/master/notebooks/pipeline_usage_RU.ipynb

**********
Tutorials
**********

Basic
########

It is better to start scikit-uplift from the basic tutorials.

* `The overview of the basic approaches to solving the Uplift Modeling problem`_
* In English: `nbviewer <https://nbviewer.jupyter.org/github/maks-sh/scikit-uplift/blob/master/notebooks/RetailHero_EN.ipynb>`_ | `github <https://github.com/maks-sh/scikit-uplift/blob/master/notebooks/RetailHero_EN.ipynb>`_ |Open In Colab1|
* In Russian: `nbviewer <https://nbviewer.jupyter.org/github/maks-sh/scikit-uplift/blob/master/notebooks/RetailHero.ipynb>`_ | `github <https://github.com/maks-sh/scikit-uplift/blob/master/notebooks/RetailHero.ipynb>`_ |Open In Colab2|

* `Example of usage model from sklift.models in sklearn.pipeline`_
* In English: `nbviewer <https://nbviewer.jupyter.org/github/maks-sh/scikit-uplift/blob/master/notebooks/pipeline_usage_EN.ipynb>`_ | `github <https://github.com/maks-sh/scikit-uplift/blob/master/notebooks/pipeline_usage_EN.ipynb>`_ |Open In Colab3|
* In Russian: `nbviewer <https://nbviewer.jupyter.org/github/maks-sh/scikit-uplift/blob/master/notebooks/pipeline_usage_RU.ipynb>`_ | `github <https://github.com/maks-sh/scikit-uplift/blob/master/notebooks/pipeline_usage_RU.ipynb>`_ |Open In Colab4|
50 changes: 25 additions & 25 deletions notebooks/RetailHero.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@
"execution_count": 1,
"metadata": {
"ExecuteTime": {
"end_time": "2020-04-16T20:41:07.634319Z",
"start_time": "2020-04-16T20:41:07.630711Z"
"end_time": "2020-04-28T09:24:37.492036Z",
"start_time": "2020-04-28T09:24:37.488584Z"
},
"colab": {
"base_uri": "https://localhost:8080/",
Expand All @@ -126,7 +126,7 @@
"urllib.request.urlretrieve(url, '/content/retail_hero.zip')\n",
"\n",
"!unzip /content/retail_hero.zip\n",
"!pip install scikit-uplift==0.1.0 catboost=0.22"
"!pip install scikit-uplift==0.1.1 catboost=0.22"
]
},
{
Expand All @@ -144,8 +144,8 @@
"execution_count": 2,
"metadata": {
"ExecuteTime": {
"end_time": "2020-04-16T20:41:10.715080Z",
"start_time": "2020-04-16T20:41:07.644388Z"
"end_time": "2020-04-28T09:24:40.783897Z",
"start_time": "2020-04-28T09:24:37.503470Z"
},
"colab": {},
"colab_type": "code",
Expand Down Expand Up @@ -196,8 +196,8 @@
"execution_count": 3,
"metadata": {
"ExecuteTime": {
"end_time": "2020-04-16T20:41:11.873021Z",
"start_time": "2020-04-16T20:41:10.717336Z"
"end_time": "2020-04-28T09:24:42.100096Z",
"start_time": "2020-04-28T09:24:40.786498Z"
},
"colab": {},
"colab_type": "code",
Expand Down Expand Up @@ -251,8 +251,8 @@
"execution_count": 4,
"metadata": {
"ExecuteTime": {
"end_time": "2020-04-16T20:41:14.061983Z",
"start_time": "2020-04-16T20:41:11.875565Z"
"end_time": "2020-04-28T09:24:44.483576Z",
"start_time": "2020-04-28T09:24:42.102707Z"
},
"colab": {
"base_uri": "https://localhost:8080/",
Expand Down Expand Up @@ -313,8 +313,8 @@
"execution_count": 5,
"metadata": {
"ExecuteTime": {
"end_time": "2020-04-16T20:41:14.084652Z",
"start_time": "2020-04-16T20:41:14.064998Z"
"end_time": "2020-04-28T09:24:44.511016Z",
"start_time": "2020-04-28T09:24:44.486035Z"
},
"colab": {
"base_uri": "https://localhost:8080/",
Expand Down Expand Up @@ -484,8 +484,8 @@
"execution_count": 6,
"metadata": {
"ExecuteTime": {
"end_time": "2020-04-16T20:41:15.254843Z",
"start_time": "2020-04-16T20:41:14.087893Z"
"end_time": "2020-04-28T09:24:45.715602Z",
"start_time": "2020-04-28T09:24:44.514353Z"
},
"colab": {
"base_uri": "https://localhost:8080/",
Expand Down Expand Up @@ -545,8 +545,8 @@
"execution_count": 7,
"metadata": {
"ExecuteTime": {
"end_time": "2020-04-16T20:41:17.230517Z",
"start_time": "2020-04-16T20:41:15.257156Z"
"end_time": "2020-04-28T09:24:47.941480Z",
"start_time": "2020-04-28T09:24:45.719641Z"
},
"colab": {
"base_uri": "https://localhost:8080/",
Expand Down Expand Up @@ -632,8 +632,8 @@
"execution_count": 8,
"metadata": {
"ExecuteTime": {
"end_time": "2020-04-16T20:41:19.361999Z",
"start_time": "2020-04-16T20:41:17.233889Z"
"end_time": "2020-04-28T09:24:50.571779Z",
"start_time": "2020-04-28T09:24:47.944822Z"
},
"colab": {
"base_uri": "https://localhost:8080/",
Expand Down Expand Up @@ -694,8 +694,8 @@
"execution_count": 9,
"metadata": {
"ExecuteTime": {
"end_time": "2020-04-16T20:41:21.519463Z",
"start_time": "2020-04-16T20:41:19.366080Z"
"end_time": "2020-04-28T09:24:52.942803Z",
"start_time": "2020-04-28T09:24:50.576741Z"
},
"colab": {
"base_uri": "https://localhost:8080/",
Expand Down Expand Up @@ -758,8 +758,8 @@
"execution_count": 10,
"metadata": {
"ExecuteTime": {
"end_time": "2020-04-16T20:41:21.536036Z",
"start_time": "2020-04-16T20:41:21.522709Z"
"end_time": "2020-04-28T09:24:52.964396Z",
"start_time": "2020-04-28T09:24:52.945544Z"
},
"colab": {
"base_uri": "https://localhost:8080/",
Expand Down Expand Up @@ -858,8 +858,8 @@
"execution_count": 11,
"metadata": {
"ExecuteTime": {
"end_time": "2020-04-16T20:41:24.150095Z",
"start_time": "2020-04-16T20:41:21.539068Z"
"end_time": "2020-04-28T09:24:56.505700Z",
"start_time": "2020-04-28T09:24:53.019392Z"
},
"colab": {
"base_uri": "https://localhost:8080/",
Expand Down Expand Up @@ -906,8 +906,8 @@
"execution_count": 12,
"metadata": {
"ExecuteTime": {
"end_time": "2020-04-16T20:41:24.171639Z",
"start_time": "2020-04-16T20:41:24.153353Z"
"end_time": "2020-04-28T09:24:56.560018Z",
"start_time": "2020-04-28T09:24:56.508541Z"
},
"colab": {
"base_uri": "https://localhost:8080/",
Expand Down
Loading

0 comments on commit 7854df2

Please sign in to comment.