--- id: ctgan version: "0.12.1" license: BUSL-1.1 license_treatment: unclear maintenance: active --- # ctgan — Create tabular synthetic data using a conditional GAN License: unclear · Maintenance: active · Downloads: 123.0K/mo ## What it is and what it does CTGAN is a standalone deep learning library for generating synthetic tabular data using conditional GAN and TVAE models. It learns patterns from real data and produces synthetic records that preserve statistical properties while protecting privacy. The library is part of the Synthetic Data Vault ecosystem but can be used independently; it requires careful data preprocessing (no missing values, proper type handling) and depends on PyTorch for model training. Typical workflows involve loading real data, specifying which columns are discrete, training a model for a set number of epochs, and sampling synthetic records. The library is in Pre-Alpha stage, meaning its API and behavior may change. It's most suitable for research, testing, and non-production synthetic data needs where you control the licensing implications. Use it for: - Generate synthetic test datasets for machine learning model development without exposing real customer or sensitive data. - Create privacy-preserving data samples for sharing with external teams or in research publications. - Augment imbalanced training datasets by synthesizing additional records for underrepresented classes. - Prototype data pipelines and validate ETL logic on realistic synthetic data before running against production. - Evaluate data quality and statistical properties of synthetic data generation models in research contexts. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. CTGAN generates synthetic tabular data by training deep learning models (CTGAN and TVAE) on real datasets, learning patterns to produce high-fidelity synthetic records suitable for testing, privacy-preserving data sharing, or augmentation. Yes, with conditions. Install CTGAN if you need to generate synthetic tabular data and accept its Pre-Alpha maturity and BUSL-1.1 licensing restrictions. The library is actively maintained, has low install friction, and no known vulnerabilities. However, verify that the Business Source License aligns with your use case (commercial use may be restricted), and consider the SDV wrapper library if you need higher-level APIs and preprocessing support. Not recommended for production systems requiring stability guarantees. ## Install pip install ctgan uv add ctgan poetry add ctgan ## Installing ctgan Before you install: Low install friction with five runtime dependencies (numpy, pandas, torch, tqdm, rdt). Actively maintained with a recent release 182 days ago and ongoing repository activity. Pre-Alpha status signals the library is still evolving; consider this for experimental or non-production workflows. License in practice: Licensed under BUSL-1.1 (Business Source License), which restricts commercial use until a specified date and requires careful review of your use case. This is not a permissive open-source license; verify compatibility with your project's licensing requirements. Quickstart: from ctgan import CTGAN, load_demo real_data = load_demo() discrete_columns = ['workclass', 'education', 'occupation'] ctgan = CTGAN(epochs=10) ctgan.fit(real_data, discrete_columns) synthetic_data = ctgan.sample(1000) Requires torch (PyTorch) as a runtime dependency; data must be preprocessed with continuous values as floats, discrete as ints/strings, and no missing values. Verify before relying: - Whether BUSL-1.1 licensing restrictions apply to your intended use case and timeline. - Performance characteristics and memory requirements for large datasets or high-dimensional tables. - Fidelity and privacy guarantees compared to alternatives in the SDV ecosystem. ## Package facts - License: BUSL-1.1 (unclear) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 123.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags synthetic tabular data generation, conditional GAN for tables, deep learning data synthesis, privacy-preserving synthetic data, tabular data augmentation, synthetic-data, deep-learning, privacy [View on SkillFed](https://skillfed.io/packages/ctgan) · [View on PyPI](https://pypi.org/project/ctgan/)