Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Local Install Description #37

Merged
merged 1 commit into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ High-quality synthetic data can also be used in various fields such as data open

## 🔛 Quick Start

### Local Install (Recommended)

At present, the code of this project is updated very quickly. We recommend that you use SDG by installing it through the source code.

```bash
git clone git@github.com:hitsz-ids/synthetic-data-generator.git
pip install -r requirement.txt
python setup.py install
```

### Install from PyPi

```bash
Expand All @@ -47,8 +57,6 @@ pip install sdgx
```python
# Import modules
from sdgx.models.single_table.ctgan import CTGAN
from sdgx.transform.sampler import DataSamplerCTGAN
from sdgx.transform.transformer import DataTransformerCTGAN
from sdgx.utils.io.csv_utils import *

# Read data from demo
Expand Down Expand Up @@ -77,9 +85,7 @@ Real data are as follows:

```python
# Define model
model = CTGAN(epochs=10,\
transformer= DataTransformerCTGAN,\
sampler=DataSamplerCTGAN)
model = CTGAN(epochs=10)
# Model training
model.fit(demo_data, discrete_cols)

Expand Down
16 changes: 11 additions & 5 deletions README_ZH_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@

## 🔛 快速开始

### 从本地安装(目前推荐)

目前本项目的代码更新速度快,我们推荐您通过源码进行安装的方式使用SDG。

```bash
git clone git@github.com:hitsz-ids/synthetic-data-generator.git
pip install -r requirement.txt
python setup.py install
```

### 从Pypi安装

```bash
Expand All @@ -44,8 +54,6 @@ pip install sdgx
```python
# 导入相关模块
from sdgx.models.single_table.ctgan import CTGAN
from sdgx.transform.sampler import DataSamplerCTGAN
from sdgx.transform.transformer import DataTransformerCTGAN
from sdgx.utils.io.csv_utils import *

# 读取数据
Expand Down Expand Up @@ -74,9 +82,7 @@ demo_data, discrete_cols = get_demo_single_table()

```python
#定义模型
model = CTGAN(epochs=10,\
transformer= DataTransformerCTGAN,\
sampler=DataSamplerCTGAN)
model = CTGAN(epochs=10)
# 训练模型
model.fit(demo_data, discrete_cols)

Expand Down
File renamed without changes.
28 changes: 28 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
from setuptools import setup

setup(
name='sdgx',
version='alpha-0.1',
packages=['sdgx'],
url='https://github.com/hitsz-ids/synthetic-data-generator',
entry_points= "sdgx/",
license='Apache2',
author='hitsz-ids',
author_email='sjaqyjy@hit.edu.cn',
description='A framework focused on quickly generating structured tabular synthetic data',
install_requires=[
"setproctitle",
"PyMySQL",
"pandas",
"numpy",
"scikit-learn",
"torch",
"torchvision",
"rdt",
"joblib",
"dython",
"seaborn",
"table-evaluator",
"copulas",
]
)
Loading