Skip to main content

Библиотека для проведения A/B тестов и расчета размера выборки.

Project description

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'
)

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


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.2.tar.gz (298.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

baraban-0.1.2-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file baraban-0.1.2.tar.gz.

File metadata

  • Download URL: baraban-0.1.2.tar.gz
  • Upload date:
  • Size: 298.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for baraban-0.1.2.tar.gz
Algorithm Hash digest
SHA256 0e1b728fa83125c8e4b75ee9095ce36875c558a474900a898fb11ea9f21fb5b9
MD5 e6f6c8a65e63587cc090ccca2998a639
BLAKE2b-256 798891f1fa05a4d2ff016ec187dcc945803cb3ee0e4cd47af93808430448289f

See more details on using hashes here.

File details

Details for the file baraban-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: baraban-0.1.2-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

Hashes for baraban-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 73909dc4d2304432f8af3dba78c5558907aec34dd4be0ad99e5b4c1db9f03c3d
MD5 03394e34dcf9a8d116a29ecf29e536fd
BLAKE2b-256 082b270fd0ff205b001e26ea1f12585a2d84a958b77432f2c41b516d31496bbb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page