uplift-analysis
uplift-analysis is a Python library that contains implementations of methods and utilities, which can serve use
cases requiring the analysis of uplift modeling techniques.
The implemented modules include scoring utilities, analysis strategy, and relevant visualization methods.
This library works for Python 3.7 and higher.
Installation
This library is distributed on PyPi and can be installed using pip.
$ pip install uplift-analysis
The command above will automatically install all the required dependencies. Please visit the installation page for more details.
Getting started
Check out the comprehensive tutorial for a complete walk-through of the library.
import pandas as pd
from uplift_analysis import data, evaluation
eval_set = data.EvalSet(df=pd.DataFrame({
'observed_action': treatments,
'responses': responses,
'score': scores,
'proposed_action': recommended_treatments
}))
evaluator = evaluation.Evaluator()
eval_res, summary = evaluator.eval_and_show(eval_set, specify=['uplift'],
show_random=True, num_random_rep=4)
Documentation
For more information, refer to the accompanying blogpost "Analyzing Uplift Models", the package's complete documentation, and the walkthrough tutorials.
Info for developers
The source code of the project is available on GitHub.
$ git clone https://github.com/PlaytikaOSS/uplift-analysis.git
You can install the library and the dependencies with one of the following commands:
$ pip install . # install library + dependencies
$ pip install ".[develop]" # install library + dependencies + developer-dependencies
$ pip install -r requirements.txt # install dependencies
$ pip install -r requirements-dev.txt # install developer-dependencies
For creating the "pip-installable" *.whl file, run the following command (at the root of the repository):
$ python -m build
For creating the HTML documentation of the project, run the following commands:
$ cd docs
$ make clean
$ make html
Run tests
Tests can be executed with pytest running the following commands:
$ cd tests
$ pytest # run all tests
$ pytest test_testmodule.py # run all tests within a module
$ pytest test_testmodule.py -k test_testname # run only 1 test
License
Metadata
Release files for uplift-analysis 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| uplift_analysis-0.0.3.tar.gz | 34.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| uplift_analysis-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 67.6 kB
Release files / uplift_analysis-0.0.3.tar.gz
| Download URL | uplift_analysis-0.0.3.tar.gz |
|---|---|
| Size | 34.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6ca1bf22cca053da57f57d946e6b5f195e6012f2d9de49783b008903702bfa8d
|
|
BLAKE2b-256 checksum How to use checksums |
c177cbd22ab15040760af69c7bbd66a968862e4318a3c5d241367b30cc399766
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.0
|
Release files / uplift_analysis-0.0.3-py3-none-any.whl
| Download URL | uplift_analysis-0.0.3-py3-none-any.whl |
|---|---|
| Size | 33.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
17abfc3e15de39e9ab9fe58bd070ddb5838af9a80907855592239ca5ef4824b9
|
|
BLAKE2b-256 checksum How to use checksums |
e2aa84d571de01da7d6d8bfbba9eece569c69e8dba1899e7deae63305a89197d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.0
|
Security for uplift-analysis 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.