Sampling
Last updated
Last updated
Copyright (c) 2023, DataCebo, Inc.
Use these sampling methods to create synthetic data from your multi table model.
Create realistic synthetic data data that follows the same format and mathematical properties as the real data.
Use this function to create synthetic data that mimics the real data
Parameters
scale
: A float >0.0 that describes how much to scale the data by
Returns A dictionary that maps each table name (string) to a pandas DataFrame object with synthetic data for that table. The synthetic data mimics the real data.
How large will the synthetic data be? The scale is based on the size of the data you used for training. The scale determines the size of every parent table (ie a table without any foreign keys).
Note that the synthesizer will algorithmically determine the size of the child tables, so their final sizes will approximately follow the scale, with some minor deviations.
Use this function to reset any randomization in sampling. After calling this, your synthesizer will generate the same data as before. For example in the code below, synthetic_data1
and synthetic_data2
are the same.
Parameters None
Returns None. Resets the synthesizer.
After sampling, export the data back into its original format.
See the Loading Data section for options.
(default) 1
Don't scale the data. The model will create synthetic data that is roughly the same size as the original data.
>1
Scale the data by the specified factor. For example, 2.5
will create synthetic data that is roughly 2.5x the size of the original data.
<1
Shrink the data by the specified pecentage. For example, 0.9
will create synthetic data that is roughtly 90% of the size of the original data.