Code Documentation
This section provides a complete overview of the internal modules of
biomedical-data-generator.
It is intended for developers, contributors, and advanced users who want
to understand or extend the code base.
The API documentation is automatically generated using Sphinx
autodoc and autosummary.
Each module listed below expands into a separate page in the
_autosummary directory.
—
Configuration Models
These classes define the full dataset configuration, including class structure, correlated clusters, noise distribution, and optional batch effects.
Configuration for a single class in the dataset. |
|
Configuration for simulating batch effects. |
|
A correlated block with optional, independent mean and covariance channels. |
|
Configuration for synthetic dataset generation. |
Cluster signal channels
A correlated cluster carries class-discriminating signal only through its
optional channels. The mean channel encodes a first-moment (per-class
mean shift on the anchor); the covariance channel encodes a second-moment
(per-class within-cluster correlation, i.e. differential co-expression).
Both are resolved per class by CorrClusterConfig,
falling back to a baseline when a class is absent.
First-moment signal: a per-class mean shift applied to the cluster anchor. |
|
Second-moment signal: a per-class within-cluster correlation. |
Standalone informative groups
Groups of cluster-free informative features that share one separation
strength. A list of groups with decreasing class_sep realizes a
signal-strength gradient across the standalone-informative block.
A group of standalone informative features sharing one separation strength. |
—
Dataset Generator
The central entry point for creating synthetic datasets.
Generate synthetic biomedical dataset with specified feature structure. |
—
Feature Generators
Functions responsible for generating informative features, noise features, and correlated feature clusters.
Informative features
Generation of standalone informative features and class separation. |
Independent noise features
Independent noise features are not produced by a dedicated module. They are
sampled directly in biomedical_data_generator.generate_dataset() using
biomedical_data_generator.utils.sampling.sample_distribution().
—
Batch Effects
Simulation of site effects, instrument variation, temporal drift, and confounding with class labels.
Batch effect simulation for synthetic biomedical datasets. |
—
Metadata
Structured metadata describing the full generative process, including feature roles, class labels, correlated clusters, batch labels, and derived dataset properties.
Metadata about the generated dataset. |
|
Generative feature roles derived from a DatasetMeta. |
|
Derive the six-way generative feature-role partition from a DatasetMeta. |
Per-feature signal strengths
Derived, per-column assessment of how strongly each feature separates the
classes. compute_feature_strengths()
reads a DatasetMeta record and
returns a FeatureStrengths summary.
Derived per-feature signal-strength annotation. |
|
Derive per-feature signal strengths from a DatasetMeta. |
—
Utility Modules (Optional)
Helper functions for data manipulation, visualization, and integration with scikit-learn.
Correlation analysis and seed search utilities (no plotting). |
|
Export utilities for saving generated datasets to various formats. |
|
Utility functions for sampling from distributions. |
|
Plot utilities for correlation analysis. |
|
Sklearn-like convenience wrapper around biomedical-data-generator. |