tabdgp 0.2.0__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. {tabdgp-0.2.0 → tabdgp-0.3.0}/.gitignore +2 -3
  2. {tabdgp-0.2.0 → tabdgp-0.3.0}/CITATION.cff +3 -3
  3. {tabdgp-0.2.0 → tabdgp-0.3.0}/CONTEXT.md +54 -25
  4. {tabdgp-0.2.0 → tabdgp-0.3.0}/CONTRIBUTING.md +5 -5
  5. tabdgp-0.3.0/LICENSE +202 -0
  6. {tabdgp-0.2.0 → tabdgp-0.3.0}/PKG-INFO +19 -28
  7. {tabdgp-0.2.0 → tabdgp-0.3.0}/README.md +17 -26
  8. {tabdgp-0.2.0 → tabdgp-0.3.0}/pyproject.toml +6 -3
  9. {tabdgp-0.2.0 → tabdgp-0.3.0}/src/tabdgp/column.py +128 -89
  10. {tabdgp-0.2.0 → tabdgp-0.3.0}/src/tabdgp/draw.py +29 -29
  11. {tabdgp-0.2.0 → tabdgp-0.3.0}/src/tabdgp/graph.py +108 -92
  12. {tabdgp-0.2.0 → tabdgp-0.3.0}/src/tabdgp/hyperprior.py +79 -52
  13. {tabdgp-0.2.0 → tabdgp-0.3.0}/src/tabdgp/mechanism.py +67 -67
  14. {tabdgp-0.2.0 → tabdgp-0.3.0}/tests/fixtures/build.py +15 -15
  15. {tabdgp-0.2.0 → tabdgp-0.3.0}/tests/test_column.py +209 -54
  16. {tabdgp-0.2.0 → tabdgp-0.3.0}/tests/test_draw.py +157 -41
  17. {tabdgp-0.2.0 → tabdgp-0.3.0}/tests/test_graph.py +142 -16
  18. {tabdgp-0.2.0 → tabdgp-0.3.0}/tests/test_hyperprior.py +76 -14
  19. {tabdgp-0.2.0 → tabdgp-0.3.0}/tests/test_mechanism.py +19 -19
  20. {tabdgp-0.2.0 → tabdgp-0.3.0}/uv.lock +1 -1
  21. tabdgp-0.2.0/LICENSE +0 -21
  22. tabdgp-0.2.0/docs/adr/.gitkeep +0 -0
  23. tabdgp-0.2.0/docs/adr/0001-one-dataset-per-draw-keyed-in-numpy.md +0 -94
  24. tabdgp-0.2.0/docs/adr/0002-package-release-first-paper-conditional.md +0 -67
  25. tabdgp-0.2.0/docs/adr/0003-grouping-factors-as-units-in-the-graph.md +0 -121
  26. tabdgp-0.2.0/docs/adr/0004-the-sizes-are-the-envelope.md +0 -79
  27. tabdgp-0.2.0/docs/conventions.md +0 -230
  28. {tabdgp-0.2.0 → tabdgp-0.3.0}/.github/workflows/ci.yml +0 -0
  29. {tabdgp-0.2.0 → tabdgp-0.3.0}/.github/workflows/release.yml +0 -0
  30. {tabdgp-0.2.0 → tabdgp-0.3.0}/src/tabdgp/__init__.py +0 -0
  31. {tabdgp-0.2.0 → tabdgp-0.3.0}/tests/test_citation.py +0 -0
  32. {tabdgp-0.2.0 → tabdgp-0.3.0}/tests/test_readme.py +0 -0
@@ -9,15 +9,14 @@ dist/
9
9
  .ipynb_checkpoints/
10
10
  .DS_Store
11
11
  .claude/
12
- # local agent instructions (docs/conventions.md is the public part) and the roadmap
12
+ # private files kept out of the repo
13
13
  CLAUDE.md
14
14
  ROADMAP.md
15
15
  next.md
16
- # design notes kept local: the lab notes and the prior-art survey
17
16
  lab/
18
17
  docs/prior-art.md
19
18
  docs/scamd-audit.md
20
19
  docs/related-simulators.md
21
20
  docs/frontier-priors.md
22
- # the model reports the survey read, kept local for their licences
21
+ # the model reports the survey read, kept local for their licenses
23
22
  docs/reports/
@@ -5,7 +5,7 @@ authors:
5
5
  - family-names: Kipnis
6
6
  given-names: Alex
7
7
  repository-code: https://github.com/adkipnis/tabdgp
8
- license: MIT
9
- version: 0.2.0
10
- date-released: 2026-10-14
8
+ license: Apache-2.0
9
+ version: 0.3.0
10
+ date-released: 2026-10-23
11
11
  doi: 10.5281/zenodo.23322845
@@ -13,12 +13,12 @@ factor, family, link) are not redefined.
13
13
  **Covariate generator**:
14
14
  The process that draws a dataset's grouping structure and its typed covariate columns,
15
15
  continuous, binary, categorical or ordered, each within-group or group-level, with the quirks
16
- of real tables. TabDGP is one; it draws an outcome only as the optional outcome node.
16
+ of real tables. TabDGP is one; it draws an outcome only as the outcome node.
17
17
  _Avoid_: predictor simulation, feature matrix, X generator, design-matrix generator
18
18
 
19
19
  **Design matrix**:
20
20
  The coding of the covariates the linear predictor sees: an intercept column, z-scored
21
- continuous columns, 0/1 binary columns, K − 1 treatment-coded columns per categorical.
21
+ continuous columns, 0/1 binary columns, k − 1 treatment-coded columns per categorical.
22
22
  Derived from the covariates, never drawn; the hyperprior's design-column budget counts its
23
23
  columns besides the intercept.
24
24
  _Avoid_: X for the uncoded covariates, features
@@ -47,12 +47,12 @@ _Avoid_: edge case, noise, messiness
47
47
 
48
48
  **Node**:
49
49
  One variable of a dataset's structural causal model (SCM): a grouping factor, a group-level or
50
- within-group covariate, time, treatment, or the outcome node. A node has a parent set and a
51
- mechanism; a node without parents is a root.
50
+ within-group covariate, a latent node, time, treatment, or the outcome node.
51
+ A node has a parent set and a mechanism; a node without parents is a root.
52
52
  _Avoid_: feature, variable unqualified, neuron (of an MLP)
53
53
 
54
54
  **Grouping factor**:
55
- A root node whose values assign every row to one of its G groups, in metabeta's words "a
55
+ A root node whose values assign every row to one of its m groups, in metabeta's words "a
56
56
  categorical variable whose levels index random effects"; a dataset has none (a flat table),
57
57
  one or several. Two grouping factors are **crossed** when their groups combine freely and
58
58
  **nested** when each group of the subordinate one lies within one group of the superior one,
@@ -67,8 +67,8 @@ _Avoid_: coarser and finer, parent and child (the graph's edges), higher and low
67
67
 
68
68
  **Unit**:
69
69
  What a node is drawn once per: the row, or one grouping factor, in which case the node takes
70
- one value per group of that factor, repeated across the group's rows (broadcast). A column at
71
- the row unit is a within-group covariate; one at a grouping factor's unit is group-level. A
70
+ one value per group of that factor, repeated across the group's rows (broadcast). A covariate at
71
+ the row unit is within-group; one at a grouping factor's unit is group-level. A
72
72
  nested grouping factor is a unit subordinate to the one it nests in; crossed ones are units
73
73
  without an order between them.
74
74
  _Avoid_: level (a factor level, or the multilevel literature's level 1 and 2), hierarchy
@@ -91,18 +91,24 @@ _Avoid_: hidden unit, confounder (a role a latent node can play)
91
91
 
92
92
  **Column**:
93
93
  A node observed in the table, with its metadata: type (continuous, binary, categorical,
94
- ordered), levels, role (grouping factor, covariate, time, treatment, outcome), and the
94
+ ordered, count), levels, role (grouping factor, covariate, time, treatment, outcome), and the
95
95
  parameters its values were drawn with.
96
96
  _Avoid_: feature, variable unqualified
97
97
 
98
+ **Count**:
99
+ A column type for non-negative integers: a Poisson outcome's today, a covariate's once the
100
+ measurement pass admits count covariates. In the design matrix a count is a continuous column.
101
+ _Avoid_: integer column, discrete column (an ordered one)
102
+
98
103
  **Factor level**:
99
- One of the K categories of a binary, categorical or ordered column, or one group of a
104
+ One of the k categories of a binary, categorical or ordered column, or one group of a
100
105
  grouping factor; R's `levels()`.
101
106
  _Avoid_: level unqualified, category, class
102
107
 
103
108
  **Marginal**:
104
- The distribution a continuous column's values are mapped onto after the SCM, from a catalogue
105
- of families (skewed, heavy-tailed, bounded, zero-inflated), keeping their ranks.
109
+ The distribution a continuous or count column's values are mapped onto after the SCM, keeping
110
+ their ranks: a family from a catalog (skewed, heavy-tailed, bounded, zero-inflated) for a
111
+ continuous column, the Poisson for a count.
106
112
  _Avoid_: noise distribution (the root's), prior
107
113
 
108
114
  **Post-hoc type**:
@@ -126,7 +132,8 @@ _Avoid_: rng, random state, seed alone
126
132
  **Dataset**:
127
133
  What a draw returns: the columns as named arrays in their natural dtype, their metadata, the
128
134
  generating graph, the latent nodes' values, the hyperparameters every field resolved to except
129
- those each column or node draws for itself, and the key. Never padded, never a file.
135
+ those each column or node draws for itself, and the key with the versions it reproduces under.
136
+ Never padded, never a file.
130
137
  _Avoid_: batch, table (the columns alone), sample, corpus (the consumer's set of keys)
131
138
 
132
139
  **Hyperprior**:
@@ -137,9 +144,9 @@ proofs certify.
137
144
  _Avoid_: prior (the fitter's, over parameters), config unqualified, meta-distribution
138
145
 
139
146
  **Preset**:
140
- A named hyperprior for one kind of table, grouped or flat today, item response, survival or
141
- causal later: a choice of fields, never a new mechanism. Every draw starts from one; metabeta
142
- draws from the grouped preset.
147
+ A named hyperprior for one kind of table, grouped, flat or glmm today, item response, survival
148
+ or causal later: a choice of fields, never a new mechanism. Every draw starts from one; metabeta
149
+ draws from the glmm preset, the grouped preset with the outcome node in its glmm form.
143
150
  _Avoid_: dataset type, kind, mode
144
151
 
145
152
  **Override**:
@@ -149,22 +156,44 @@ study, an ablation or a size outside the preset.
149
156
  _Avoid_: setting, parameter, hyperparameter
150
157
 
151
158
  **Quirk axis**:
152
- One field of the hyperprior that controls one quirk of the catalogue, granted only when
159
+ One field of the hyperprior that controls one quirk of the catalog, granted only when
153
160
  mixedbench's measurement pass shows that real tables have the quirk strongly enough.
154
161
  _Avoid_: noise, perturbation, augmentation
155
162
 
156
163
  **Outcome node**:
157
- An optional node whose parents are drawn from the covariates, with a family, a link, the
158
- random effects per grouping factor and terms a GLMM lacks, that builds white-box
159
- misspecified datasets. Just another node; never drawn unless asked for.
160
- _Avoid_: y, target, label, response unqualified
164
+ The node `y`, role `outcome`, drawn by default: a sink at the row unit, last in the generating
165
+ graph, whose parents are drawn like any node's. Its form says how y follows from them. A
166
+ dataset has at most one.
167
+ _Avoid_: target, label, response unqualified, dependent variable
168
+
169
+ **Form**:
170
+ How the outcome node draws y, one per dataset: `scm`, a node like the others with a marginal
171
+ or a post-hoc type, matched to real responses; or `glmm`, a generalized linear mixed model on
172
+ the design matrix, with a family, a link, fixed effects, random effects per grouping factor
173
+ and, when asked for, a deviation, what metabeta trains on and what builds white-box
174
+ misspecified datasets.
175
+ _Avoid_: mode, kind, outcome type (its column type)
176
+
177
+ **Deviation**:
178
+ The SCM mechanism over the outcome node's parents, latent ones included, added to a glmm
179
+ form's linear predictor at a drawn scale, zero by default: what makes a dataset misspecified
180
+ for every GLMM while its fixed and random effects stay the exact truth. A latent group-level
181
+ parent in it is an endogeneity.
182
+ _Avoid_: perturbation, nonlinearity, misspecification (the fitter's view of it), noise
183
+
184
+ **Prior context**:
185
+ The resolved hyperparameters of a glmm form's priors, recorded with the dataset: the scales
186
+ and families its fixed effects, random-effect standard deviations and residual scale were
187
+ drawn with, the correlation prior's shape, and the signal share and split that set the scales.
188
+ What metabeta's posterior is conditioned on.
189
+ _Avoid_: hyperparameters unqualified (the hyperprior's), prior unqualified (the fitter's)
161
190
 
162
191
  **Random effect**:
163
- A per-group parameter of the outcome, an intercept or a slope, drawn jointly per group of a
164
- grouping factor in metabeta's parameterisation; metabeta's term. Only the outcome node draws
165
- random effects; a group-level node, latent or observed, is covariate structure, which a GLMM
166
- takes as given.
167
- _Avoid_: group effect, random intercept for a latent group-level node
192
+ A per-group parameter of the outcome, α, an intercept or a slope, drawn jointly per group of a
193
+ grouping factor in metabeta's parameterization and counted in design columns, a slope on a
194
+ categorical column taking k − 1; metabeta's term. Only the outcome node draws random effects;
195
+ a group-level node, latent or observed, is covariate structure, which a GLMM takes as given.
196
+ _Avoid_: group effect, b (an earlier letter), random intercept for a latent group-level node
168
197
 
169
198
  ### The proofs
170
199
 
@@ -6,7 +6,7 @@ Thank you for your interest. TabDGP is early stage and help is welcome.
6
6
 
7
7
  - **A real-data quirk the generator misses.** Open an issue naming the property, a public
8
8
  table that shows it and, if you can, how to measure it per column or per grouping factor;
9
- the quirk catalogue grows through the measurement pass, never by hand.
9
+ the quirk catalog grows through the measurement pass, never by hand.
10
10
  - **A bug in a mechanism or a proof.** Open an issue with the smallest example that shows it,
11
11
  or a pull request with a failing test and the fix.
12
12
  - **A use case.** A model family or a simulation study that needs something the hyperprior
@@ -24,7 +24,7 @@ git clone https://github.com/adkipnis/tabdgp
24
24
  cd tabdgp
25
25
  uv sync
26
26
  uv run pytest # the fast tests
27
- uv run pytest -m slow # the proofs against mixedbench's registry, from roadmap item 3
27
+ uv run pytest -m slow # the proofs against mixedbench's registry, once they exist
28
28
  ```
29
29
 
30
30
  ## Find your way
@@ -33,7 +33,7 @@ uv run pytest -m slow # the proofs against mixedbench's registry, from roa
33
33
  src/tabdgp/ the package; each module's docstring says what it defines and how
34
34
  tests/ mirrors src/, fixtures beside the tests
35
35
  docs/adr/ the design decisions and why they were taken
36
- docs/ the conventions, and from roadmap item 3 the proofs' method
36
+ docs/ the conventions, and later the proofs' method
37
37
  ```
38
38
 
39
39
  [`CONTEXT.md`](CONTEXT.md) defines the words (node, mechanism, hyperprior, override, quirk
@@ -56,6 +56,6 @@ Three rules keep the generator trustworthy:
56
56
  - **Nothing from downstream.** TabDGP imports nothing from metabeta or mixedbench; the proofs
57
57
  read mixedbench's registry as a test dependency only.
58
58
 
59
- ## Licence
59
+ ## License
60
60
 
61
- By contributing, you agree that your changes are released under [MIT](LICENSE).
61
+ By contributing, you agree that your changes are released under [Apache-2.0](LICENSE).
tabdgp-0.3.0/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: tabdgp
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: A data-generating process for grouped and flat tables, to be matched to a registry of real tables
5
5
  Project-URL: Repository, https://github.com/adkipnis/tabdgp
6
6
  Project-URL: Issues, https://github.com/adkipnis/tabdgp/issues
7
7
  Author-email: Alex Kipnis <adkipnis@users.noreply.github.com>
8
- License-Expression: MIT
8
+ License-Expression: Apache-2.0
9
9
  License-File: LICENSE
10
10
  Classifier: Development Status :: 3 - Alpha
11
11
  Classifier: Intended Audience :: Science/Research
@@ -21,8 +21,6 @@ Description-Content-Type: text/markdown
21
21
 
22
22
  [![CI](https://github.com/adkipnis/tabdgp/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/adkipnis/tabdgp/actions/workflows/ci.yml)
23
23
  [![PyPI](https://img.shields.io/pypi/v/tabdgp)](https://pypi.org/project/tabdgp/)
24
- [![Python](https://img.shields.io/pypi/pyversions/tabdgp)](https://github.com/adkipnis/tabdgp/blob/main/pyproject.toml)
25
- [![Licence](https://img.shields.io/badge/licence-MIT-blue)](https://github.com/adkipnis/tabdgp/blob/main/LICENSE)
26
24
  [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.23322845.svg)](https://doi.org/10.5281/zenodo.23322845)
27
25
 
28
26
  # TabDGP
@@ -33,14 +31,16 @@ TabDGP simulates tabular datasets from a random structural causal model (SCM) an
33
31
  reproduce the quirks of real data. Each table comes with the graph and the settings that
34
32
  generated it.
35
33
 
36
- > **Alpha.** Release 0.2 draws grouped and flat tables from defaults that are round guesses;
37
- > the rest is planned below. Before 1.0, a release may change the dataset a key draws.
34
+ > **Alpha.** Release 0.3 draws grouped and flat tables with an outcome `y`, from defaults that
35
+ > are round guesses; the rest is planned below. Before 1.0, a release may change the dataset a key draws.
38
36
 
39
37
  ## Highlights
40
38
 
41
39
  - **Grouped or flat.** One to three grouping factors by default, nested or crossed, with 2 to
42
40
  400 groups each. A covariate varies by row or is constant within the groups of one factor.
43
41
  `Hyperprior.flat()` draws none.
42
+ - **An outcome.** One node `y`, drawn by default as the last node of the SCM: continuous,
43
+ binary, categorical, ordered or count, with its own noise scale. `outcome_form='none'` draws none.
44
44
  - **White-box.** Each dataset carries its graph, latent nodes, column metadata and hyperparameters.
45
45
  - **Reproducible.** A dataset is a pure function of its key (a seed and an index) and the
46
46
  hyperprior, whatever batch or worker draws it.
@@ -69,37 +69,28 @@ print(len(dataset.latent), 'latent nodes,', dataset.graph.parents.sum(), 'edges'
69
69
  g0 categorical g0 [4 5 2]
70
70
  g1 categorical g1 [ 6 22 29]
71
71
  g2 categorical g2 [7 7 5]
72
- x0 binary g0 [1 1 1]
73
- x1 binary row [1 1 1]
74
- x2 continuous row [0.36 0.69 0.15]
75
- x3 binary row [0 0 0]
76
- x4 binary row [0 1 0]
77
- 7 latent nodes, 16 edges
72
+ x0 binary row [1 0 1]
73
+ x1 binary row [0 1 0]
74
+ x2 continuous g2 [1.77 1.77 2.66]
75
+ x3 binary row [0 0 1]
76
+ x4 binary g2 [0 0 1]
77
+ y continuous row [0.76 0.62 0.93]
78
+ 7 latent nodes, 18 edges
78
79
  ```
79
80
 
80
81
  ## Planned
81
82
 
83
+ - **Model-based outcomes:** exact or with a drawn deviation for white-box misspecified datasets.
82
84
  - **Quirk axes:** group confounding, rare levels, ties, bounds, near dependence and more.
83
- - **Matched defaults**, fitted to and checked against
84
- [mixedbench](https://github.com/adkipnis/mixedbench)'s real grouped tables, then widened.
85
- - **An outcome node**, optional, for white-box misspecified datasets, with within-group time and
86
- a binary treatment.
87
-
88
- ## Learn more
89
-
90
- [`CONTEXT.md`](https://github.com/adkipnis/tabdgp/blob/main/CONTEXT.md) defines the vocabulary.
85
+ - **Finetuning** the hyperprior's parameters to any batch of datasets.
86
+ Group presets are tuned against [mixedbench](https://github.com/adkipnis/mixedbench).
87
+ - **Within-group time and a binary treatment.**
91
88
 
92
89
  ## Contributing
93
90
 
94
91
  Issues and pull requests are welcome; see
95
92
  [`CONTRIBUTING.md`](https://github.com/adkipnis/tabdgp/blob/main/CONTRIBUTING.md).
96
93
 
97
- ## Citing
98
-
99
- Please cite the release you used, from
100
- [`CITATION.cff`](https://github.com/adkipnis/tabdgp/blob/main/CITATION.cff) or GitHub's "Cite
101
- this repository".
102
-
103
- ## Licence
94
+ ## License
104
95
 
105
- [MIT](https://github.com/adkipnis/tabdgp/blob/main/LICENSE).
96
+ [Apache-2.0](https://github.com/adkipnis/tabdgp/blob/main/LICENSE).
@@ -1,7 +1,5 @@
1
1
  [![CI](https://github.com/adkipnis/tabdgp/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/adkipnis/tabdgp/actions/workflows/ci.yml)
2
2
  [![PyPI](https://img.shields.io/pypi/v/tabdgp)](https://pypi.org/project/tabdgp/)
3
- [![Python](https://img.shields.io/pypi/pyversions/tabdgp)](https://github.com/adkipnis/tabdgp/blob/main/pyproject.toml)
4
- [![Licence](https://img.shields.io/badge/licence-MIT-blue)](https://github.com/adkipnis/tabdgp/blob/main/LICENSE)
5
3
  [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.23322845.svg)](https://doi.org/10.5281/zenodo.23322845)
6
4
 
7
5
  # TabDGP
@@ -12,14 +10,16 @@ TabDGP simulates tabular datasets from a random structural causal model (SCM) an
12
10
  reproduce the quirks of real data. Each table comes with the graph and the settings that
13
11
  generated it.
14
12
 
15
- > **Alpha.** Release 0.2 draws grouped and flat tables from defaults that are round guesses;
16
- > the rest is planned below. Before 1.0, a release may change the dataset a key draws.
13
+ > **Alpha.** Release 0.3 draws grouped and flat tables with an outcome `y`, from defaults that
14
+ > are round guesses; the rest is planned below. Before 1.0, a release may change the dataset a key draws.
17
15
 
18
16
  ## Highlights
19
17
 
20
18
  - **Grouped or flat.** One to three grouping factors by default, nested or crossed, with 2 to
21
19
  400 groups each. A covariate varies by row or is constant within the groups of one factor.
22
20
  `Hyperprior.flat()` draws none.
21
+ - **An outcome.** One node `y`, drawn by default as the last node of the SCM: continuous,
22
+ binary, categorical, ordered or count, with its own noise scale. `outcome_form='none'` draws none.
23
23
  - **White-box.** Each dataset carries its graph, latent nodes, column metadata and hyperparameters.
24
24
  - **Reproducible.** A dataset is a pure function of its key (a seed and an index) and the
25
25
  hyperprior, whatever batch or worker draws it.
@@ -48,37 +48,28 @@ print(len(dataset.latent), 'latent nodes,', dataset.graph.parents.sum(), 'edges'
48
48
  g0 categorical g0 [4 5 2]
49
49
  g1 categorical g1 [ 6 22 29]
50
50
  g2 categorical g2 [7 7 5]
51
- x0 binary g0 [1 1 1]
52
- x1 binary row [1 1 1]
53
- x2 continuous row [0.36 0.69 0.15]
54
- x3 binary row [0 0 0]
55
- x4 binary row [0 1 0]
56
- 7 latent nodes, 16 edges
51
+ x0 binary row [1 0 1]
52
+ x1 binary row [0 1 0]
53
+ x2 continuous g2 [1.77 1.77 2.66]
54
+ x3 binary row [0 0 1]
55
+ x4 binary g2 [0 0 1]
56
+ y continuous row [0.76 0.62 0.93]
57
+ 7 latent nodes, 18 edges
57
58
  ```
58
59
 
59
60
  ## Planned
60
61
 
62
+ - **Model-based outcomes:** exact or with a drawn deviation for white-box misspecified datasets.
61
63
  - **Quirk axes:** group confounding, rare levels, ties, bounds, near dependence and more.
62
- - **Matched defaults**, fitted to and checked against
63
- [mixedbench](https://github.com/adkipnis/mixedbench)'s real grouped tables, then widened.
64
- - **An outcome node**, optional, for white-box misspecified datasets, with within-group time and
65
- a binary treatment.
66
-
67
- ## Learn more
68
-
69
- [`CONTEXT.md`](https://github.com/adkipnis/tabdgp/blob/main/CONTEXT.md) defines the vocabulary.
64
+ - **Finetuning** the hyperprior's parameters to any batch of datasets.
65
+ Group presets are tuned against [mixedbench](https://github.com/adkipnis/mixedbench).
66
+ - **Within-group time and a binary treatment.**
70
67
 
71
68
  ## Contributing
72
69
 
73
70
  Issues and pull requests are welcome; see
74
71
  [`CONTRIBUTING.md`](https://github.com/adkipnis/tabdgp/blob/main/CONTRIBUTING.md).
75
72
 
76
- ## Citing
77
-
78
- Please cite the release you used, from
79
- [`CITATION.cff`](https://github.com/adkipnis/tabdgp/blob/main/CITATION.cff) or GitHub's "Cite
80
- this repository".
81
-
82
- ## Licence
73
+ ## License
83
74
 
84
- [MIT](https://github.com/adkipnis/tabdgp/blob/main/LICENSE).
75
+ [Apache-2.0](https://github.com/adkipnis/tabdgp/blob/main/LICENSE).
@@ -1,9 +1,9 @@
1
1
  [project]
2
2
  name = "tabdgp"
3
- version = "0.2.0"
3
+ version = "0.3.0"
4
4
  description = "A data-generating process for grouped and flat tables, to be matched to a registry of real tables"
5
5
  readme = "README.md"
6
- license = "MIT"
6
+ license = "Apache-2.0"
7
7
  license-files = ["LICENSE"]
8
8
  authors = [{ name = "Alex Kipnis", email = "adkipnis@users.noreply.github.com" }]
9
9
  requires-python = ">=3.12"
@@ -34,12 +34,15 @@ dev = [
34
34
  ]
35
35
 
36
36
  [build-system]
37
- requires = ["hatchling>=1.27"] # PEP 639 licence expression and licence files
37
+ requires = ["hatchling>=1.27"] # PEP 639 license expression and license files
38
38
  build-backend = "hatchling.build"
39
39
 
40
40
  [tool.hatch.build.targets.wheel]
41
41
  packages = ["src/tabdgp"]
42
42
 
43
+ [tool.hatch.build.targets.sdist]
44
+ exclude = ["/docs"] # the ADRs and conventions are read on GitHub, not in the sdist
45
+
43
46
  [tool.ruff]
44
47
  line-length = 100
45
48