Skip to main content

A Python library for working with A/B tests.

Project description

PyPI PyPI License ReadTheDocs Tests Coverage Black Python Versions

https://raw.githubusercontent.com/MobileTeleSystems/Ambrosia/main/docs/source/_static/ambrosia.png

Ambrosia is a Python library for A/B tests design, split and effect measurement. It provides rich set of methods for conducting full A/B test pipeline.

An experiment design stage is performed using metrics historical data which could be processed in both forms of pandas and spark dataframes with either theoretical or empirical approach.

Group split methods support different strategies and multi-group split, which allows to quickly create control and test groups of interest.

Final effect measurement stage is conducted via testing tools that are able to return relative and absolute effects and construct corresponding confidence intervalsfor continious and binary variables. Testing tools as well as design ones support significant number of statistical criteria, like t-test, non-parametric, and bootstrap.

For additional A/B tests support library provides features and tools for data preproccesing and experiment acceleration.

Key functionality

  • Pilots design ✈

  • Multi-group split 🎳

  • Matching of new control group to the existing pilot 🎏

  • Getting the experiments result evaluation as p-value, point estimate of effect and confidence interval 🎞

  • Experiments acceleration 🎢

Documentation

For more details, see the Documentation and Tutorials.

Installation

Stable version is released on every tag to main branch.

pip install ambrosia

Ambrosia requires Python 3.7+

Usage

Designer

from ambrosia.designer import Designer
designer = Designer(dataframe=df, effects=1.2, metrics='portfel_clc') # 20% effect, and loaded data frame df
designer.run('size')

Splitter

from ambrosia.splitter import Splitter
splitter = Splitter(dataframe=df, id_column='id') # loaded data frame df with column with id - 'id'
splitter.run(groups_size=500, method='simple')

Tester

from ambrosia.tester import Tester
tester = Tester(dataframe=df, column_groups='group') # loaded data frame df with groups info 'group'
tester.run(metrics='retention', method='theory', criterion='ttest')

Development

To install all requirements run

make install

You must have python3 and poetry installed.

For autoformatting run

make autoformat

For linters check run

make lint

For tests run

make test

For coverage run

make coverage

To remove virtual environment run

make clean

Communication

Developers and evangelists:

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

Ambrosia-0.2.0.tar.gz (75.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

ambrosia-0.2.0-py3-none-any.whl (104.6 kB view details)

Uploaded Python 3

Ambrosia-0.2.0-py3-none-any.whl (104.6 kB view details)

Uploaded Python 3

File details

Details for the file Ambrosia-0.2.0.tar.gz.

File metadata

  • Download URL: Ambrosia-0.2.0.tar.gz
  • Upload date:
  • Size: 75.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.0 CPython/3.9.6 Darwin/21.5.0

File hashes

Hashes for Ambrosia-0.2.0.tar.gz
Algorithm Hash digest
SHA256 4789272d0fa300cfec0f566f611ddec7e19c5965e2b622c3f62ef1871296b08f
MD5 7310d95c25e27a6297a8c7468d513bd7
BLAKE2b-256 84d193b78d508b2bf1274683b5922291059a58e2265e11d2825cfdc9a175aefe

See more details on using hashes here.

File details

Details for the file ambrosia-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: ambrosia-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 104.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.0 CPython/3.9.6 Darwin/21.5.0

File hashes

Hashes for ambrosia-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7d93f36009d8acb3022a058ffd14b05b84fcf44afb1a82f0e7662be3ebc557e1
MD5 25fcd7fc424b013e265822c1dc166094
BLAKE2b-256 d15dc69a74ac662cf56ea61ae2ddbee06f3016e41d1e97933984f66236bc9487

See more details on using hashes here.

File details

Details for the file Ambrosia-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: Ambrosia-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 104.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.15 CPython/3.8.14 Linux/5.15.0-1022-azure

File hashes

Hashes for Ambrosia-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bf9358ac07e52e6d43d75100c2289d2e1102397109f982be8b47b85c47163a69
MD5 e411df5261c9977023d6aa4e739662ee
BLAKE2b-256 5d0cc8bd9e82bf93a0a956bf7b053eccbd1216bd8964ed36c43cd6cc479af4d9

See more details on using hashes here.

Supported by

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