A Python library for working with A/B tests.
Project description
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 testing pipeline.
The project is intended for use in research and production environments based on data in pandas and Spark format.
Key functionality
Pilots design 🛫
Multi-group split 🎳
Matching of new control group to the existing pilot 🎏
Experiments result evaluation as p-value, point estimate of effect and confidence interval 🎞
Data preprocessing ✂️
Experiments acceleration 🎢
Documentation
For more details, see the Documentation and Tutorials.
Installation
You can always get the newest Ambrosia release using pip. Stable version is released on every tag to main branch.
pip install ambrosia
Starting from version 0.4.0, the ability to process PySpark data is optional and can be enabled using pip extras during the installation.
pip install ambrosia[spark]
Usage
The main functionality of Ambrosia is contained in several core classes and methods, which are autonomic for each stage of an experiment and have very intuitive interface.
Below is a brief overview example of using a set of three classes to conduct some simple experiment.
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
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
Built Distribution
File details
Details for the file ambrosia-0.4.1.tar.gz
.
File metadata
- Download URL: ambrosia-0.4.1.tar.gz
- Upload date:
- Size: 87.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.8.16 Linux/5.15.0-1035-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fce128842183ebacea6db6726f514d4c928ccb2a57b9211b270b9dc3e5b896f9 |
|
MD5 | 001b7e28bf1b0ce5301d2a7a5be1f3e3 |
|
BLAKE2b-256 | 1f2fecb5fe91285056ae1c9ff62761f72f526e59e8b6a7ee4f78dfa729e279ff |
File details
Details for the file ambrosia-0.4.1-py3-none-any.whl
.
File metadata
- Download URL: ambrosia-0.4.1-py3-none-any.whl
- Upload date:
- Size: 120.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.8.16 Linux/5.15.0-1035-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21d52dbfa4357df6cb4ef6107a855db8b0425fd90f8b827cdc10af2aa1ee9660 |
|
MD5 | c1272e2e8765875c7159d2221d9d11ef |
|
BLAKE2b-256 | 85726387dbb9ddd8954c507e830679924af7d45e804766d7564e63d82a30249f |