Библиотека для проведения 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',
continuous_alternative='larger',
)
# Проведение 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',
continuous_alternative='larger',
)
Требования
- Python 3.8+
- pandas 1.3+
- numpy 1.20+
- scipy 1.7+
- statsmodels 0.13+
- pydantic 2.0+
- otvertka 0.1.10+
Лицензия
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.7.tar.gz
(298.7 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.7-py3-none-any.whl
(11.1 kB
view details)
File details
Details for the file baraban-0.1.7.tar.gz.
File metadata
- Download URL: baraban-0.1.7.tar.gz
- Upload date:
- Size: 298.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1556e03a0ddda5389293454b4cdcf7b592f64ded142bbeac16d73306628b13cb
|
|
| MD5 |
55895d4e93fb6f40864422053d32a9fb
|
|
| BLAKE2b-256 |
625a97bea0851833cf0dd58d484c50b589cd48491968257e8955065c4a9e2776
|
File details
Details for the file baraban-0.1.7-py3-none-any.whl.
File metadata
- Download URL: baraban-0.1.7-py3-none-any.whl
- Upload date:
- Size: 11.1 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 |
0a3b3f03e7f577f9aecd21c70337f7423c82250a2512fc5763e20367e391d4fd
|
|
| MD5 |
3f8a1b6370821ef2ac6a930822ae3c06
|
|
| BLAKE2b-256 |
9ea01ca2ce1a1ac4318881dafa335ddbd172b391e67f435b2f06aeaa7ef8f863
|