Getting started
Install badgers with pip:
pip install badgers
Import badgers as any other library and start using it:
from numpy.random import default_rng
from sklearn.datasets import make_blobs
from scipy.stats import norm
from badgers.generators.tabular_data.noise import AdditiveNoiseGenerator
X, _ = make_blobs()
gen = AdditiveNoiseGenerator(random_generator=default_rng(0))
Xt = gen.generate(X, distribution=norm(scale=0.5))
More examples are available in the tutorials section.
Learn the concepts
New to badgers? The Understanding badgers notebook explains the underlying objects and contracts step by step: library structure, how to instanciate generators, the generate() API, selectors, data-generating processes (DGP), pipelines and more.
Build your own
Those interested in developing their own generators and/or contribute to badgers can have a look at the dev-tutorials section — three notebooks:
- Creating Tabular Generators
- Creating Selectors
- Using DGPs — the shipped backends incl. the dowhy-gcm and PyMC SCM adapters on fit / sample / intervene
For the big picture, see the architecture overview and CONTRIBUTING.md.
The API documentation is also available in the API section.