Wise AB platform
Project description
TW Experimentation: A library for automated A/B testing and causal inference
TW Experimentation is a library to design experiments, check data, run statistical tests, causal inference and make decisions
What can this do for you?
The experimentation library can help you with:
- Sample Size Calculator link
- Integrity checks + Evaluation link
- Evaluation (Bayesian A/B testing) link
1. Designing experiments
By using TW Experimentation you can design your experiments, choose sample size, evaluate the experiment and calculate features and metrics.
2. Evaluating results
You can use different statistical tests and causal inference techniques.
Installation
You can install the package via the dependency manager poetry after cloning/git pull/download it as a zip from this repository.
To do so, clone the repository by running
git clone git@github.com:transferwise/tw-experimentation.git
from terminal. To set up poetry, run
make set-up-poetry-mac
for mac (or linux) and
make set-up-poetry-windows
for windows. Then, run
make run-streamlit-poetry
from the root of the package folder.
Alernative: TW Experimentation requires the following libraries to work which you can find in the .yml file. To install requirements please make sure you have installed the package manager Anaconda and then run the following commands in the terminal:
conda env create -n <my_env> -f envs/environment.yml
conda activate <my_env>
If you are using Windows, please do these additional steps:
- pick a jaxlib-0.3.7 wheel from here https://whls.blob.core.windows.net/unstable/index.html and install it manually (pip install <wheel_url>)
- Install jax==0.3.7
Quick Start
Make sure you have followed the installation instructions.
Notebooks
You can use the jupyter notebooks 1_pre_experiment.ipynb
or 2_integrity_checks + evaluation.ipynb
for experiments design and evaluation.
The tw experimentation package can be used for different things, for example for analyzing results:
df = pd.read_csv('experiment.csv')
ed = ExperimentDataset(
data=df,
variant="T",
targets=['conversion', 'revenue'],
date='trigger_dates',
pre_experiment_cols=None,
n_variants=2,
)
ed.preprocess_dataset(remove_outliers=True)
This code will generate the data model for experiment analysis
Streamlit web app
Open terminal and navigate to the repository.
Then navigate to the folder ./tw_experimentation/streamlit
.
Now run the command streamlit run Main.py
and the app should open in your browser.
Tip on navigation:
ls
- show files in current directory
pwd
- print current directory address
cd
- change directory, e.g. cd ./tw_experimentation/streamlit
For Developers
Testing
We use PyTest for testing. If you want to contribute code, make sure that the tests in tests/ run without errors.
Project details
Release history Release notifications | RSS feed
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
Hashes for tw_experimentation-0.1.1.13.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8a3b4b48e05feefc49e3994d86ad053e96b2927cfb2aa507fc0a46113f5aa98 |
|
MD5 | 4b03b96b1cab2cd1d7f5de08ccd40f4e |
|
BLAKE2b-256 | 4ad19416e18883121480c7ac9663c86286aa64b60b9fe20ddd759e8047b47266 |
Hashes for tw_experimentation-0.1.1.13-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b137f42d7a886689565e5f6afd8df11113dff24b620991d82060f86465ed19af |
|
MD5 | 87bf53aa4a9889e130bd880cb59742fb |
|
BLAKE2b-256 | 4f7a67372a5c99bbf4b73d7826481c21f335a2258a7a3c1403b0d70797744e47 |