fg-data-synthetic

repository·dev·Indexed 23 days ago

https://github.com/data-centric-ai-community/fg-data-synthetic

A package for generating synthetic tabular and time-series data using generative models such as GANs (CGAN, WGAN, WGANGP, DRAGAN, Cramer, CTGAN) and Gaussian Mixtures. It features a programmatic API and a low-code Streamlit UI for training synthesizer models and profiling synthetic data. The library supports numeric and categorical features for tabular data, as well as temporal dependencies for time-series data via models like TimeGAN and DoppelGANger.

Tokens
17.6K
Snippets
43
Records
118
Agent score
81%

What's inside fg-data-synthetic

  1. Overview of synthetic data generation with ydata-synthetic

    dev

    The ydata-synthetic package is an open-source Python library designed for experimenting with generative models to create synthetic data. It serves as an alternative or supplement to real-world data, particularly when real data is scarce or for boosting Machine Learning performance.

    Supported data types and models include:

    • Tabular Data: Generatable via Variational Auto Encoders (VAE), Gaussian Mixture Models (GMM), and Conditional Generative Adversarial Networks (CTGAN).
    • Time-Series Data: Generatable via TimeGAN.

    The package also features a user-friendly UI interface to guide users through the synthetic data generation process.

  2. Overview of ydata-synthetic

    dev
    ydata-synthetic is a Python package designed for generating synthetic tabular and time-series data using Generative AI models. It is used for tasks such as data augmentation, bias mitigation, data sharing, and privacy engineering by learning the properties of real datasets to create realistic synthetic counterparts.
  3. Supported data types in ydata-synthetic

    dev

    The package supports two primary types of data:

    1. Tabular Data: Structured data organized in rows (observations) and columns (features). It handles both numeric (quantitative) and categorical (qualitative, including ordinal, binary/boolean, and nominal) features. Tabular data is characterized by a lack of temporal dependence.
    2. Time-Series Data: Sequential data exhibiting temporal dependency between records. This includes patterns such as seasonality (repeating calendar patterns) and periodicity (repeating patterns over time).
  4. Understand TimeGAN temporal limitations

    dev

    TimeGAN is not designed to replicate the full long-term behavior or temporal patterns of a dataset. Instead, it operates on the concept of "windows".

    It learns to map the data distribution of short-term frames within the specific time windows provided. Because it treats these windows as independent, it cannot return the long-term temporal patterns typically expected in time-series analysis.

  5. Evaluate synthetic data quality using Privacy, Fidelity, and Utility

    dev

    Synthetic data quality is evaluated across three essential pillars:

    • Privacy: The ability of the synthetic data to withhold personal, private, or sensitive information and prevent data leakage or connections to the original data.
    • Fidelity: How closely the synthetic data preserves the properties and distributions of the original data ("how faithful/precise" it is).
    • Utility: The ability of the synthetic data to be used in downstream applications to derive the same insights as the original data.
  6. Install the ydata-synthetic Streamlit GUI

    dev

    Since version 1.0.0, ydata-synthetic includes a GUI experience powered by Streamlit. This UI supports the full data synthesization workflow, from reading data to profiling synthetic data generation.

    To install the GUI, use the [streamlit] extra during installation.

    Note: The Streamlit app is not supported in Jupyter or Colab Notebooks; it must be run in a standard Python environment.

    pip install "ydata-synthetic[streamlit]"
  7. Use the Streamlit UI for synthetic data generation

    dev

    The package includes a Streamlit-based UI for a low-code experience to train synthesizer models and generate/profile synthetic data samples for structured tabular data.

    Supported models in the UI:

    • CGAN
    • WGAN
    • WGANGP
    • DRAGAN
    • CRAMER
    • CTGAN

    Installation: You must install the streamlit extra to use the UI:

    pip install fg-data-synthetic[streamlit]

    Running the UI: You can run the UI from within a Python script (note: Jupyter Notebooks are not supported) or via the command line.

    from data_synthetic import streamlit_app
    
    streamlit_app.run()