# Fake It Till You Make It: Guidelines for Effective Synthetic Data Generation
## 2 Methods: Synthetic Data Generation and Utility
### Synthetic Data Generators  
The first generator, referred to as DataSynthesizer or DS was developed in Python in 2017. It captures the underlying correlation structure between the different attributes by constructing a Bayesian network [24]. The method uses a greedy approach to construct a Bayesian network that models the correlated attributes. Samples are then drawn from this model to produce the synthetic datasets. DS supports numerical, datetime, categorical and non-categorical string data types. Non-categorical strings status is given to categorical attributes with big domains (such as names). Non-categorical strings allow DS to generate random strings (within the same length range as the actual feature) during the data generation stage. This feature enables the DataSynthesizer to create datasets that feel like the real sample by including synthetic string data such as artificial names and IDs. DS also supports missing values by taking into consideration the rate of missing values within the dataset. For more details readers are referred to [24; 36]. The second synthesizer, the Synthetic Data Vault (SDV), was developed in 2016 by [PERSON] et al. in [23]. SDV estimates the joint distribution of the population using a latent Gaussian copula [37]. Given the private dataset \(D\) drawn from population \(P\), SDV models the population's cumulative distribution function \(F\) from the sample by specifying separately the marginal distributions of the different attributes, \(F_{1},\ldots,F_{d}\), as well as the dependency structure among these attributes through the Gaussian Copula. The marginal distributions are inferred from the sample \(D\), and the Gaussian copula is expressed as a function of the covariance matrix. For more information, the reader is referred to [23]. SDV is implemented in Python, it assumes that the all attributes are numerical. When the assumption does not apply, SDV applies basic pre-processing on the dataset to transform all categorical attributes into numerical values between [0,1] (the value reflects their frequency in the dataset). Datetime values are transformed into numerical values by counting the number of seconds from a given timestamp. Missing values are considered important information and are modeled as null values. The third and fourth generators come from Synthpop (SP) and were developed in 2015 using the \(R\) language [29]. SP generates the synthetic dataset sequentially one attribute at a time by estimating conditional distributions. If \(X_{i}\) denotes the random variable for column \(i\), then SP proceeds sequentially as follows: For random variable \(X_{1}\), the marginal distribution, \(f(X_{1})\), is estimated from its corresponding column in \(D\). The distribution is then used to generate the entries for the first synthetic data column \(\left(x_{1}^{1},\ldots,x_{1}^{n_{D}}\right)^{T}\). To generate the second column, the conditional distribution \(f(X_{2}|X_{1})\) is estimated, then used along with the synthesized values of the first column, \(\left(x_{1}^{1},\ldots,x_{1}^{n_{D}}\right)^{T}\), to generate the synthetic values for the second column (for example, the entry of the \(i\)th row is estimated using \(f\big{(}X_{2}|X_{1}=x_{1}^{i}\big{)}\)). The generation continues, with each column of the synthetic data generated from the conditional distribution, and the synthesized values of all the previous columns. SP presents two methods for the generation of the conditional distributions, \(f(X_{j}|X_{1},\ldots,X_{j-1})\), the default method, referred to as SP-_np_, uses the nonparametric CART algorithm (Classification and Regression Trees). The second is a parametric method, referred to as SP-_p_, that uses logistic regression along with linear regression to generate the conditional distributions. Both parametric and nonparametric algorithms will be included in the comparison. Note that for SP, the order in which the attribute are synthesised affects the utility of the generated synthetic data [25].