❖ BootstrapSynthesizer
Last updated
Last updated
The BootstrapSynthesizer is a synthesizer specifically designed to work when you only have a few rows of data — or if your data is "short and wide", containing more columns than rows. This synthesizer internally bootstraps your real data, and then uses the bootstrapped data to build a model. The modeling part is compatible with any other .
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.
num_rows_bootstrap
: Specify the number of additional rows to bootstrap before modeling the data.
(default) 1000
Bootstrap the original data by creating 1000 rows of additional data
<integer>
Create the desired number of bootstrapped rows before building the model
bootstrap_noise_amount
: The amount of noise to add when bootstrapping the data. Some noise is necessary to provide a greater diversity of data points for modeling.
(default) 1.5
When bootstrapping the data, add noise that is equal to 1.5x the standard deviation of each row.
<float>
Add the desired amount of noise to the bootstrapped data. This is the multiplier to the standard deviation, so 1.5 means 1.5x the standard deviation, 2 means 2x the standard deviation, etc.
data_synthesizer
: The single-table synthesizer to use when modeling the bootstrapped data.
(default) 'GaussianCopulaSynthesizer'
<synthesizer_name>
data_synthesizer_params
: A dictionary of parameters to use for the synthesizer
(default) None
Use the default parameters for the synthesizer
<dictionary>
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
The synthetic data may contain numerical values that are less than or greater than the real data.
synthesize_missing_values
: Control whether the synthetic data should include missing values.
(default) True
The synthetic data will contain missing values in roughly the same proportion as the original data
False
The synthetic data may should not contain any missing values for numerical and datetime columns.
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)
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 an XGCSynthesizer object
Use the to build a model of the bootstrapped data
Supply a synthesizer name from the list of . For example 'XGCSynthesizer'
or 'CTGANSynthesizer'
.
Update the default parameters for the synthesizer you've chosen by providing a dictionary of key/values pairs for each parameter. Refer to the docs for your synthesizer for possible parameters. For example, for you can supply: {'default_distribution': 'norm'}
.
Output A object
(required) data
: A object containing the real data that the machine learning model will learn from
Technical Details: This synthesizer internally bootstraps your real data by adding noise, and then uses the bootstrapped data to build a model. The modeling part is compatible with any other .
After training your synthesizer, you can now sample synthetic data. See the section for more details.
For more details, see .