Skip to main content

baraban

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',
    binary_mde='absolute'
)

# Проведение 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

Metadata

Release files for baraban 0.1.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for baraban 0.1.10
File Size Uploaded
baraban-0.1.10.tar.gz 299.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for baraban 0.1.10
File Interpreter ABI Platform
baraban-0.1.10-py3-none-any.whl Python 3 none any Details

Total release size: 310.7 kB

Release files / baraban-0.1.10.tar.gz

Download URL baraban-0.1.10.tar.gz
Size 299.2 kB
Tags Source
SHA-256 checksum
How to use checksums
8dbac665cc8e5fb7c31451fa6377f58ff4787f74e693463d6035d4ada5bc7d24
BLAKE2b-256 checksum
How to use checksums
fe3904193a29dceb326d54ba2fc3ed7b30fe6e74aa2f0705a635387f529a7f86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.13.0

Release files / baraban-0.1.10-py3-none-any.whl

Download URL baraban-0.1.10-py3-none-any.whl
Size 11.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
08458f49f9b6d147eb92fc6f09aa123eff34ed5ece8a24388a6347d9ffa2dd98
BLAKE2b-256 checksum
How to use checksums
01ec27e22e3d3e9df48150b0ede2aa5febfdb3309b6511e14e1d899bc705c2be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.13.0

Release history Release notifications | RSS feed

This release

0.1.10 This release

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page