<div align="center">
<br/>
<p align="center">
<i>This repository is part of <a href="https://sdv.dev">The Synthetic Data Vault Project</a>, a project from <a href="https://datacebo.com">DataCebo</a>.</i>
</p>
[![Development Status](https://img.shields.io/badge/Development%20Status-2%20--%20Pre--Alpha-yellow)](https://pypi.org/search/?c=Development+Status+%3A%3A+2+-+Pre-Alpha)
[![Travis](https://travis-ci.org/sdv-dev/SDGym.svg?branch=main)](https://travis-ci.org/sdv-dev/SDGym)
[![PyPi Shield](https://img.shields.io/pypi/v/sdgym.svg)](https://pypi.python.org/pypi/sdgym)
[![Downloads](https://pepy.tech/badge/sdgym)](https://pepy.tech/project/sdgym)
[![Slack](https://img.shields.io/badge/Community-Slack-blue?style=plastic&logo=slack)](https://bit.ly/sdv-slack-invite)
<div align="left">
<br/>
<p align="center">
<a href="https://github.com/sdv-dev/SDGym">
<img align="center" width=40% src="https://github.com/sdv-dev/SDV/blob/stable/docs/images/SDGym-DataCebo.png"></img>
</a>
</p>
</div>
</div>
# Overview
The Synthetic Data Gym (SDGym) is a benchmarking framework for modeling and generating
synthetic data. Measure performance and memory usage across different synthetic data modeling
techniques – classical statistics, deep learning and more!
<img align="center" src="docs/images/SDGym_Results.png"></img>
The SDGym library integrates with the Synthetic Data Vault ecosystem. You can use any of its
synthesizers, datasets or metrics for benchmarking. You can also customize the process to include
your own work.
* **Datasets**: Select any of the publicly available datasets from the SDV project, or input your own data.
* **Synthesizers**: Choose from any of the SDV synthesizers and baselines. Or write your own custom
machine learning model.
* **Evaluation**: In addition to performance and memory usage, you can also measure synthetic data
quality and privacy through a variety of metrics.
# Install
Install SDGym using pip or conda. We recommend using a virtual environment to avoid conflicts with other software on your device.
```bash
pip install sdgym
```
```bash
conda install -c pytorch -c conda-forge sdgym
```
For more information about using SDGym, visit the [SDGym Documentation](https://docs.sdv.dev/sdgym).
# Usage
Let's benchmark synthetic data generation for single tables. First, let's define which modeling
techniques we want to use. Let's choose a few synthesizers from the SDV library and a few others
to use as baselines.
```python
# these synthesizers come from the SDV library
# each one uses different modeling techniques
sdv_synthesizers = ['GaussianCopulaSynthesizer', 'CTGANSynthesizer']
# these basic synthesizers are available in SDGym
# as baselines
baseline_synthesizers = ['UniformSynthesizer']
```
Now, we can benchmark the different techniques:
```python
import sdgym
sdgym.benchmark_single_table(
synthesizers=(sdv_synthesizers + baseline_synthesizers)
)
```
The result is a detailed performance, memory and quality evaluation across the synthesizers
on a variety of publicly available datasets.
## Supplying a custom synthesizer
Benchmark your own synthetic data generation techniques. Define your synthesizer by
specifying the training logic (using machine learning) and the sampling logic.
```python
def my_training_logic(data, metadata):
# create an object to represent your synthesizer
# train it using the data
return synthesizer
def my_sampling_logic(trained_synthesizer, num_rows):
# use the trained synthesizer to create
# num_rows of synthetic data
return synthetic_data
```
Learn more in the [Custom Synthesizers Guide](https://docs.sdv.dev/sdgym/customization/synthesizers/custom-synthesizers).
## Customizing your datasets
The SDGym library includes many publicly available datasets that you can include right away.
List these using the ``get_available_datasets`` feature.
```python
sdgym.get_available_datasets()
```
```
dataset_name size_MB num_tables
KRK_v1 0.072128 1
adult 3.907448 1
alarm 4.520128 1
asia 1.280128 1
...
```
You can also include any custom, private datasets that are stored on your computer on an
Amazon S3 bucket.
```
my_datasets_folder = 's3://my-datasets-bucket'
```
For more information, see the docs for [Customized Datasets](https://docs.sdv.dev/sdgym/customization/datasets).
# What's next?
Visit the [SDGym Documentation](https://docs.sdv.dev/sdgym) to learn more!
---
<div align="center">
<a href="https://datacebo.com"><img align="center" width=40% src="https://github.com/sdv-dev/SDV/blob/stable/docs/images/DataCebo.png"></img></a>
</div>
<br/>
<br/>
[The Synthetic Data Vault Project](https://sdv.dev) was first created at MIT's [Data to AI Lab](
https://dai.lids.mit.edu/) in 2016. After 4 years of research and traction with enterprise, we
created [DataCebo](https://datacebo.com) in 2020 with the goal of growing the project.
Today, DataCebo is the proud developer of SDV, the largest ecosystem for
synthetic data generation & evaluation. It is home to multiple libraries that support synthetic
data, including:
* 🔄 Data discovery & transformation. Reverse the transforms to reproduce realistic data.
* 🧠 Multiple machine learning models -- ranging from Copulas to Deep Learning -- to create tabular,
multi table and time series data.
* 📊 Measuring quality and privacy of synthetic data, and comparing different synthetic data
generation models.
[Get started using the SDV package](https://sdv.dev/SDV/getting_started/install.html) -- a fully
integrated solution and your one-stop shop for synthetic data. Or, use the standalone libraries
for specific needs.
Raw data
{
"_id": null,
"home_page": null,
"name": "sdgym",
"maintainer": null,
"docs_url": null,
"requires_python": "<3.13,>=3.8",
"maintainer_email": null,
"keywords": "machine learning, synthetic data generation, benchmark, generative models",
"author": null,
"author_email": "\"DataCebo, Inc.\" <info@sdv.dev>",
"download_url": "https://files.pythonhosted.org/packages/f0/bd/126ecc6bf1c473cde2cfe48452a1762c2e0032c2b881c192856f7d698d51/sdgym-0.9.0.tar.gz",
"platform": null,
"description": "<div align=\"center\">\n<br/>\n<p align=\"center\">\n <i>This repository is part of <a href=\"https://sdv.dev\">The Synthetic Data Vault Project</a>, a project from <a href=\"https://datacebo.com\">DataCebo</a>.</i>\n</p>\n\n[![Development Status](https://img.shields.io/badge/Development%20Status-2%20--%20Pre--Alpha-yellow)](https://pypi.org/search/?c=Development+Status+%3A%3A+2+-+Pre-Alpha)\n[![Travis](https://travis-ci.org/sdv-dev/SDGym.svg?branch=main)](https://travis-ci.org/sdv-dev/SDGym)\n[![PyPi Shield](https://img.shields.io/pypi/v/sdgym.svg)](https://pypi.python.org/pypi/sdgym)\n[![Downloads](https://pepy.tech/badge/sdgym)](https://pepy.tech/project/sdgym)\n[![Slack](https://img.shields.io/badge/Community-Slack-blue?style=plastic&logo=slack)](https://bit.ly/sdv-slack-invite)\n\n<div align=\"left\">\n<br/>\n<p align=\"center\">\n<a href=\"https://github.com/sdv-dev/SDGym\">\n<img align=\"center\" width=40% src=\"https://github.com/sdv-dev/SDV/blob/stable/docs/images/SDGym-DataCebo.png\"></img>\n</a>\n</p>\n</div>\n\n</div>\n\n# Overview\n\nThe Synthetic Data Gym (SDGym) is a benchmarking framework for modeling and generating\nsynthetic data. Measure performance and memory usage across different synthetic data modeling\ntechniques \u2013 classical statistics, deep learning and more!\n\n<img align=\"center\" src=\"docs/images/SDGym_Results.png\"></img>\n\nThe SDGym library integrates with the Synthetic Data Vault ecosystem. You can use any of its\nsynthesizers, datasets or metrics for benchmarking. You can also customize the process to include\nyour own work.\n\n* **Datasets**: Select any of the publicly available datasets from the SDV project, or input your own data.\n* **Synthesizers**: Choose from any of the SDV synthesizers and baselines. Or write your own custom\nmachine learning model.\n* **Evaluation**: In addition to performance and memory usage, you can also measure synthetic data\nquality and privacy through a variety of metrics.\n\n# Install\n\nInstall SDGym using pip or conda. We recommend using a virtual environment to avoid conflicts with other software on your device.\n\n```bash\npip install sdgym\n```\n\n```bash\nconda install -c pytorch -c conda-forge sdgym\n```\n\nFor more information about using SDGym, visit the [SDGym Documentation](https://docs.sdv.dev/sdgym).\n\n# Usage\n\nLet's benchmark synthetic data generation for single tables. First, let's define which modeling\ntechniques we want to use. Let's choose a few synthesizers from the SDV library and a few others\nto use as baselines.\n\n```python\n# these synthesizers come from the SDV library\n# each one uses different modeling techniques\nsdv_synthesizers = ['GaussianCopulaSynthesizer', 'CTGANSynthesizer']\n\n# these basic synthesizers are available in SDGym\n# as baselines\nbaseline_synthesizers = ['UniformSynthesizer']\n```\n\nNow, we can benchmark the different techniques:\n```python\nimport sdgym\n\nsdgym.benchmark_single_table(\n synthesizers=(sdv_synthesizers + baseline_synthesizers)\n)\n```\n\nThe result is a detailed performance, memory and quality evaluation across the synthesizers\non a variety of publicly available datasets.\n\n## Supplying a custom synthesizer\n\nBenchmark your own synthetic data generation techniques. Define your synthesizer by\nspecifying the training logic (using machine learning) and the sampling logic.\n\n```python\ndef my_training_logic(data, metadata):\n # create an object to represent your synthesizer\n # train it using the data\n return synthesizer\n\ndef my_sampling_logic(trained_synthesizer, num_rows):\n # use the trained synthesizer to create\n # num_rows of synthetic data\n return synthetic_data\n```\n\nLearn more in the [Custom Synthesizers Guide](https://docs.sdv.dev/sdgym/customization/synthesizers/custom-synthesizers).\n\n## Customizing your datasets\n\nThe SDGym library includes many publicly available datasets that you can include right away.\nList these using the ``get_available_datasets`` feature.\n\n```python\nsdgym.get_available_datasets()\n```\n\n```\ndataset_name size_MB num_tables\nKRK_v1 0.072128 1\nadult 3.907448 1\nalarm 4.520128 1\nasia 1.280128 1\n...\n```\n\nYou can also include any custom, private datasets that are stored on your computer on an\nAmazon S3 bucket.\n\n```\nmy_datasets_folder = 's3://my-datasets-bucket'\n```\n\nFor more information, see the docs for [Customized Datasets](https://docs.sdv.dev/sdgym/customization/datasets).\n\n# What's next?\n\nVisit the [SDGym Documentation](https://docs.sdv.dev/sdgym) to learn more!\n\n---\n\n\n<div align=\"center\">\n<a href=\"https://datacebo.com\"><img align=\"center\" width=40% src=\"https://github.com/sdv-dev/SDV/blob/stable/docs/images/DataCebo.png\"></img></a>\n</div>\n<br/>\n<br/>\n\n[The Synthetic Data Vault Project](https://sdv.dev) was first created at MIT's [Data to AI Lab](\nhttps://dai.lids.mit.edu/) in 2016. After 4 years of research and traction with enterprise, we\ncreated [DataCebo](https://datacebo.com) in 2020 with the goal of growing the project.\nToday, DataCebo is the proud developer of SDV, the largest ecosystem for\nsynthetic data generation & evaluation. It is home to multiple libraries that support synthetic\ndata, including:\n\n* \ud83d\udd04 Data discovery & transformation. Reverse the transforms to reproduce realistic data.\n* \ud83e\udde0 Multiple machine learning models -- ranging from Copulas to Deep Learning -- to create tabular,\n multi table and time series data.\n* \ud83d\udcca Measuring quality and privacy of synthetic data, and comparing different synthetic data\n generation models.\n\n[Get started using the SDV package](https://sdv.dev/SDV/getting_started/install.html) -- a fully\nintegrated solution and your one-stop shop for synthetic data. Or, use the standalone libraries\nfor specific needs.\n",
"bugtrack_url": null,
"license": "BSL-1.1",
"summary": "Benchmark tabular synthetic data generators using a variety of datasets",
"version": "0.9.0",
"project_urls": {
"Changes": "https://github.com/sdv-dev/SDGym/blob/main/HISTORY.md",
"Chat": "https://bit.ly/sdv-slack-invite",
"Issue Tracker": "https://github.com/sdv-dev/SDGym/issues",
"Source Code": "https://github.com/sdv-dev/SDGym/",
"Twitter": "https://twitter.com/sdv_dev"
},
"split_keywords": [
"machine learning",
" synthetic data generation",
" benchmark",
" generative models"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6abef5388dfeecfd4aacd0d592a91a46484c588339a194c7c84d387a16531866",
"md5": "72f825a88892949e41c54ba89daa0463",
"sha256": "129c66714e5cd653ea6315bdf5f71b478a0da9c743c458877e5da35704c9d3c5"
},
"downloads": -1,
"filename": "sdgym-0.9.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "72f825a88892949e41c54ba89daa0463",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.13,>=3.8",
"size": 38002,
"upload_time": "2024-08-07T16:46:17",
"upload_time_iso_8601": "2024-08-07T16:46:17.762933Z",
"url": "https://files.pythonhosted.org/packages/6a/be/f5388dfeecfd4aacd0d592a91a46484c588339a194c7c84d387a16531866/sdgym-0.9.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f0bd126ecc6bf1c473cde2cfe48452a1762c2e0032c2b881c192856f7d698d51",
"md5": "cf1f6fa252578f566a057d7b40762ec4",
"sha256": "b31d3e5aed57dc2aaa1cf282d3b1ba85b1a5d40c07250c90b5cfb4d3e7ddf9b9"
},
"downloads": -1,
"filename": "sdgym-0.9.0.tar.gz",
"has_sig": false,
"md5_digest": "cf1f6fa252578f566a057d7b40762ec4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<3.13,>=3.8",
"size": 36311,
"upload_time": "2024-08-07T16:46:19",
"upload_time_iso_8601": "2024-08-07T16:46:19.283142Z",
"url": "https://files.pythonhosted.org/packages/f0/bd/126ecc6bf1c473cde2cfe48452a1762c2e0032c2b881c192856f7d698d51/sdgym-0.9.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-07 16:46:19",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sdv-dev",
"github_project": "SDGym",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "sdgym"
}