calm-data-generator 2.2.0__tar.gz → 2.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.
- {calm_data_generator-2.2.0/calm_data_generator.egg-info → calm_data_generator-2.3.0}/PKG-INFO +139 -79
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/README.md +130 -73
- calm_data_generator-2.3.0/calm_data_generator/__init__.py +48 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/cli.py +1 -1
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/docs/API.md +23 -21
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/docs/API_ES.md +22 -8
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/docs/CLINICAL_GENERATOR_REFERENCE.md +82 -3
- calm_data_generator-2.3.0/calm_data_generator/docs/COMPLEX_GENERATOR_REFERENCE.md +357 -0
- calm_data_generator-2.3.0/calm_data_generator/docs/COMPLEX_GENERATOR_REFERENCE_ES.md +359 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/docs/DOCUMENTATION.md +51 -21
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/docs/DOCUMENTATION_ES.md +35 -6
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/docs/REAL_GENERATOR_REFERENCE.md +59 -30
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/docs/REAL_GENERATOR_REFERENCE_ES.md +57 -26
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/docs/REPORTS_REFERENCE.md +91 -11
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/docs/REPORTS_REFERENCE_ES.md +95 -11
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/docs/SCENARIO_INJECTOR_REFERENCE.md +15 -13
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/docs/SCENARIO_INJECTOR_REFERENCE_ES.md +16 -16
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/docs/STREAM_GENERATOR_REFERENCE.md +2 -1
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/docs/STREAM_GENERATOR_REFERENCE_ES.md +1 -1
- calm_data_generator-2.3.0/calm_data_generator/generators/clinical/Clinic.py +529 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/generators/clinical/ClinicGeneratorBlock.py +9 -9
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/generators/clinical/ClinicReporter.py +2 -3
- calm_data_generator-2.3.0/calm_data_generator/generators/clinical/_demographic_mixin.py +319 -0
- calm_data_generator-2.3.0/calm_data_generator/generators/clinical/_gene_expression_mixin.py +260 -0
- calm_data_generator-2.3.0/calm_data_generator/generators/clinical/_longitudinal_mixin.py +410 -0
- calm_data_generator-2.3.0/calm_data_generator/generators/clinical/_omics_params_mixin.py +44 -0
- calm_data_generator-2.3.0/calm_data_generator/generators/clinical/_protein_expression_mixin.py +137 -0
- calm_data_generator-2.3.0/calm_data_generator/generators/clinical/_reporting_mixin.py +95 -0
- calm_data_generator-2.3.0/calm_data_generator/generators/clinical/_target_omics_mixin.py +303 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/generators/complex/ComplexGenerator.py +2 -2
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/generators/configs.py +54 -4
- calm_data_generator-2.3.0/calm_data_generator/generators/drift/DriftInjector.py +510 -0
- calm_data_generator-2.3.0/calm_data_generator/generators/drift/_data_quality_drift.py +444 -0
- calm_data_generator-2.3.0/calm_data_generator/generators/drift/_drift_utils.py +708 -0
- calm_data_generator-2.3.0/calm_data_generator/generators/drift/_feature_drift.py +712 -0
- calm_data_generator-2.3.0/calm_data_generator/generators/drift/_label_drift.py +606 -0
- calm_data_generator-2.3.0/calm_data_generator/generators/drift/_structural_drift.py +781 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/generators/dynamics/ScenarioInjector.py +13 -8
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/generators/persistence_models.py +7 -5
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/generators/stream/StreamBlockGenerator.py +18 -7
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/generators/stream/StreamGenerator.py +18 -11
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/generators/stream/StreamReporter.py +18 -18
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/generators/tabular/CustomPluginAdapter.py +27 -20
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/generators/tabular/RealBlockGenerator.py +10 -9
- calm_data_generator-2.3.0/calm_data_generator/generators/tabular/RealGenerator.py +920 -0
- calm_data_generator-2.3.0/calm_data_generator/generators/tabular/_generate_pipeline.py +686 -0
- calm_data_generator-2.3.0/calm_data_generator/generators/tabular/_synth_latent.py +678 -0
- calm_data_generator-2.3.0/calm_data_generator/generators/tabular/_synth_privacy.py +204 -0
- calm_data_generator-2.3.0/calm_data_generator/generators/tabular/_synth_scvi.py +764 -0
- calm_data_generator-2.3.0/calm_data_generator/generators/tabular/_synth_tabular.py +1142 -0
- calm_data_generator-2.3.0/calm_data_generator/generators/tabular/_synth_timeseries.py +428 -0
- calm_data_generator-2.3.0/calm_data_generator/generators/tabular/_synth_utils.py +784 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/presets/BalancePreset.py +21 -4
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/presets/ConceptDriftPreset.py +20 -3
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/presets/CopulaPreset.py +11 -2
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/presets/DataQualityAuditPreset.py +11 -2
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/presets/DiffusionPreset.py +12 -2
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/presets/DriftScenarioPreset.py +20 -3
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/presets/FastPreset.py +6 -1
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/presets/FastPrototypePreset.py +11 -2
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/presets/GradualDriftPreset.py +20 -3
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/presets/HighFidelityPreset.py +18 -2
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/presets/ImbalancePreset.py +22 -19
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/presets/LongitudinalHealthPreset.py +17 -2
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/presets/OmicsIntegrationPreset.py +18 -2
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/presets/RareDiseasePreset.py +18 -2
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/presets/ScenarioInjectorPreset.py +17 -5
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/presets/SeasonalTimeSeriesPreset.py +27 -7
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/presets/SingleCellQualityPreset.py +8 -1
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/presets/TimeSeriesPreset.py +20 -2
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/presets/__init__.py +11 -12
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/presets/base.py +2 -1
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/reports/DiscriminatorReporter.py +26 -28
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/reports/ExternalReporter.py +10 -15
- calm_data_generator-2.3.0/calm_data_generator/reports/LocalIndexGenerator.py +161 -0
- calm_data_generator-2.3.0/calm_data_generator/reports/QualityReporter.py +558 -0
- calm_data_generator-2.3.0/calm_data_generator/reports/Visualizer.py +32 -0
- calm_data_generator-2.3.0/calm_data_generator/reports/__init__.py +25 -0
- calm_data_generator-2.3.0/calm_data_generator/reports/_comparison.py +350 -0
- calm_data_generator-2.3.0/calm_data_generator/reports/_correlation.py +97 -0
- calm_data_generator-2.3.0/calm_data_generator/reports/_dimensionality.py +120 -0
- calm_data_generator-2.3.0/calm_data_generator/reports/_distribution.py +209 -0
- calm_data_generator-2.3.0/calm_data_generator/reports/_metrics_cards.py +163 -0
- calm_data_generator-2.3.0/calm_data_generator/reports/_ml_utility_mixin.py +239 -0
- calm_data_generator-2.3.0/calm_data_generator/reports/_privacy_metrics_mixin.py +221 -0
- calm_data_generator-2.3.0/calm_data_generator/reports/_quality_scoring_mixin.py +262 -0
- calm_data_generator-2.3.0/calm_data_generator/reports/_sequence.py +244 -0
- calm_data_generator-2.3.0/calm_data_generator/reports/_single_cell_mixin.py +150 -0
- calm_data_generator-2.3.0/calm_data_generator/reports/_statistical_similarity_mixin.py +172 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/reports/base.py +1 -3
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/tutorials/clinical_generator.py +45 -23
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/tutorials/correlation_drift.py +8 -16
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/tutorials/real_block_generator.py +6 -4
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/tutorials/real_generator.py +21 -1
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/tutorials/reports_deep_dive.py +40 -11
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/tutorials/scenario_injector.py +5 -4
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/tutorials/stream_generator.py +6 -6
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0/calm_data_generator.egg-info}/PKG-INFO +139 -79
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator.egg-info/SOURCES.txt +34 -1
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator.egg-info/requires.txt +10 -5
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator.egg-info/top_level.txt +1 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/pyproject.toml +21 -8
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/requirements.txt +10 -5
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/tests/test_accessors.py +101 -24
- calm_data_generator-2.3.0/tests/test_cli.py +95 -0
- calm_data_generator-2.3.0/tests/test_clinic_block_generator.py +59 -0
- calm_data_generator-2.3.0/tests/test_clinical_advanced.py +28 -0
- calm_data_generator-2.3.0/tests/test_clinical_correlation_matrix.py +371 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/tests/test_comprehensive.py +10 -62
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/tests/test_comprehensive_reporting.py +8 -6
- calm_data_generator-2.3.0/tests/test_configs_validation.py +109 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/tests/test_differentiation_factor.py +28 -24
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/tests/test_drift_injector_math.py +5 -4
- calm_data_generator-2.3.0/tests/test_fit_sample_api.py +95 -0
- calm_data_generator-2.3.0/tests/test_migration.py +98 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/tests/test_presets.py +15 -15
- calm_data_generator-2.3.0/tests/test_quality_metrics.py +204 -0
- calm_data_generator-2.3.0/tests/test_real_block_generator.py +99 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/tests/test_reporters_extended.py +78 -8
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/tests/test_reporting_fix.py +6 -4
- calm_data_generator-2.3.0/tests/test_scgft_reporter.py +137 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/tests/test_scvi_quality_regression.py +20 -16
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/tests/test_single_call.py +5 -4
- calm_data_generator-2.3.0/tests/test_stream_block_generator.py +99 -0
- calm_data_generator-2.2.0/calm_data_generator/__init__.py +0 -31
- calm_data_generator-2.2.0/calm_data_generator/docs/COMPLEX_GENERATOR_REFERENCE.md +0 -222
- calm_data_generator-2.2.0/calm_data_generator/docs/COMPLEX_GENERATOR_REFERENCE_ES.md +0 -221
- calm_data_generator-2.2.0/calm_data_generator/generators/clinical/Clinic.py +0 -1877
- calm_data_generator-2.2.0/calm_data_generator/generators/drift/DriftInjector.py +0 -3632
- calm_data_generator-2.2.0/calm_data_generator/generators/tabular/QualityReporter.py +0 -5
- calm_data_generator-2.2.0/calm_data_generator/generators/tabular/RealGenerator.py +0 -4872
- calm_data_generator-2.2.0/calm_data_generator/reports/LocalIndexGenerator.py +0 -224
- calm_data_generator-2.2.0/calm_data_generator/reports/QualityReporter.py +0 -924
- calm_data_generator-2.2.0/calm_data_generator/reports/Visualizer.py +0 -940
- calm_data_generator-2.2.0/calm_data_generator/reports/__init__.py +0 -15
- calm_data_generator-2.2.0/tests/test_clinic_block_generator.py +0 -77
- calm_data_generator-2.2.0/tests/test_clinical_advanced.py +0 -40
- calm_data_generator-2.2.0/tests/test_migration.py +0 -82
- calm_data_generator-2.2.0/tests/test_quality_metrics.py +0 -70
- calm_data_generator-2.2.0/tests/test_real_block_generator.py +0 -131
- calm_data_generator-2.2.0/tests/test_scgft_reporter.py +0 -127
- calm_data_generator-2.2.0/tests/test_stream_block_generator.py +0 -127
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/LICENSE +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/MANIFEST.in +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/docs/CAUSAL_ENGINE_REFERENCE.md +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/docs/CAUSAL_ENGINE_REFERENCE_ES.md +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/docs/CLINICAL_BLOCK_GENERATOR_REFERENCE.md +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/docs/CLINICAL_BLOCK_GENERATOR_REFERENCE_ES.md +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/docs/CLINICAL_GENERATOR_REFERENCE_ES.md +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/docs/DRIFT_INJECTOR_REFERENCE.md +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/docs/DRIFT_INJECTOR_REFERENCE_ES.md +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/docs/PRESETS_REFERENCE.md +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/docs/PRESETS_REFERENCE_ES.md +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/docs/REAL_BLOCK_GENERATOR_REFERENCE.md +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/docs/REAL_BLOCK_GENERATOR_REFERENCE_ES.md +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/docs/STREAM_BLOCK_GENERATOR_REFERENCE.md +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/docs/STREAM_BLOCK_GENERATOR_REFERENCE_ES.md +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/generators/__init__.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/generators/base.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/generators/clinical/__init__.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/generators/complex/__init__.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/generators/drift/__init__.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/generators/dynamics/CausalEngine.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/generators/dynamics/__init__.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/generators/stream/GeneratorFactory.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/generators/stream/__init__.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/generators/tabular/__init__.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/generators/utils/__init__.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/generators/utils/propagation.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/logger.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/tutorials/advanced_drifts.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/tutorials/clinic_generator.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/tutorials/clinical_block_generator.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/tutorials/drift_injector.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/tutorials/stream_block_generator.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator/tutorials/tutorial_advanced_methods.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator.egg-info/dependency_links.txt +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/calm_data_generator.egg-info/entry_points.txt +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/setup.cfg +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/tests/test_anndata_support.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/tests/test_block_generators_extended.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/tests/test_causal_engine.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/tests/test_clinical_regression.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/tests/test_complex_generator.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/tests/test_correlation_propagation.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/tests/test_custom_plugin_adapter.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/tests/test_discriminator_reporter.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/tests/test_disease_effects_fix.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/tests/test_drift_correlations.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/tests/test_drift_injector_advanced.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/tests/test_functional_drift.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/tests/test_imbalance.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/tests/test_real_generator_persistence.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/tests/test_river_integration.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/tests/test_scenario_extended.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/tests/test_tabular_extended.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/tests/test_timeseries_extended.py +0 -0
- {calm_data_generator-2.2.0 → calm_data_generator-2.3.0}/tests/test_timeseries_real.py +0 -0
{calm_data_generator-2.2.0/calm_data_generator.egg-info → calm_data_generator-2.3.0}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: calm-data-generator
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.0
|
|
4
4
|
Summary: CALM-Data-Generator: A Python library for synthetic data generation with support for drift injection and clinical data.
|
|
5
5
|
Author-email: Alejandro Belda Fernandez <alejandrobeldafernandez@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -33,8 +33,8 @@ Requires-Dist: sdmetrics<0.28.0,>=0.27.0
|
|
|
33
33
|
Requires-Dist: numba<0.63.0,>=0.62.0
|
|
34
34
|
Requires-Dist: llvmlite<0.46.0,>=0.45.0
|
|
35
35
|
Requires-Dist: scikit-learn<1.8.0,>=1.7.0
|
|
36
|
-
Requires-Dist: torch
|
|
37
|
-
Requires-Dist: torchvision
|
|
36
|
+
Requires-Dist: torch>=2.2.0
|
|
37
|
+
Requires-Dist: torchvision>=0.17.0
|
|
38
38
|
Requires-Dist: lightgbm<4.7.0,>=4.6.0
|
|
39
39
|
Requires-Dist: imbalanced-learn<0.15.0,>=0.14.0
|
|
40
40
|
Requires-Dist: copulae<0.8.0,>=0.7.9
|
|
@@ -44,8 +44,6 @@ Requires-Dist: scanpy<1.11.0,>=1.10.0
|
|
|
44
44
|
Requires-Dist: lightning<2.4.0,>=2.3.0
|
|
45
45
|
Requires-Dist: torchmetrics<1.9.0,>=1.8.0
|
|
46
46
|
Requires-Dist: plotly<6.6.0,>=6.5.0
|
|
47
|
-
Requires-Dist: cell-gears<0.2.0,>=0.1.2
|
|
48
|
-
Requires-Dist: torch-geometric<2.8.0,>=2.7.0
|
|
49
47
|
Requires-Dist: huggingface-hub<1.0.0,>=0.36.0
|
|
50
48
|
Requires-Dist: transformers<5.0.0,>=4.22.1
|
|
51
49
|
Requires-Dist: xgboost<2.2.0,>=2.1.0
|
|
@@ -56,8 +54,13 @@ Requires-Dist: fsspec<2026.0.0,>=2025.12.0
|
|
|
56
54
|
Requires-Dist: scgft-evaluator<0.2.0,>=0.1.0
|
|
57
55
|
Provides-Extra: stream
|
|
58
56
|
Requires-Dist: river>=0.21.0; extra == "stream"
|
|
57
|
+
Provides-Extra: gears
|
|
58
|
+
Requires-Dist: torch-geometric>=2.7.0; extra == "gears"
|
|
59
|
+
Requires-Dist: cell-gears<0.2.0,>=0.1.2; extra == "gears"
|
|
60
|
+
Provides-Extra: privacy
|
|
61
|
+
Requires-Dist: anonymeter<2.0.0,>=1.0.0; extra == "privacy"
|
|
59
62
|
Provides-Extra: full
|
|
60
|
-
Requires-Dist: calm-data-generator[stream]; extra == "full"
|
|
63
|
+
Requires-Dist: calm-data-generator[gears,privacy,stream]; extra == "full"
|
|
61
64
|
Dynamic: license-file
|
|
62
65
|
|
|
63
66
|
# CALM-Data-Generator
|
|
@@ -75,7 +78,7 @@ Dynamic: license-file
|
|
|
75
78
|
**CALM-Data-Generator** is a comprehensive Python library for synthetic data generation with advanced features for:
|
|
76
79
|
- **Clinical/Medical Data** - Generate realistic patient demographics, genes, proteins
|
|
77
80
|
- **Tabular Data Synthesis** - CTGAN, TVAE, CART, and more
|
|
78
|
-
- **Time Series** - TimeGAN,
|
|
81
|
+
- **Time Series** - TimeGAN, TimeVAE, FourierFlows
|
|
79
82
|
- **Single-Cell** - scVI, GEARS (Perturbation Prediction)
|
|
80
83
|
- **Latent Differentiation** - Force class separability in TVAE & scVI
|
|
81
84
|
- **Flexible Clipping** - Strict or permissive data range enforcement
|
|
@@ -290,7 +293,7 @@ synthetic_df = preset.generate(data=adata_df, n_samples=500)
|
|
|
290
293
|
```
|
|
291
294
|
|
|
292
295
|
## Key Libraries & Ecosystem
|
|
293
|
-
|
|
296
|
+
|
|
294
297
|
| Library | Role | Usage in Calm-Data-Generator |
|
|
295
298
|
| :--- | :--- | :--- |
|
|
296
299
|
| **Synthcity** | Deep Learning Engine | Powers `CTGAN`, `TVAE`, `DDPM`, `TimeGAN`. Handling privacy & fidelity. |
|
|
@@ -334,47 +337,74 @@ Minimalist view of the system's core components and data flow.
|
|
|
334
337
|
---
|
|
335
338
|
|
|
336
339
|
## Installation
|
|
337
|
-
|
|
340
|
+
|
|
338
341
|
> [!WARNING]
|
|
339
|
-
> The installation
|
|
340
|
-
|
|
342
|
+
> The installation is **heavy (~2-3 GB)** and may take several minutes. Use a fresh virtual environment.
|
|
343
|
+
|
|
341
344
|
### Versioning Strategy
|
|
342
|
-
|
|
345
|
+
|
|
343
346
|
- **GitHub (Recommended for latest features)**: The `main` branch contains the most up-to-date version with the latest bug fixes and features.
|
|
344
347
|
- **PyPI (Stable)**: Releases on PyPI are stable versions updated less frequently for major changes.
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
+
|
|
349
|
+
### Step 1 — Install PyTorch for your hardware
|
|
350
|
+
|
|
351
|
+
PyTorch must be installed **before** the library so pip resolves the correct wheel (CPU, CUDA, or ROCm).
|
|
348
352
|
|
|
349
353
|
```bash
|
|
350
|
-
#
|
|
351
|
-
|
|
352
|
-
source venv/bin/activate
|
|
354
|
+
# CPU — Mac Intel, CI environments, no GPU
|
|
355
|
+
pip install "torch>=2.2.0" "torchvision>=0.17.0"
|
|
353
356
|
|
|
354
|
-
#
|
|
355
|
-
pip install
|
|
357
|
+
# CUDA 12.4 — Linux / Windows with NVIDIA GPU
|
|
358
|
+
pip install "torch>=2.2.0" "torchvision>=0.17.0" --index-url https://download.pytorch.org/whl/cu124
|
|
359
|
+
|
|
360
|
+
# ROCm 6.1 — Linux with AMD GPU
|
|
361
|
+
pip install "torch>=2.2.0" "torchvision>=0.17.0" --index-url https://download.pytorch.org/whl/rocm6.1
|
|
362
|
+
|
|
363
|
+
# Mac Apple Silicon (M1/M2/M3) — MPS is auto-detected, no special wheel needed
|
|
364
|
+
pip install "torch>=2.2.0" "torchvision>=0.17.0"
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
> Replace `cu124` with your installed CUDA version (e.g. `cu118`, `cu121`). Find yours with `nvidia-smi`.
|
|
356
368
|
|
|
357
|
-
|
|
369
|
+
### Step 2 — Install the library
|
|
370
|
+
|
|
371
|
+
```bash
|
|
372
|
+
pip install --upgrade pip setuptools wheel
|
|
358
373
|
pip install calm-data-generator
|
|
359
374
|
```
|
|
360
375
|
|
|
361
|
-
###
|
|
362
|
-
|
|
376
|
+
### Optional extras
|
|
377
|
+
|
|
363
378
|
```bash
|
|
364
|
-
#
|
|
379
|
+
# River streaming support
|
|
365
380
|
pip install "calm-data-generator[stream]"
|
|
366
381
|
|
|
382
|
+
# GEARS perturbation prediction (requires PyG wheels — see below)
|
|
383
|
+
pip install "calm-data-generator[gears]"
|
|
367
384
|
|
|
385
|
+
# Singling-Out privacy risk metric (anonymeter)
|
|
386
|
+
pip install "calm-data-generator[privacy]"
|
|
368
387
|
|
|
369
|
-
# Full suite
|
|
388
|
+
# Full suite (stream + gears + privacy)
|
|
370
389
|
pip install "calm-data-generator[full]"
|
|
371
390
|
```
|
|
372
391
|
|
|
373
|
-
>
|
|
374
|
-
>
|
|
392
|
+
> **GEARS / PyTorch Geometric** requires platform-specific wheels from the PyG index.
|
|
393
|
+
> Install them **before** `calm-data-generator[gears]`:
|
|
394
|
+
> ```bash
|
|
395
|
+
> # Get your torch version first
|
|
396
|
+
> python -c "import torch; print(torch.__version__)"
|
|
397
|
+
>
|
|
398
|
+
> # CPU example (replace torch-2.2.0 and +cpu with your version and platform)
|
|
399
|
+
> pip install torch-geometric --find-links https://data.pyg.org/whl/torch-2.2.0+cpu.html
|
|
400
|
+
>
|
|
401
|
+
> # CUDA 12.4 example
|
|
402
|
+
> pip install torch-geometric --find-links https://data.pyg.org/whl/torch-2.2.0+cu124.html
|
|
403
|
+
>
|
|
404
|
+
> pip install "calm-data-generator[gears]"
|
|
405
|
+
> ```
|
|
375
406
|
|
|
376
407
|
**From source (GitHub - Latest Updates):**
|
|
377
|
-
Use this method to get the latest bug fixes and features not yet released on PyPI.
|
|
378
408
|
|
|
379
409
|
```bash
|
|
380
410
|
# Option A: Install directly from GitHub
|
|
@@ -410,11 +440,19 @@ pip install calm-data-generator
|
|
|
410
440
|
2. Install "Desktop development with C++"
|
|
411
441
|
3. Then retry installation
|
|
412
442
|
|
|
413
|
-
**
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
443
|
+
**Windows — Long Path error during installation:**
|
|
444
|
+
|
|
445
|
+
Some packages (e.g. `orbax-checkpoint`) contain very deep directory structures that exceed the Windows default 260-character path limit. If you see an error like:
|
|
446
|
+
```
|
|
447
|
+
OSError: [Errno 2] No such file or directory: 'C:\...\very\long\path'
|
|
448
|
+
HINT: This error might have occurred since this system does not have Windows Long Path support enabled.
|
|
449
|
+
```
|
|
450
|
+
Enable long paths via PowerShell (run as Administrator):
|
|
451
|
+
```powershell
|
|
452
|
+
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `
|
|
453
|
+
-Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
|
|
417
454
|
```
|
|
455
|
+
Then restart your machine and retry installation. Alternatively, install your virtual environment in a short root path (e.g. `C:\venv\`) to reduce total path length.
|
|
418
456
|
|
|
419
457
|
**Dependency conflicts:** Use a clean virtual environment:
|
|
420
458
|
```bash
|
|
@@ -457,36 +495,43 @@ synthetic = gen.generate(
|
|
|
457
495
|
print(f"Generated {len(synthetic)} samples")
|
|
458
496
|
```
|
|
459
497
|
|
|
498
|
+
### Simpler API: `fit()` / `sample()`
|
|
499
|
+
|
|
500
|
+
For the common case — train once, sample as many times as you want — use the sklearn-style wrapper:
|
|
501
|
+
|
|
502
|
+
```python
|
|
503
|
+
gen = RealGenerator(auto_report=False).fit(data, method="cart", target_col="label")
|
|
504
|
+
|
|
505
|
+
small_batch = gen.sample(100)
|
|
506
|
+
large_batch = gen.sample(10_000) # reuses the fitted model, no retraining
|
|
507
|
+
|
|
508
|
+
# Chaining works too:
|
|
509
|
+
synthetic = RealGenerator().fit(data, method="ctgan").sample(1000)
|
|
510
|
+
```
|
|
511
|
+
|
|
460
512
|
### GPU Acceleration
|
|
461
513
|
|
|
462
|
-
**
|
|
514
|
+
GPU is **auto-detected** at runtime in the order CUDA → MPS → CPU. No parameter is needed for most methods.
|
|
515
|
+
|
|
516
|
+
| Method | Device support | Notes |
|
|
517
|
+
| ------ | -------------- | ----- |
|
|
518
|
+
| `scvi`, `scanvi` | CUDA · MPS · CPU | Auto-detected via Lightning accelerator |
|
|
519
|
+
| `gears` | CUDA · MPS · CPU | Auto-detected via PyTorch device |
|
|
520
|
+
| `ctgan`, `tvae`, `rtvae`, `ddpm`, `timegan`, `timevae`, `fflows`, `dpgan`, `pategan`, `great` | CUDA · CPU | Auto-detected internally by Synthcity |
|
|
521
|
+
| `cart`, `rf`, `lgbm`, `xgboost`, `gmm`, `copula`, `windowed_copula`, `kde`, `smote`, `adasyn`, `hmm`, `bn` | CPU only | Statistical / tree-based, no GPU path |
|
|
463
522
|
|
|
464
|
-
|
|
465
|
-
|--------|-------------|-----------|
|
|
466
|
-
| `ctgan`, `tvae` | Yes — CUDA/MPS | `enable_gpu=True` |
|
|
467
|
-
| `diffusion` | Yes — PyTorch | Auto-detected |
|
|
468
|
-
| `ddpm` | Yes — PyTorch + Synthcity | Auto-detected |
|
|
469
|
-
| `timegan` | Yes — PyTorch + Synthcity | Auto-detected |
|
|
470
|
-
| `timevae` | Yes — PyTorch + Synthcity | Auto-detected |
|
|
471
|
-
| `fflows` | Yes — PyTorch + Synthcity | Auto-detected |
|
|
523
|
+
**Mac Apple Silicon (M1/M2/M3):** MPS is used automatically for `scvi`, `scanvi`, and `gears` when `torch.backends.mps.is_available()` returns `True`. Install the standard CPU wheel — no special MPS wheel is required.
|
|
472
524
|
|
|
473
|
-
|
|
525
|
+
To override the device explicitly:
|
|
474
526
|
|
|
475
527
|
```python
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
n_samples=1000,
|
|
479
|
-
method='ctgan',
|
|
480
|
-
epochs=300,
|
|
481
|
-
enable_gpu=True,
|
|
482
|
-
|
|
483
|
-
)
|
|
484
|
-
```
|
|
528
|
+
# Force CPU for scVI/scANVI
|
|
529
|
+
gen.generate(data=data, n_samples=1000, method='scvi', accelerator='cpu')
|
|
485
530
|
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
531
|
+
# Force a specific device for GEARS
|
|
532
|
+
gen.generate(data=data, n_samples=1000, method='gears', device='cuda')
|
|
533
|
+
gen.generate(data=data, n_samples=1000, method='gears', device='mps')
|
|
534
|
+
```
|
|
490
535
|
|
|
491
536
|
### Generate Clinical Data
|
|
492
537
|
|
|
@@ -579,7 +624,7 @@ synthetic = gen.generate(
|
|
|
579
624
|
target_col='cell_type',
|
|
580
625
|
epochs=100,
|
|
581
626
|
n_latent=10,
|
|
582
|
-
|
|
627
|
+
|
|
583
628
|
)
|
|
584
629
|
|
|
585
630
|
|
|
@@ -646,6 +691,14 @@ reporter.generate_report(
|
|
|
646
691
|
# Results JSON (including compared_data_files) saved to ./quality_report/report_results.json
|
|
647
692
|
```
|
|
648
693
|
|
|
694
|
+
For a fast, in-memory check without writing any file (quality scores, KS/MMD/Wasserstein
|
|
695
|
+
statistical tests, and TSTR if you pass a `target_column`), use `evaluate()` instead:
|
|
696
|
+
|
|
697
|
+
```python
|
|
698
|
+
result = reporter.evaluate(real_data, synthetic, target_column="target")
|
|
699
|
+
print(result["quality_scores"], result["statistical_metrics"])
|
|
700
|
+
```
|
|
701
|
+
|
|
649
702
|
For **single-cell data**, enable [scGFT](https://github.com/nasim23ea/scgft-evaluator) evaluation (Graph Fourier Transform-based manifold preservation metrics):
|
|
650
703
|
|
|
651
704
|
```python
|
|
@@ -682,29 +735,36 @@ reporter.generate_comprehensive_report(
|
|
|
682
735
|
|
|
683
736
|
## Synthesis Methods
|
|
684
737
|
|
|
685
|
-
| Method | Type | Description | Requirements
|
|
686
|
-
|
|
687
|
-
| `cart` | ML | CART-based iterative synthesis (fast) | Base
|
|
688
|
-
| `rf` | ML | Random Forest synthesis | Base
|
|
689
|
-
| `lgbm` | ML | LightGBM-based synthesis | Base
|
|
690
|
-
| `
|
|
691
|
-
| `
|
|
692
|
-
| `
|
|
693
|
-
| `
|
|
694
|
-
| `
|
|
695
|
-
| `
|
|
696
|
-
| `
|
|
697
|
-
| `
|
|
698
|
-
| `
|
|
699
|
-
| `
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
| `
|
|
703
|
-
| `
|
|
704
|
-
| `
|
|
705
|
-
| `
|
|
706
|
-
| `
|
|
707
|
-
| `
|
|
738
|
+
| Method | Type | Description | Requirements |
|
|
739
|
+
| ------ | ---- | ----------- | ------------ |
|
|
740
|
+
| `cart` | ML | CART-based iterative synthesis (fast) | Base |
|
|
741
|
+
| `rf` | ML | Random Forest synthesis | Base |
|
|
742
|
+
| `lgbm` | ML | LightGBM-based synthesis | Base |
|
|
743
|
+
| `xgboost` | ML | XGBoost-based synthesis | Base |
|
|
744
|
+
| `gmm` | Statistical | Gaussian Mixture Models | Base |
|
|
745
|
+
| `kde` | Statistical | Kernel Density Estimation (numeric only) | Base |
|
|
746
|
+
| `copula` | Statistical | Gaussian Copula synthesis | Base |
|
|
747
|
+
| `windowed_copula` | Drift-Aware | Gaussian Copula interpolated across time windows | Base |
|
|
748
|
+
| `hmm` | Drift-Aware | Hidden Markov Model — drift via regime transitions | Base |
|
|
749
|
+
| `smote` | Augmentation | SMOTE oversampling | Base |
|
|
750
|
+
| `adasyn` | Augmentation | ADASYN adaptive sampling | Base |
|
|
751
|
+
| `resample` | Augmentation | Weighted resampling from original data | Base |
|
|
752
|
+
| `ctgan` | DL | Conditional GAN for tabular data | `synthcity` |
|
|
753
|
+
| `tvae` | DL | Variational Autoencoder | `synthcity` |
|
|
754
|
+
| `rtvae` | DL | Robust TVAE | `synthcity` |
|
|
755
|
+
| `great` | DL | GReaT — LLM-based tabular generation | `synthcity` |
|
|
756
|
+
| `bn` | Probabilistic | Bayesian Network — causal dependencies | `synthcity` |
|
|
757
|
+
| `diffusion` | DL | Tabular Diffusion (custom, lightweight) | Base (PyTorch) |
|
|
758
|
+
| `ddpm` | DL | TabDDPM — advanced diffusion | `synthcity` |
|
|
759
|
+
| `dpgan` | DL + Privacy | Differentially private GAN | `synthcity` |
|
|
760
|
+
| `pategan` | DL + Privacy | PATE-GAN — teacher-ensemble privacy | `synthcity` |
|
|
761
|
+
| `timegan` | Time Series | TimeGAN for sequential data | `synthcity` |
|
|
762
|
+
| `timevae` | Time Series | TimeVAE for sequential data | `synthcity` |
|
|
763
|
+
| `fflows` | Time Series | FourierFlows — normalizing flows, stable for periodic series | `synthcity` |
|
|
764
|
+
| `conditional_drift` | Drift-Aware | Temporal stage conditioning via TVAE/CTGAN | `synthcity` |
|
|
765
|
+
| `scvi` | Single-Cell | scVI (VAE) for RNA-seq expression data | `scvi-tools` |
|
|
766
|
+
| `scanvi` | Single-Cell | scANVI — semi-supervised, label-aware scVI | `scvi-tools` |
|
|
767
|
+
| `gears` | Single-Cell | GEARS — perturbation prediction via GNN | `[gears]` extra |
|
|
708
768
|
|
|
709
769
|
|
|
710
770
|
---
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
**CALM-Data-Generator** is a comprehensive Python library for synthetic data generation with advanced features for:
|
|
14
14
|
- **Clinical/Medical Data** - Generate realistic patient demographics, genes, proteins
|
|
15
15
|
- **Tabular Data Synthesis** - CTGAN, TVAE, CART, and more
|
|
16
|
-
- **Time Series** - TimeGAN,
|
|
16
|
+
- **Time Series** - TimeGAN, TimeVAE, FourierFlows
|
|
17
17
|
- **Single-Cell** - scVI, GEARS (Perturbation Prediction)
|
|
18
18
|
- **Latent Differentiation** - Force class separability in TVAE & scVI
|
|
19
19
|
- **Flexible Clipping** - Strict or permissive data range enforcement
|
|
@@ -228,7 +228,7 @@ synthetic_df = preset.generate(data=adata_df, n_samples=500)
|
|
|
228
228
|
```
|
|
229
229
|
|
|
230
230
|
## Key Libraries & Ecosystem
|
|
231
|
-
|
|
231
|
+
|
|
232
232
|
| Library | Role | Usage in Calm-Data-Generator |
|
|
233
233
|
| :--- | :--- | :--- |
|
|
234
234
|
| **Synthcity** | Deep Learning Engine | Powers `CTGAN`, `TVAE`, `DDPM`, `TimeGAN`. Handling privacy & fidelity. |
|
|
@@ -272,47 +272,74 @@ Minimalist view of the system's core components and data flow.
|
|
|
272
272
|
---
|
|
273
273
|
|
|
274
274
|
## Installation
|
|
275
|
-
|
|
275
|
+
|
|
276
276
|
> [!WARNING]
|
|
277
|
-
> The installation
|
|
278
|
-
|
|
277
|
+
> The installation is **heavy (~2-3 GB)** and may take several minutes. Use a fresh virtual environment.
|
|
278
|
+
|
|
279
279
|
### Versioning Strategy
|
|
280
|
-
|
|
280
|
+
|
|
281
281
|
- **GitHub (Recommended for latest features)**: The `main` branch contains the most up-to-date version with the latest bug fixes and features.
|
|
282
282
|
- **PyPI (Stable)**: Releases on PyPI are stable versions updated less frequently for major changes.
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
283
|
+
|
|
284
|
+
### Step 1 — Install PyTorch for your hardware
|
|
285
|
+
|
|
286
|
+
PyTorch must be installed **before** the library so pip resolves the correct wheel (CPU, CUDA, or ROCm).
|
|
286
287
|
|
|
287
288
|
```bash
|
|
288
|
-
#
|
|
289
|
-
|
|
290
|
-
source venv/bin/activate
|
|
289
|
+
# CPU — Mac Intel, CI environments, no GPU
|
|
290
|
+
pip install "torch>=2.2.0" "torchvision>=0.17.0"
|
|
291
291
|
|
|
292
|
-
#
|
|
293
|
-
pip install
|
|
292
|
+
# CUDA 12.4 — Linux / Windows with NVIDIA GPU
|
|
293
|
+
pip install "torch>=2.2.0" "torchvision>=0.17.0" --index-url https://download.pytorch.org/whl/cu124
|
|
294
|
+
|
|
295
|
+
# ROCm 6.1 — Linux with AMD GPU
|
|
296
|
+
pip install "torch>=2.2.0" "torchvision>=0.17.0" --index-url https://download.pytorch.org/whl/rocm6.1
|
|
297
|
+
|
|
298
|
+
# Mac Apple Silicon (M1/M2/M3) — MPS is auto-detected, no special wheel needed
|
|
299
|
+
pip install "torch>=2.2.0" "torchvision>=0.17.0"
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
> Replace `cu124` with your installed CUDA version (e.g. `cu118`, `cu121`). Find yours with `nvidia-smi`.
|
|
294
303
|
|
|
295
|
-
|
|
304
|
+
### Step 2 — Install the library
|
|
305
|
+
|
|
306
|
+
```bash
|
|
307
|
+
pip install --upgrade pip setuptools wheel
|
|
296
308
|
pip install calm-data-generator
|
|
297
309
|
```
|
|
298
310
|
|
|
299
|
-
###
|
|
300
|
-
|
|
311
|
+
### Optional extras
|
|
312
|
+
|
|
301
313
|
```bash
|
|
302
|
-
#
|
|
314
|
+
# River streaming support
|
|
303
315
|
pip install "calm-data-generator[stream]"
|
|
304
316
|
|
|
317
|
+
# GEARS perturbation prediction (requires PyG wheels — see below)
|
|
318
|
+
pip install "calm-data-generator[gears]"
|
|
305
319
|
|
|
320
|
+
# Singling-Out privacy risk metric (anonymeter)
|
|
321
|
+
pip install "calm-data-generator[privacy]"
|
|
306
322
|
|
|
307
|
-
# Full suite
|
|
323
|
+
# Full suite (stream + gears + privacy)
|
|
308
324
|
pip install "calm-data-generator[full]"
|
|
309
325
|
```
|
|
310
326
|
|
|
311
|
-
>
|
|
312
|
-
>
|
|
327
|
+
> **GEARS / PyTorch Geometric** requires platform-specific wheels from the PyG index.
|
|
328
|
+
> Install them **before** `calm-data-generator[gears]`:
|
|
329
|
+
> ```bash
|
|
330
|
+
> # Get your torch version first
|
|
331
|
+
> python -c "import torch; print(torch.__version__)"
|
|
332
|
+
>
|
|
333
|
+
> # CPU example (replace torch-2.2.0 and +cpu with your version and platform)
|
|
334
|
+
> pip install torch-geometric --find-links https://data.pyg.org/whl/torch-2.2.0+cpu.html
|
|
335
|
+
>
|
|
336
|
+
> # CUDA 12.4 example
|
|
337
|
+
> pip install torch-geometric --find-links https://data.pyg.org/whl/torch-2.2.0+cu124.html
|
|
338
|
+
>
|
|
339
|
+
> pip install "calm-data-generator[gears]"
|
|
340
|
+
> ```
|
|
313
341
|
|
|
314
342
|
**From source (GitHub - Latest Updates):**
|
|
315
|
-
Use this method to get the latest bug fixes and features not yet released on PyPI.
|
|
316
343
|
|
|
317
344
|
```bash
|
|
318
345
|
# Option A: Install directly from GitHub
|
|
@@ -348,11 +375,19 @@ pip install calm-data-generator
|
|
|
348
375
|
2. Install "Desktop development with C++"
|
|
349
376
|
3. Then retry installation
|
|
350
377
|
|
|
351
|
-
**
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
378
|
+
**Windows — Long Path error during installation:**
|
|
379
|
+
|
|
380
|
+
Some packages (e.g. `orbax-checkpoint`) contain very deep directory structures that exceed the Windows default 260-character path limit. If you see an error like:
|
|
381
|
+
```
|
|
382
|
+
OSError: [Errno 2] No such file or directory: 'C:\...\very\long\path'
|
|
383
|
+
HINT: This error might have occurred since this system does not have Windows Long Path support enabled.
|
|
384
|
+
```
|
|
385
|
+
Enable long paths via PowerShell (run as Administrator):
|
|
386
|
+
```powershell
|
|
387
|
+
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `
|
|
388
|
+
-Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
|
|
355
389
|
```
|
|
390
|
+
Then restart your machine and retry installation. Alternatively, install your virtual environment in a short root path (e.g. `C:\venv\`) to reduce total path length.
|
|
356
391
|
|
|
357
392
|
**Dependency conflicts:** Use a clean virtual environment:
|
|
358
393
|
```bash
|
|
@@ -395,36 +430,43 @@ synthetic = gen.generate(
|
|
|
395
430
|
print(f"Generated {len(synthetic)} samples")
|
|
396
431
|
```
|
|
397
432
|
|
|
433
|
+
### Simpler API: `fit()` / `sample()`
|
|
434
|
+
|
|
435
|
+
For the common case — train once, sample as many times as you want — use the sklearn-style wrapper:
|
|
436
|
+
|
|
437
|
+
```python
|
|
438
|
+
gen = RealGenerator(auto_report=False).fit(data, method="cart", target_col="label")
|
|
439
|
+
|
|
440
|
+
small_batch = gen.sample(100)
|
|
441
|
+
large_batch = gen.sample(10_000) # reuses the fitted model, no retraining
|
|
442
|
+
|
|
443
|
+
# Chaining works too:
|
|
444
|
+
synthetic = RealGenerator().fit(data, method="ctgan").sample(1000)
|
|
445
|
+
```
|
|
446
|
+
|
|
398
447
|
### GPU Acceleration
|
|
399
448
|
|
|
400
|
-
**
|
|
449
|
+
GPU is **auto-detected** at runtime in the order CUDA → MPS → CPU. No parameter is needed for most methods.
|
|
450
|
+
|
|
451
|
+
| Method | Device support | Notes |
|
|
452
|
+
| ------ | -------------- | ----- |
|
|
453
|
+
| `scvi`, `scanvi` | CUDA · MPS · CPU | Auto-detected via Lightning accelerator |
|
|
454
|
+
| `gears` | CUDA · MPS · CPU | Auto-detected via PyTorch device |
|
|
455
|
+
| `ctgan`, `tvae`, `rtvae`, `ddpm`, `timegan`, `timevae`, `fflows`, `dpgan`, `pategan`, `great` | CUDA · CPU | Auto-detected internally by Synthcity |
|
|
456
|
+
| `cart`, `rf`, `lgbm`, `xgboost`, `gmm`, `copula`, `windowed_copula`, `kde`, `smote`, `adasyn`, `hmm`, `bn` | CPU only | Statistical / tree-based, no GPU path |
|
|
401
457
|
|
|
402
|
-
|
|
403
|
-
|--------|-------------|-----------|
|
|
404
|
-
| `ctgan`, `tvae` | Yes — CUDA/MPS | `enable_gpu=True` |
|
|
405
|
-
| `diffusion` | Yes — PyTorch | Auto-detected |
|
|
406
|
-
| `ddpm` | Yes — PyTorch + Synthcity | Auto-detected |
|
|
407
|
-
| `timegan` | Yes — PyTorch + Synthcity | Auto-detected |
|
|
408
|
-
| `timevae` | Yes — PyTorch + Synthcity | Auto-detected |
|
|
409
|
-
| `fflows` | Yes — PyTorch + Synthcity | Auto-detected |
|
|
458
|
+
**Mac Apple Silicon (M1/M2/M3):** MPS is used automatically for `scvi`, `scanvi`, and `gears` when `torch.backends.mps.is_available()` returns `True`. Install the standard CPU wheel — no special MPS wheel is required.
|
|
410
459
|
|
|
411
|
-
|
|
460
|
+
To override the device explicitly:
|
|
412
461
|
|
|
413
462
|
```python
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
n_samples=1000,
|
|
417
|
-
method='ctgan',
|
|
418
|
-
epochs=300,
|
|
419
|
-
enable_gpu=True,
|
|
420
|
-
|
|
421
|
-
)
|
|
422
|
-
```
|
|
463
|
+
# Force CPU for scVI/scANVI
|
|
464
|
+
gen.generate(data=data, n_samples=1000, method='scvi', accelerator='cpu')
|
|
423
465
|
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
466
|
+
# Force a specific device for GEARS
|
|
467
|
+
gen.generate(data=data, n_samples=1000, method='gears', device='cuda')
|
|
468
|
+
gen.generate(data=data, n_samples=1000, method='gears', device='mps')
|
|
469
|
+
```
|
|
428
470
|
|
|
429
471
|
### Generate Clinical Data
|
|
430
472
|
|
|
@@ -517,7 +559,7 @@ synthetic = gen.generate(
|
|
|
517
559
|
target_col='cell_type',
|
|
518
560
|
epochs=100,
|
|
519
561
|
n_latent=10,
|
|
520
|
-
|
|
562
|
+
|
|
521
563
|
)
|
|
522
564
|
|
|
523
565
|
|
|
@@ -584,6 +626,14 @@ reporter.generate_report(
|
|
|
584
626
|
# Results JSON (including compared_data_files) saved to ./quality_report/report_results.json
|
|
585
627
|
```
|
|
586
628
|
|
|
629
|
+
For a fast, in-memory check without writing any file (quality scores, KS/MMD/Wasserstein
|
|
630
|
+
statistical tests, and TSTR if you pass a `target_column`), use `evaluate()` instead:
|
|
631
|
+
|
|
632
|
+
```python
|
|
633
|
+
result = reporter.evaluate(real_data, synthetic, target_column="target")
|
|
634
|
+
print(result["quality_scores"], result["statistical_metrics"])
|
|
635
|
+
```
|
|
636
|
+
|
|
587
637
|
For **single-cell data**, enable [scGFT](https://github.com/nasim23ea/scgft-evaluator) evaluation (Graph Fourier Transform-based manifold preservation metrics):
|
|
588
638
|
|
|
589
639
|
```python
|
|
@@ -620,29 +670,36 @@ reporter.generate_comprehensive_report(
|
|
|
620
670
|
|
|
621
671
|
## Synthesis Methods
|
|
622
672
|
|
|
623
|
-
| Method | Type | Description | Requirements
|
|
624
|
-
|
|
625
|
-
| `cart` | ML | CART-based iterative synthesis (fast) | Base
|
|
626
|
-
| `rf` | ML | Random Forest synthesis | Base
|
|
627
|
-
| `lgbm` | ML | LightGBM-based synthesis | Base
|
|
628
|
-
| `
|
|
629
|
-
| `
|
|
630
|
-
| `
|
|
631
|
-
| `
|
|
632
|
-
| `
|
|
633
|
-
| `
|
|
634
|
-
| `
|
|
635
|
-
| `
|
|
636
|
-
| `
|
|
637
|
-
| `
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
| `
|
|
641
|
-
| `
|
|
642
|
-
| `
|
|
643
|
-
| `
|
|
644
|
-
| `
|
|
645
|
-
| `
|
|
673
|
+
| Method | Type | Description | Requirements |
|
|
674
|
+
| ------ | ---- | ----------- | ------------ |
|
|
675
|
+
| `cart` | ML | CART-based iterative synthesis (fast) | Base |
|
|
676
|
+
| `rf` | ML | Random Forest synthesis | Base |
|
|
677
|
+
| `lgbm` | ML | LightGBM-based synthesis | Base |
|
|
678
|
+
| `xgboost` | ML | XGBoost-based synthesis | Base |
|
|
679
|
+
| `gmm` | Statistical | Gaussian Mixture Models | Base |
|
|
680
|
+
| `kde` | Statistical | Kernel Density Estimation (numeric only) | Base |
|
|
681
|
+
| `copula` | Statistical | Gaussian Copula synthesis | Base |
|
|
682
|
+
| `windowed_copula` | Drift-Aware | Gaussian Copula interpolated across time windows | Base |
|
|
683
|
+
| `hmm` | Drift-Aware | Hidden Markov Model — drift via regime transitions | Base |
|
|
684
|
+
| `smote` | Augmentation | SMOTE oversampling | Base |
|
|
685
|
+
| `adasyn` | Augmentation | ADASYN adaptive sampling | Base |
|
|
686
|
+
| `resample` | Augmentation | Weighted resampling from original data | Base |
|
|
687
|
+
| `ctgan` | DL | Conditional GAN for tabular data | `synthcity` |
|
|
688
|
+
| `tvae` | DL | Variational Autoencoder | `synthcity` |
|
|
689
|
+
| `rtvae` | DL | Robust TVAE | `synthcity` |
|
|
690
|
+
| `great` | DL | GReaT — LLM-based tabular generation | `synthcity` |
|
|
691
|
+
| `bn` | Probabilistic | Bayesian Network — causal dependencies | `synthcity` |
|
|
692
|
+
| `diffusion` | DL | Tabular Diffusion (custom, lightweight) | Base (PyTorch) |
|
|
693
|
+
| `ddpm` | DL | TabDDPM — advanced diffusion | `synthcity` |
|
|
694
|
+
| `dpgan` | DL + Privacy | Differentially private GAN | `synthcity` |
|
|
695
|
+
| `pategan` | DL + Privacy | PATE-GAN — teacher-ensemble privacy | `synthcity` |
|
|
696
|
+
| `timegan` | Time Series | TimeGAN for sequential data | `synthcity` |
|
|
697
|
+
| `timevae` | Time Series | TimeVAE for sequential data | `synthcity` |
|
|
698
|
+
| `fflows` | Time Series | FourierFlows — normalizing flows, stable for periodic series | `synthcity` |
|
|
699
|
+
| `conditional_drift` | Drift-Aware | Temporal stage conditioning via TVAE/CTGAN | `synthcity` |
|
|
700
|
+
| `scvi` | Single-Cell | scVI (VAE) for RNA-seq expression data | `scvi-tools` |
|
|
701
|
+
| `scanvi` | Single-Cell | scANVI — semi-supervised, label-aware scVI | `scvi-tools` |
|
|
702
|
+
| `gears` | Single-Cell | GEARS — perturbation prediction via GNN | `[gears]` extra |
|
|
646
703
|
|
|
647
704
|
|
|
648
705
|
---
|