Библиотека для проведения A/B тестов и расчета размера выборки.
Project description
baraban
Библиотека для проведения A/B тестов и расчета размера выборки.
Установка
pip install baraban
Пример использования
from baraban import ABTester
tester = ABTester()
# Расчет размера выборки
sample_size = tester.calculate_sample_size(
metrics=['revenue', 'retention'],
effect_sizes=[0.05, 0.1], # 5% и 10%
pre_experiment_data=pre_experiment_data,
historical_data=historical_data,
strata=['geo', 'platform'],
alpha=0.05,
power=0.8,
outliers_handling_method='replace_threshold',
outliers_threshold_quantile=0.995,
outliers_type='upper'
)
# Проведение A/B теста
ab_test = tester.run_abtest(
metrics=['revenue', 'retention'],
experiment_data=experiment_data,
group_column='ab_group',
groups=['control', 'test'],
historical_data=historical_data,
strata=['geo', 'platform'],
alpha=0.05,
power=0.8,
outliers_handling_method='replace_threshold',
outliers_threshold_quantile=0.995,
outliers_type='upper',
boot_iterations=10000
)
Требования
- Python 3.8+
- pandas 1.3+
- numpy 1.20+
- scipy 1.7+
- statsmodels 0.13+
- pydantic 2.0+
- otvertka 0.1.7+
- tqdm 4.65+
Лицензия
MIT
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
baraban-0.1.1.tar.gz
(298.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
baraban-0.1.1-py3-none-any.whl
(10.7 kB
view details)
File details
Details for the file baraban-0.1.1.tar.gz.
File metadata
- Download URL: baraban-0.1.1.tar.gz
- Upload date:
- Size: 298.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3b76f112be54272b669542c728d82973192dd147c22935a86ce0ef96e41ec1a
|
|
| MD5 |
c04c93401444eb2537d604877462dbe2
|
|
| BLAKE2b-256 |
a32586891b542463a67895e6ddd3fec73008825f100d3e9de2b0507e42fdd2a6
|
File details
Details for the file baraban-0.1.1-py3-none-any.whl.
File metadata
- Download URL: baraban-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
404e4f40c1f794d36d91ed1aa630c45689da8d088b684362106c2f84c4c87a01
|
|
| MD5 |
0e05e1379c50cfad7736415e2875303f
|
|
| BLAKE2b-256 |
8b19034338050d8769bd0c0558b7bae9c351fea0e3724192be32aa78041ae24d
|