-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
86 additions
and
199 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,24 @@ | ||
from sdgym.benchmark import benchmark_single_table | ||
from sdgym.synthesizers.generate import create_single_table_synthesizer | ||
from sdv.metadata.single_table import SingleTableMetadata | ||
from sdv.single_table.copulas import GaussianCopulaSynthesizer | ||
|
||
def get_trained_synth(data, metadata): | ||
metadata = SingleTableMetadata.load_from_dict(metadata) | ||
synthesizer = GaussianCopulaSynthesizer(metadata) | ||
synthesizer.fit(data) | ||
return synthesizer | ||
|
||
def sample_synth(trained_synthesizer, num_samples): | ||
return trained_synthesizer.sample(num_samples) | ||
|
||
custom_synthesizer = create_single_table_synthesizer('SimpleGaussianCopula', get_trained_synth, sample_synth) | ||
|
||
output = benchmark_single_table( | ||
synthesizers=[], | ||
sdv_datasets=['fake_hotel_guests'], | ||
timeout=120, | ||
sdmetrics=[], | ||
custom_synthesizers=[custom_synthesizer], | ||
) | ||
print(output) |
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