# ydata-synthetic

> Generate synthetic tabular and time-series data with GANs and Gaussian Mixtures

- Category: Data & Labeling / Synthetic Data
- Language: Python
- Repository: https://github.com/Data-Centric-AI-Community/fg-data-synthetic
- Canonical page: https://ai-tldr.dev/tools/ydata-synthetic/

## In short

ydata-synthetic is a Python package for generating synthetic tabular and time-series data from real datasets. It sits in the Synthetic Data category of the Data & Labeling tools and is open-source, written in Python. To get started: install the package.

## Overview

ydata-synthetic is a Python package for generating synthetic tabular and time-series data from real datasets. It bundles several generative models, from Generative Adversarial Networks (GANs) to a faster Gaussian Mixture approach, so you can produce artificial data that keeps the statistical shape of the original without carrying identifiable records.

It is aimed at data scientists and ML engineers who need extra or privacy-safe data. Common reasons include sharing data without exposing personal information, balancing or augmenting small datasets, and reducing bias before training a model.

In the synthetic data category, it covers both structured tables and sequential data. The deep learning models are built on TensorFlow 2, and a Streamlit UI is included so you can train a synthesizer and generate samples without writing much code. Note: the project was renamed and now installs from the fg-data-synthetic package.

## What it does

- Generates both tabular and time-series synthetic data from real datasets
- Includes multiple GAN models: CGAN, WGAN, WGANGP, DRAGAN, CRAMER, and CTGAN
- Supports time-series generation with TimeGAN and DoppelGANger
- Offers a fast Gaussian Mixture model that runs without a GPU
- Ships a Streamlit UI to train a synthesizer and generate or profile samples
- Deep learning models implemented on TensorFlow 2 with example notebooks

## Getting started

Install the package from PyPI, then either use the Python API or launch the Streamlit UI. Note that the package is now published as fg-data-synthetic and imported as data_synthetic.

1. Install the package

   Install the latest release from PyPI with pip.

```bash
pip install fg-data-synthetic
```

2. Import a synthesizer

   Import the regular synthesizer from the data_synthetic package to generate tabular data.

```python
from data_synthetic.synthesizers.regular import RegularSynthesizer
```

3. Optional: install and run the Streamlit UI

   For a low-code experience, install the streamlit extra and start the app from a Python file (notebooks are not supported).

```bash
pip install fg-data-synthetic[streamlit]

# in a python file:
from data_synthetic import streamlit_app
streamlit_app.run()
```

## When to use it

- Share a dataset for analysis or ML without exposing personal or identifiable records
- Augment a small training set with additional synthetic rows to improve model coverage
- Balance an imbalanced dataset by generating more samples of underrepresented classes
- Create realistic synthetic time-series, such as stock or usage data, for testing and prototyping
