Skip to main content

Python A/B testing experiment library

Project description

ABexp

alt text alt text alt text alt text alt text

ABexp is a Python library which aims to support users along the entire end-to-end A/B test experiment flow (see picture below). It contains A/B testing modules which use both frequentist and bayesian statistical approaches including bayesian generalized linear model (GLM).


A/B testing experiment flow


Installation

This library is distributed on PyPI and can be installed with pip. The latest release is version 0.0.1.

$ pip install abexp

The command above will automatically install all the dependencies listed in requirements.txt. Please visit the installation page for more details.


Getting started

A short example, illustrating it use:

import abexp

Compute the minimum sample size needed for an A/B test experiment with two variants, so called control and treatment groups.

from abexp.core.design import SampleSize

c = 0.33  # conversion rate control group
t = 0.31  # conversion rate treatment group

sample_size = SampleSize.ssd_prop(prop_contr=c, prop_treat=t)  # minimum sample size per each group

Documentation

For more information please read the full documentation and tutorials.


Info for developers

The source code of the project is available on GitHub.

$ git clone https://github.com/PlaytikaResearch/abexp.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

As suggested by the authors of pymc3 and pandoc, we highly recommend to install these dependencies with conda:

$ conda install -c conda-forge pandoc
$ conda install -c conda-forge pymc3

To create the file abexp.whl for the installation with pip run the following command:

$ python setup.py sdist bdist_wheel

To create the HTML documentation run the following commands:

$ cd docs
$ 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

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

abexp-0.0.3.tar.gz (9.6 MB view details)

Uploaded Source

Built Distribution

abexp-0.0.3-py3-none-any.whl (24.7 kB view details)

Uploaded Python 3

File details

Details for the file abexp-0.0.3.tar.gz.

File metadata

  • Download URL: abexp-0.0.3.tar.gz
  • Upload date:
  • Size: 9.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for abexp-0.0.3.tar.gz
Algorithm Hash digest
SHA256 fcea9abbdacac8d2f81de27e68f9cf3e97da91dddd26bb5895d30a85f15c0e8e
MD5 6432dd97b9b89e9ec5fddf0c54dae942
BLAKE2b-256 e36ee9815cd121f8e72db3435900b87d03188fdf96cd256608974e15301bcd99

See more details on using hashes here.

File details

Details for the file abexp-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: abexp-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 24.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for abexp-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b996be899eb1e1a5d2320a516e74e7a3cd912b52287b8d9ffb0c0c419cecc46b
MD5 c3dee7a6671c8f1d4fb40e3cfa8915dd
BLAKE2b-256 c4582862a26dddc342ed8af85984a7043c67b7f065fb7462a84e5ea86f9ad646

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page