## 3 Methods
### Validation Procedures for Synthetic Data  
Whether the generated synthetic data can replace real data must be assessed. We evaluated the effectiveness of synthetic data using an evaluation framework (Figure 4). The pipeline is classified into four blocks. The Experiment block is the data collection phase. The Deep Generative Models block is the synthesized data generation phase. Deep generative models learn the seed data in this phase. The Building Predictive Model block is the parameter optimization phase to build the trained model based on the seed data. In the validation block, evaluation metrics (accuracy, precision, recall, AUC, and F1 score)are calculated on every input piece of data (generated data in each epoch). The main code (deep generative model and XGBoost) is described in Supplementary Codes S1 and S2. The data were divided into training and testing sets in a ratio of 7:3. The training dataset was used to model and generate synthetic data. In the modeling phase, the training dataset was used in the XGBoost algorithm. The synthetic data were generated using the same training dataset and deep generative models. The trained XGBoost model validated both the synthetic and test data. Evaluation metrics (accuracy, area under the curve (AUC), precision, recall, and F1 score) were used to assess the predicted results produced through these two datasets. Here, as for evaluation metrics, the relationships between predicted and actual values are represented in Table 1. The table organizing the relationship is referred to as a confusion matrix. True positive (TP) are data classified as positive by the predictive model that actually are positive. False positive (FP) are data classified as positive by the predictive model that actually are negative. False negative (FN) are data classified as negative by the predictive model that actually are positive. True Negative (TN) are data classified as negative by the predictive model that actually are negative. Evaluation metrics are as follows:  
\[Accuracy=\frac{TP+TN}{TP+TN+FP+FN\ (=All\ samples)} \tag{7}\]  
\[Precision=\frac{TP}{TP+FP} \tag{8}\]  
\[Recall=\frac{TP}{TP+FN} \tag{9}\] \begin{table}
\begin{tabular}{c c c c} \hline \hline  & \multicolumn{3}{c}{**Actual Values**} \\ \cline{2-4}  & \multicolumn{1}{c}{**Positive (I)**} & \multicolumn{1}{c}{**Negative (0)**} \\ \cline{2-4} \multirow{-2}{*}{Predicted Values} & Positive (I) & TP & FP \\ \cline{2-4}  & Negative (0) & FN & TN \\ \hline \hline \end{tabular} The row represents predicted values, and the column represents actual values.  
\end{table} 
Table 1: Confusion matrix. Figure 4: Analysis pipeline for evaluation. Abbreviations: EEG, electroencephalography; MSE, mean squared error; CC, correlation coefficient; SMV, structure matching value; SD, seed data; RD, real data; AUC, the area under the curve. \[F1\ score=2\times\frac{Precision\times Recall}{Precision+Recall} \tag{10}\]  
Accuracy is the overall collectiveness of predicted results (Equation (7)). Precision is the ratio of true positive values to the total number of positive values (Equation (8)). Recall is the ratio of true positive values to the total actual positive values (Equation (9)). The F1 score is the harmonic mean of precision and recall (Equation (10)). The F1 score measures the balance of precision and recall. If one or the other values are high or low, the F1 score is low. However, when both indices are high, the F1 score becomes high. As for AUC, we explain the index, referring to Figure 5. To calculate the AUC, the receiver operating characteristic (ROC) curve needs to be created. The ROC curve is composed of the false positive rate (FPR) and the true positive rate (TPR). The FPR and TPR are calculated as follows:  
\[FPR=\frac{FP}{FP+TN} \tag{11}\]  
\[TPR=\frac{TP}{TP+FN} \tag{12}\]  
The FPR is the ratio of false positive values to the total actual negative values (Equation (11)). The TPR is the ratio of true positive values to the total actual positive values (Equation (12)). The TPR is ultimately the same as the recall.