Библиотека для проведения 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.8.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.8-py3-none-any.whl
(11.1 kB
view details)
File details
Details for the file baraban-0.1.8.tar.gz.
File metadata
- Download URL: baraban-0.1.8.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 |
b949764e6f8781c5867380937954c1831c998af279b5616f74b69bb33bfc8cea
|
|
| MD5 |
2f77d958af34681e56162600ce7236c1
|
|
| BLAKE2b-256 |
63c3817328c2bcb535c03df295c2cdc559b800e40186650bf3be6f4d161b0e95
|
File details
Details for the file baraban-0.1.8-py3-none-any.whl.
File metadata
- Download URL: baraban-0.1.8-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 |
61f09b167f5a0d7892b136c6333d88e7ce3c6cc3d883d3b2d6ae37b91e8dc663
|
|
| MD5 |
9680fc07b6d9120285c45409ae3fb688
|
|
| BLAKE2b-256 |
dcc9cb815758b3cb04ecbdde8769d21ef842cfda0da546a3f42830c0123f1dbe
|