Skip to content

Commit

Permalink
Merge pull request #37 from hitsz-ids/feature-local-setup
Browse files Browse the repository at this point in the history
Add Local Install Description
  • Loading branch information
MooooCat committed Oct 30, 2023
2 parents da65efe + aacad35 commit ad066b3
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 10 deletions.
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",
]
)

0 comments on commit ad066b3

Please sign in to comment.