TabDGP
A data-generating process (DGP) for grouped and flat tables.
TabDGP simulates tabular datasets from a random structural causal model (SCM) and aims to reproduce the quirks of real data. Each table comes with the graph and the settings that generated it.
Alpha. Release 0.1 draws flat tables from defaults that are round guesses; the rest follows the roadmap. Before 1.0, a release may change the dataset a key draws.
Highlights
- White-box. Each dataset carries its graph, latent nodes, column metadata and hyperparameters.
- Reproducible. A dataset is a pure function of its key (a seed and an index) and the hyperprior, whatever batch or worker draws it.
- Overridable. Replace any default distribution by a point value or another distribution.
Install
pip install tabdgp
Quickstart
from tabdgp import Hyperprior, draw
hyperprior = Hyperprior(rows=100, design_columns=5) # two overrides, the rest keep their defaults
dataset = draw(seed=0, index=0, hyperprior=hyperprior) # the key: a seed and an index
for name, column in dataset.metadata.items():
print(name, column.type, dataset.columns[name][:3].round(2))
print(len(dataset.latent), 'latent nodes,', dataset.graph.parents.sum(), 'edges')
x0 binary [1 1 1]
x1 binary [0 1 0]
x2 categorical [0 0 0]
x3 continuous [0.25 0.42 0.1 ]
7 latent nodes, 8 edges
Planned
- Grouping factors, with group-level and within-group covariates, time and treatment.
- Quirk axes: group confounding, rare levels, ties, bounds, near dependence and more.
- Matched defaults, fitted to mixedbench's real grouped tables, then widened.
- An outcome node, optional, for white-box misspecified datasets.
Learn more
CONTEXT.md defines the vocabulary,
and ROADMAP.md gives the roadmap.
Contributing
Issues and pull requests are welcome; see
CONTRIBUTING.md.
Citing
Please cite the release you used, from
CITATION.cff or GitHub's "Cite
this repository".
Licence
MIT.
Metadata
Release files for tabdgp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tabdgp-0.1.0.tar.gz | 97.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tabdgp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 112.3 kB
Release files / tabdgp-0.1.0.tar.gz
| Download URL | tabdgp-0.1.0.tar.gz |
|---|---|
| Size | 97.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
796eeb0681fe8e163c409afbf77184b18ade5c8b7f421c34a6538f98a8dc8d9d
|
|
BLAKE2b-256 checksum How to use checksums |
610eeb37d94773cb14295c8f23b3b15a940b4df05a1df64134f587ce47e056bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.
Transparency logRelease files / tabdgp-0.1.0-py3-none-any.whl
| Download URL | tabdgp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 15.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7112507a18a9786da244bcd7c5dd463ae3b360e6494749c0067120094a1d6818
|
|
BLAKE2b-256 checksum How to use checksums |
959aa4169ce00098651e2dff172e15c6577faac70f7450246e6c4ce87d950634
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.
Transparency log