Current collected state Current
Observed since 20 Oct, 17:31 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
AB tests library with simplicity in mind
AB tests library with simplicity in mind
pip install aboba
To conduct a test, you need several entities:
Data can be a simple pandas dataframe or custom data generator.
import numpy as np
import pandas as pd
import scipy.stats as sps
from aboba import (
tests,
splitters,
effect_modifiers,
experiment,
)
from aboba.pipeline import Pipeline
# Create dataset with two groups
data = pd.DataFrame({
'value' : np.concatenate([
sps.norm.rvs(size=1000, loc=0, scale=1),
sps.norm.rvs(size=1000, loc=0, scale=1),
]),
'is_b_group': np.concatenate([
np.repeat(0, 1000),
np.repeat(1, 1000),
]),
})
# Configure test
test = tests.AbsoluteIndependentTTest(
value_column='value',
)
# Create pipeline with splitter
splitter = splitters.GroupSplitter(
column='is_b_group',
size=100,
)
pipeline = Pipeline([
('splitter', splitter),
])
# Run experiment
n_iter = 500
exp = experiment.AbobaExperiment(draw_cols=1)
group_aa = exp.group(
name="AA, regular",
test=test,
data=data,
data_pipeline=pipeline,
n_iter=n_iter
)
group_aa.run()
effect = effect_modifiers.GroupModifier(
effects={1: 0.3},
value_column='value',
group_column='is_b_group',
)
group_ab = exp.group(
name="AB, regular, effect=0.3",
test=test,
data=data,
data_pipeline=pipeline,
synthetic_effect=effect,
n_iter=n_iter
)
group_ab.run()
# Draw results
fig, axes = exp.draw()
fig.savefig('results.png')
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE file for details
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.0.12 | 31 Mar 2026 | 21 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 17:31 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:09390933874799390147ae8973213ab032f7368a11df9545b49609a14dbcca39