GaussianCopulaSynthesizer
Last updated
Last updated
The Gaussian Copula Synthesizer uses classic, statistical methods to train a model and generate synthetic data.
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.
enforce_min_max_values
: Control whether the synthetic data should adhere to the same min/max boundaries set by the real data
(default) True
The synthetic data will contain numerical values that are within the ranges of the real data.
False
enforce_rounding
: Control whether the synthetic data should have the same number of decimal digits as the real data
(default) True
The synthetic data will be rounded to the same number of decimal digits that were observed in the real data
False
The synthetic data may contain more decimal digits than were observed in the real data
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.
numerical_distributions
: Set the distribution shape of any numerical columns that appear in your table. Input this as a dictionary, where the key is the name of the numerical column and the values is a numerical distribution.
Possible options are:
(default) None
: Use the default distribution for the column name.
default_distribution
: Set the distribution shape to use by default for all columns. Input this as a single string.
(default) 'beta'
: Model the column as a beta distribution
Setting the distribution to 'gaussian_kde'
increases the time it takes to train your synthesizer.
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 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 None
Output A dictionary that maps the name of each learned column to the distribution that estimates its shape
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 GaussianCopulaSynthesizer object
The synthetic data may contain numerical values that are less than or greater than the real data. Note that you can still set the limits on individual columns using .
For example [
,
]
.
For all options, see the .
One of 'norm'
'beta'
, 'truncnorm'
, 'uniform'
, 'gamma'
or 'gaussian_kde'
: Use the distribution from the library
One of 'norm'
'beta'
, 'truncnorm'
, 'uniform'
, 'gamma'
or 'gaussian_kde'
: Use the distribution from the library
Output A object
(required) data
: A object containing the real data that the machine learning model will learn from
The has more information about the Gaussian normalization process and the Copula estimations.
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 Gaussian Copula 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 .