## 3 Methodology
### Evaluation of Generation Quality  
Three aspects must be considered in order to assess the quality of generated data: diversity, similarity, and authenticity of the generated samples. The degree to which the distribution of created samples covers the distribution of actual data is referred to as diversity. A common and effective method for evaluating this measure is visualization and dimensionality reduction. In this investigation, principal component analysis (PCA) and t-distributed stochastic neighbor embedding (t-SNE) were employed to scrutinize both the pristine dataset and the synthesized counterpart, whereby temporal information was flattened to project three-dimensional data onto a two-dimensional coordinate plane.  
Figure 8: Network training process ([PERSON] et al. [39]).  
This approach facilitated the visual appraisal of the similarity between the distribution of generated samples and that of the original samples.  
To validate the similarity between the generated and original trajectories, this study derived the vehicle's velocity by differentiating the generated continuous coordinate data. By comparing the velocity distributions between the generated and real scenarios, high similarity in the generated samples was inferred if the distributions aligned. The distribution of distances between interacting vehicle pairs was used to further corroborate this result. In addition, the samples generated by a good generative model should be as difficult as possible to be distinguished from the original data by the classification model. If a simple classification model can easily differentiate between generated and real data, this means that the generative model does not perform well. Conversely, if even a sophisticated classification model has difficulty in correctly distinguishing between real and generated data, it indicates a high similarity of the generated data. Therefore, to evaluate the quality of the generated data, a time series classification model using an optimized dual-layer LSTM was trained to differentiate between sequences of original data and generated data. Every created sequence was initially classified as non-real, while every original sequence was labeled as real. Subsequently, to distinguish between the two groups, a ready-made recurrent neural network (RNN) classifier was trained. The similarity was quantitatively assessed through classification error, with the training scores noted as discriminate scores. Using the discriminate score for evaluation, the closer the score is to 0, the more difficult it is for the classification model to distinguish between real and generated data.  
Authenticity is used when it is necessary to evaluate whether the generated data can serve practical purposes. In the case of time series data, this means whether the generated data can inherit the predictive characteristics of the original data or, in other words, whether the model can excellently capture the features of time series. Well-generated data should possess predictive capability, meaning they can be used for the prediction of subsequent trajectories. Therefore, a time series prediction model was trained utilizing a RNN with the generated dataset to predict the next time vector for each input sequence. After training, the model was tested on the original dataset. If the prediction results had a good fit with the real data, it indicates that the generated data retained high-quality time series features similar to those of the real data. The mean absolute error (MAE) served as the metric for quantifying the degree of fit and measuring predictive performance. The smaller the error value, the better the prediction effect, indicating that the generated data had good performance in capturing the characteristics of the temporal distribution, and the higher the authenticity. The RNN architecture used for classification and prediction models is illustrated in Figure 9.  
Figure 9: The RNN-based model structure.