* HSASynthesizer
Last updated
Last updated
The HSA Synthesizer uses a segment-based algorithm to learn from your real data and generate synthetic data. This synthesizer offers fast performance for unlimited tables.
When creating your synthesizer, you are required to pass in a object as the first argument.
All other parameters are optional. You can include them to customize the synthesizer.
locales
: A list of locale strings. Any PII columns will correspond to the locales that you provide.
(default) ['en_US']
Generate PII values in English corresponding to US-based concepts (eg. addresses, phone numbers, etc.)
<list>
Create data from the list of locales. Each locale string consists of a 2-character code for the language and 2-character code for the country, separated by an underscore.
default_num_clusters
: The number of clusters to segment each table into
(default) 3
Split each table into 3 clusters for the purposes of capturing correlations between parent and child tables
<integer>
Split each table into the desired number of clusters. A smaller number of clusters makes the fit and sampling more efficient, and generally noises the data. A large number of clusters allows the model to learn more specific correlations across parent/child tables.
The HSA Synthesizer is a multi-table algorithm that models each individual table as well as the connections between them. You can get and set the parameters for each individual table.
Parameters
(required) table_name
: A string describing the name of the table
table_synthesizer
: The single table synthesizer to use for modeling the table
Output (None)
Use this function to access the all parameters your synthesizer uses -- those you have provided as well as the default ones.
Parameters (None)
Output A dictionary with the table names and parameters for each table.
Use this function to access the all parameters a table synthesizer uses -- those you have provided as well as the default ones.
Parameters
(required) table_name
: A string describing the name of the table
Output A dictionary with the parameter names and the values
Use this function to access the metadata object that you have included for the synthesizer
Parameters None
To learn a machine learning model based on your real data, use the fit
method.
Parameters
Output (None)
After fitting this synthesizer, you can access the marginal distributions that were learned to estimate the shape of each column.
Parameters
(required) table_name
: A string with the name of the table
Output A dictionary that maps the name of each learned column to the distribution that estimates its shape
After fitting, you can access the loss values computed during each epoch for both the numerator and denominator.
Parameters
(required) table_name
: A string with the name of the table
Output A pandas.DataFrame object containing epoch number, generator loss value and discriminator loss value.
Save your trained synthesizer for future use.
Use this function to save your trained synthesizer as a Python pickle file.
Parameters
(required) filepath
: A string describing the filepath where you want to save your synthesizer. Make sure this ends in .pkl
Output (None) The file will be saved at the desired location
Use this function to load a trained synthesizer from a Python pickle file
Parameters
(required) filepath
: A string describing the filepath of your saved synthesizer
Output Your synthesizer, as a HMASynthesizer object
For example [
,
]
.
For all options, see the .
(default) 'GaussianCopulaSynthesizer'
: Use the to model the single table
Other available options: 'GaussianCopulaSynthesizer'
, 'CTGANSynthesizer'
, 'TVAESynthesizer'
, 'CopulaGANSynthesizer'
. For more information, see .
table_parameters
: A dictionary mapping the name of the parameter (string) to the value of the parameter (various). These parameters are different for each synthesizer. For more information, see .
Output A object
(required) data
: A dictionary mapping each table name to a containing the real data that the machine learning model will learn from
Technical Details: HSA, which stands for Hierarchical Segmentation Algorithm, uses a segment-based approach to model the parent-child relationships of a multi-table datasets. At a base level, it can model individual tables using any .
For more information about the distributions and their parameters, visit the.
After training your synthesizer, you can now sample synthetic data. See the section for more details.
For more details, see .
Although the HSA algorithm is designed for only numerical data, this synthesizer converts other data types using Reversible Data Transforms (RDTs). To access and modify the transformations, see .