-
Notifications
You must be signed in to change notification settings - Fork 541
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Intro NDArryLoader * Update docstring and REAME
- Loading branch information
Showing
27 changed files
with
604 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -254,3 +254,4 @@ cython_debug/ | |
*.log | ||
|
||
.sdgx_cache | ||
.ndarry_cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
CTGANSynthesizerModel | ||
============================ | ||
|
||
.. automodule:: sdgx.models.ml.single_table.ctgan | ||
:members: | ||
:undoc-members: | ||
:private-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Built-in ML Models | ||
============================ | ||
|
||
Model for single table | ||
---------------------------- | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
CTGAN <ctgan> | ||
|
||
|
||
|
||
Model for multi table | ||
---------------------------- | ||
|
||
.. toctree:: | ||
:maxdepth: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Built-in Statistics Models | ||
============================ | ||
|
||
Model for single table | ||
---------------------------- | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
|
||
|
||
Model for multi table | ||
---------------------------- | ||
|
||
.. toctree:: | ||
:maxdepth: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Utils | ||
============================ | ||
|
||
.. automodule:: sdgx.utils | ||
:members: | ||
:undoc-members: | ||
:inherited-members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,31 @@ | ||
Use Synthetic Data Generator as a library | ||
================================================== | ||
|
||
.. code-block:: python | ||
from sdgx.data_connectors.csv_connector import CsvConnector | ||
from sdgx.models.ml.single_table.ctgan import CTGANSynthesizerModel | ||
from sdgx.synthesizer import Synthesizer | ||
from sdgx.utils import download_demo_data | ||
dataset_csv = download_demo_data() | ||
data_connector = CsvConnector(path=dataset_csv) | ||
synthesizer = Synthesizer( | ||
model=CTGANSynthesizerModel(epochs=1), # For quick demo | ||
data_connector=data_connector, | ||
) | ||
synthesizer.fit() | ||
sampled_data = synthesizer.sample(1000) | ||
synthesizer.cleanup() # Clean all cache | ||
from sdgx.metrics.column.jsd import JSD | ||
JSD = JSD() | ||
selected_columns = ["workclass"] | ||
isDiscrete = True | ||
metrics = JSD.calculate(data_connector.read(), sampled_data, selected_columns, isDiscrete) | ||
print("JSD metric of column %s: %g" % (selected_columns[0], metrics)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,32 @@ | ||
Synthetic single-table data | ||
========================================== | ||
|
||
|
||
.. code-block:: python | ||
from sdgx.data_connectors.csv_connector import CsvConnector | ||
from sdgx.models.ml.single_table.ctgan import CTGANSynthesizerModel | ||
from sdgx.synthesizer import Synthesizer | ||
from sdgx.utils import download_demo_data | ||
dataset_csv = download_demo_data() | ||
data_connector = CsvConnector(path=dataset_csv) | ||
synthesizer = Synthesizer( | ||
model=CTGANSynthesizerModel(epochs=1), # For quick demo | ||
data_connector=data_connector, | ||
) | ||
synthesizer.fit() | ||
sampled_data = synthesizer.sample(1000) | ||
synthesizer.cleanup() # Clean all cache | ||
from sdgx.metrics.column.jsd import JSD | ||
JSD = JSD() | ||
selected_columns = ["workclass"] | ||
isDiscrete = True | ||
metrics = JSD.calculate(data_connector.read(), sampled_data, selected_columns, isDiscrete) | ||
print("JSD metric of column %s: %g" % (selected_columns[0], metrics)) |
Oops, something went wrong.