sdm.prior#
Configurable framework for sampling tabular datasets from random structural causal models (SCMs), following the prior design of the "TabICLv2: A Better, Faster, Scalable, and Open Tabular Foundation Model" and "NVIDIA Kumo Tabular: Pushing the Accuracy-Efficiency Frontier for Tabular Prediction" papers. |
Sampling Utilities#
Hyperparameters
Base class for sampling hyperparameters. |
|
Return a fixed hyperparameter. |
|
Sample real values uniformly between two bounds. |
|
Sample integers uniformly between inclusive bounds. |
|
Sample positive real values uniformly in logarithmic space. |
|
Sample integers by truncating log-uniform values. |
|
Choose uniformly among fixed options. |
Correlated Sampling
Share sampling parameters within a scope. |
|
Sample numerical values from a shared, randomly sampled distribution. |
Schema#
Specification of a dataset. |
|
Sample |
Directed Acyclic Graphs#
Directed acyclic graph in CSR layout. |
|
Base class for sampling directed acyclic graphs. |
|
Sample DAGs with Cauchy-distributed connectivity parameters. |
|
Pick one DAG sampler per call from a weighted pool. |
Root Samplers#
Base class for sampling values at nodes without parents. |
|
Sample root values from a normal distribution. |
|
Sample root values from a uniform distribution. |
|
Sample root values uniformly within the unit ball. |
|
Mix sampled root values to create correlated channels. |
|
Pick one root sampler per call from a weighted pool. |
Activations#
Base class for activation functions. |
|
Adapt a callable to the |
|
Apply an activation at a random center and scale. |
|
Apply |
|
Apply |
|
Apply |
|
Apply |
|
Pick one activation per call from a weighted pool. |
Activation Functions for CallableActivation
Return the input values unchanged. |
|
Map positive values to |
|
Apply the Gaussian bump |
|
Map values in |
|
Apply the softmax along the last dimension. |
|
One-hot encode the argmax along the last dimension. |
|
Return sorting indices along the last dimension. |
|
Apply |
|
Return zero-based ranks along the last dimension. |
|
Return the fractional part |
Random Functions#
Base class for random functions on node values. |
|
Apply a random linear function. |
|
Apply a random quadratic function. |
|
Apply a random neural network. |
|
Replace each row with a linear transformation of its nearest center. |
|
Average the outputs of random symmetric trees. |
|
Compute random soft cluster assignments and project them. |
|
Approximate a Gaussian process with random Fourier features. |
|
Multiply the outputs of two sampled random functions. |
|
Pick one random function per call from a weighted pool. |
Parent Mergers#
Base class for combining parent values into node values. |
|
Concatenate parent values and apply |
|
Apply |
|
Pick one parent merger per call from a weighted pool. |
Matrix Samplers#
Base class for sampling random matrices. |
|
Sample random Gaussian matrices. |
|
Sample Gaussian matrices with random power-law weights. |
|
Sample matrices factored as |
|
Sample Laplace-kernel matrices between Gaussian-mixture anchor points. |
|
Sample a base matrix and apply a random activation. |
|
Pick one matrix sampler per call from a weighted pool. |
Converters#
Base class for converting latent channels to numerical columns. |
|
Base class for converting latent channels to categorical columns. |
|
Return single-channel values as numerical columns. |
|
Assign each row to its nearest sampled center using Minkowski distance. |
|
Apply Kumaraswamy warping after min-max scaling each column. |
|
Convert latent channels to numerical column values. |
|
Convert latent channels to category indices with softmax or argmax. |
|
Pick one converter per column from a weighted pool. |
Filters#
Decide whether to drop a dataset based on an ExtraTrees probe. |
Transforms#
Base class for transforming synthetic feature and target tables. |
|
Return features and targets unchanged. |
|
Apply one randomly selected transform per dataset. |
|
Reject datasets with missing or nonfinite feature or target values. |
|
Reduce selected feature columns to a few ordered levels. |
|
Blend random feature blocks toward shared Gaussian factors. |
|
Mask the same random rows in a fixed number of feature columns. |
|
Mask feature rows selected by a target class or numerical tail. |
|
Mask random rows in selected categorical feature columns. |
|
Mask feature tails under MAR or self-masking MNAR censoring. |
|
Mask feature column blocks under an unobserved row factor. |
|
Mask column groups to sparse, overlapping sets of observed rows. |
|
Independently mask numerical and categorical feature cells. |
|
Mask the same random rows in a fraction of feature columns. |
|
Combine structured feature masking with conditional censoring. |
|
Recode selected finite features as high-cardinality categories. |
|
Recompute the target from selected feature columns. |
|
Clip the outliers of each feature column and standardize it. |
|
Clip the outliers of a numerical target and standardize it. |
|
Permute the classes of a categorical target. |
|
Permute the numerical and categorical feature columns together. |
|
Apply a random power or exponential warp to a numerical target. |