## 2 Materials and Methods
### Workflow for Predicting Cardiovascular Diseases
#### 2.2.4 Quality Metrics for Synthetic Data  
Let be a dataset \(\mathcal{X}=\{\mathbf{x}_{i}\}_{i=1}^{N}\) represented by a \(N\times d\) matrix, consisting of \(i=\{1,\dots,N\}\) samples and \(j=\{1,\dots,d\}\) features, with the \(i\)-th sample represented by a vector \(\mathbf{x}_{i}\ =\ [x_{i}^{(1)},\)\(x_{i}^{(2)},\)\(\dots,\)\(x_{i}^{(d)}]\). \(\mathcal{X}\) was partitioned into training subset \(\mathcal{X}_{train}\) and test subset \(\mathcal{X}_{test}\), with 80% and 20% of the samples, respectively. From \(\mathcal{X}_{train}\), we selected the samples associated with the minority class \(\mathcal{X}_{R}\) (real data) and oversampling techniques were used for creating the synthetic dataset \(\mathcal{X}_{S}\). The number of synthetic samples generated directly depends on the Imbalance Ratio (IR), defined as \(IR=N_{min}/N_{maj}\), with \(N_{min}\) and \(N_{maj}\) indicating the number of samples of the minority and the majority class, respectively. The main goal of oversampling techniques is to generate synthetic samples from original data that capture underlying data structure, including the distribution of features and correlations between them. To examine whether the features of the synthetic dataset truly mimic the real features, we used several data quality metrics. To quantify the similarity between a pair of real and synthetic PMFs of \(\mathcal{X}_{R}\) and \(\mathcal{X}_{S}\), and for measuring univariate attribute fidelity, we used the symmetric Kullback-Leibler Divergence (KLD) [55] and the Hellinger Distance (HD) [56]. * KLD [55] measures the similarity between two PMFs. Given two PMFs, \(P_{v}\) and \(Q_{v}\), for a given feature \(v\), the KLD is defined as: \[KLD(P_{v}||Q_{v})\ =\ \frac{1}{2}KLD_{ns}(P_{v}||Q_{v})+\frac{1}{2}KLD_{ns}(Q_{v}||P_{v})\] \[KLD_{ns}(P_{v}||Q_{v})=\sum_{i}^{c_{f}}P_{v}(i)log\frac{P_{v}(i)}{Q_{v}(i)}\] \[KLD_{ns}(Q_{v}||P_{v})=\sum_{i}^{c_{f}}Q_{v}(i)log\frac{Q_{v}(i)}{P_{v}(i)}.\] Note that \(c_{f}\) is the number of categories for a given feature \(v\), and \(ns\) denotes the non-symmetric KLD. When both distributions are identical the symmetric KLD is zero, while larger values indicate a larger discrepancy between the two PMFs. * HD [56] quantifies the similarity between two PMFs, \(P_{v}\) and \(Q_{v}\), for a specific feature \(v\) as follows:\[HD(P_{v},Q_{v})=\frac{1}{\sqrt{2}}\sqrt{\sum_{i=1}^{c_{f}}\Bigl{(}\sqrt{P_{v}(i)}- \sqrt{Q_{v}(i)}\Bigr{)}^{2}}\] where \(c_{f}\) is the number of categories for a given feature \(v\). HD is ranged between 0 and 1, with 0 indicating that the two distributions are practically identical and 1 showing that they are the furthest apart. To complement the information provided by the aforementioned measures, we additionally proposed in this work two metrics, named Mean Absolute Error Probability (MAEP) and Repeated Sample Vector Rate (RSVR):  
* MAEP measures the absolute difference between two PMFs. Given PMFs \(P_{v}\) and \(Q_{v}\) for a given feature \(v\), MAEP is defined as follows: \[MAEP(P_{v},Q_{v})=\sum_{i=1}^{c_{f}}|P_{v}(i)-Q_{v}(i)|,\] where \(c_{f}\) is the number of categories for a given feature. KLD, HD and MAEP allow us to assess univariate attribute fidelity by determining the similarity between marginal distributions of \(\mathcal{X}_{R}\) and \(\mathcal{X}_{S}\). * RSVR indicates the rate of repeated sample vectors in the synthetic data \(\mathcal{X}_{S}\), denoting how well the oversampling methods create unique vectors. It is worth noting that this metric is directly related to the number of samples generated. As IR increases, the probability of appearance of repeated vectors may augment, and consequently the RSVR value. It is important to remark that KLD, HD and MAEP are defined here at the feature level, i.e., they are computed for a single feature. To calculate an overall measurement, the average value across all features is computed by aggregating the contribution of each feature.