Skip to content

Commit 7c1e88a

Browse files
committed
Merge branch 'realese/v0.3.0'
2 parents accaa13 + 056e2f2 commit 7c1e88a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1219
-320
lines changed

.github/CODE_OF_CONDUCT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
5555
## Enforcement
5656

5757
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58-
reported by contacting the project team. All
58+
reported by contacting the project team at [email protected]. All
5959
complaints will be reviewed and investigated and will result in a response that
6060
is deemed necessary and appropriate to the circumstances. The project team is
6161
obligated to maintain confidentiality with regard to the reporter of an incident.

.github/CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ So, please make a pull request to the ``dev`` branch.
1919
1. Fork the [project repository](https://github.com/maks-sh/scikit-uplift).
2020
2. Clone your fork of the scikit-uplift repo from your GitHub account to your local disk:
2121
``` bash
22-
$ git clone git@github.com:YourLogin/scikit-uplift.git
23-
$ cd scikit-learn
22+
$ git clone https://github.com/YourName/scikit-uplift
23+
$ cd scikit-uplift
2424
```
2525
3. Add the upstream remote. This saves a reference to the main scikit-uplift repository, which you can use to keep your repository synchronized with the latest changes:
2626
``` bash
@@ -36,7 +36,7 @@ So, please make a pull request to the ``dev`` branch.
3636
$ git checkout -b feature/my_new_feature
3737
```
3838
and start making changes. Always use a feature branch. It’s a good practice.
39-
6. Develop the feature on your feature branch on your computer, using Git to do the version control. When you’re done editing, add changed files using ``git add`` and then ``git commit``.
39+
6. Develop the feature on your feature branch on your computer, using Git to do the version control. When you’re done editing, add changed files using ``git add .`` and then ``git commit``
4040
Then push the changes to your GitHub account with:
4141

4242
``` bash
@@ -55,4 +55,4 @@ We follow the PEP8 style guide for Python. Docstrings follow google style.
5555
* Use the present tense ("Add feature" not "Added feature")
5656
* Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
5757
* Limit the first line to 72 characters or less
58-
* Reference issues and pull requests liberally after the first line
58+
* Reference issues and pull requests liberally after the first line
File renamed without changes.

.github/workflows/PyPi_upload.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Upload to PyPi
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
deploy:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Set up Python
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: '3.x'
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install setuptools wheel twine
22+
- name: Build and publish
23+
env:
24+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
25+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
26+
run: |
27+
python setup.py sdist bdist_wheel
28+
twine upload dist/*

.github/workflows/ci-test.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Python package
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
8+
9+
jobs:
10+
test:
11+
name: Check tests
12+
runs-on: ${{ matrix.operating-system }}
13+
strategy:
14+
matrix:
15+
operating-system: [ubuntu-latest, windows-latest, macos-latest]
16+
python-version: [3.6, 3.7, 3.8, 3.9]
17+
fail-fast: false
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v2
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
- name: Install dependencies and lints
26+
run: pip install pytest .[tests]
27+
- name: Run PyTest
28+
run: pytest
29+
30+
check_sphinx_build:
31+
name: Check Sphinx build for docs
32+
runs-on: ubuntu-latest
33+
strategy:
34+
matrix:
35+
python-version: [3.8]
36+
steps:
37+
- name: Checkout
38+
uses: actions/checkout@v2
39+
- name: Set up Python
40+
uses: actions/setup-python@v2
41+
with:
42+
python-version: ${{ matrix.python-version }}
43+
- name: Update pip
44+
run: python -m pip install --upgrade pip
45+
- name: Install dependencies
46+
run: pip install -r docs/requirements.txt
47+
- name: Run Sphinx
48+
run: sphinx-build -b html docs /tmp/_docs_build

Readme.rst

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,27 +36,36 @@
3636
scikit-uplift
3737
===============
3838

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.
4040

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.
4250

4351
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/>`__
4554
and `Part 2 <https://habr.com/ru/company/ru_mts/blog/485976/>`__.
4655

4756
**Features**:
4857

49-
* Comfortable and intuitive style of modelling like scikit-learn;
58+
* Сomfortable and intuitive scikit-learn-like API;
5059

51-
* Applying any estimator adheres to scikit-learn conventions;
60+
* Applying any estimator compatible with scikit-learn (e.g. Xgboost, LightGBM, Catboost, etc.);
5261

5362
* 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|_));
5463

55-
* Almost all implemented approaches solve both the problem of classification and regression;
64+
* Almost all implemented approaches solve classification and regression problem;
5665

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;
5867

59-
* Useful graphs for analyzing the built model.
68+
* Nice and useful viz for analyzing a performance model.
6069

6170
Installation
6271
-------------
@@ -149,7 +158,7 @@ See the **RetailHero tutorial notebook** (`EN <https://nbviewer.jupyter.org/gith
149158
# import vizualisation tools
150159
from sklift.viz import plot_qini_curve
151160
152-
plot_qini_curve(y_true=y_val, uplift=uplift_preds, treatment=treat_val)
161+
plot_qini_curve(y_true=y_val, uplift=uplift_preds, treatment=treat_val, negative_effect=True)
153162
154163
.. image:: docs/_static/images/Readme_qini_curve.png
155164
:width: 514px
@@ -164,6 +173,8 @@ We welcome new contributors of all experience levels.
164173
- Please see our `Contributing Guide <https://scikit-uplift.readthedocs.io/en/latest/contributing.html>`_ for more details.
165174
- 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>`__.
166175

176+
If you have any questions, please contact us at [email protected]
177+
167178
Contributing
168179
~~~~~~~~~~~~~~~
169180

docs/Readme.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
.. _scikit-uplift.readthedocs.io: https://scikit-uplift.readthedocs.io/en/latest/
1+
.. _uplift-modeling.com: https://www.uplift-modeling.com/en/latest/index.html
22

33
Documentation
44
===============
55

6-
The full documentation is available at `scikit-uplift.readthedocs.io`_.
6+
The full documentation is available at `uplift-modeling.com`_.
77

88
Or you can build the documentation locally using `Sphinx <http://sphinx-doc.org/>`_ 1.4 or later:
99

109 KB
Loading
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*****************************************
2+
`sklift.datasets <./>`_.clear_data_dir
3+
*****************************************
4+
5+
.. autofunction:: sklift.datasets.datasets.clear_data_dir

docs/api/datasets/fetch_criteo.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.. _Criteo:
2+
3+
**************************************
4+
`sklift.datasets <./>`_.fetch_criteo
5+
**************************************
6+
7+
.. autofunction:: sklift.datasets.datasets.fetch_criteo
8+
9+
.. include:: ../../../sklift/datasets/descr/criteo.rst

0 commit comments

Comments
 (0)