# A Two-Stage Semi-Supervised High Maneuvering Target Trajectory Data Classification Algorithm
## 4 Experiment and Analysis
### Model Training Process Validation  
One of the problems faced in Siamese network training is the imbalance of training samples. The training samples were composed of pairs of input data, but the number of  
Figure 8: Simulation trajectory dataset. (a) Original trajectory image and (b) normalized trajectory image.  
training samples that were composed of the same pieces was less than that consisting of different types of samples. Unbalanced training data might lead to a decrease in model training performance. Therefore, the training sample pairs composed of the same category were artificially added to ensure the practical effect. We ensured that positive and negative samples had relatively balanced training probabilities. The clustering results of the two methods, comparing taking and not taking treatment measures, are shown in Table 1. It can be seen that this treatment could effectively improve the processing effect of the Siamese network model.  
Then, the model training process was tested to prove that the model could normally train and work. The accuracy and loss curves during the two-stage model training process were plotted as shown in Figure 9.  
Figure 9a is the variation of the loss with the number of iterations during the training of the first-stage unsupervised autoencoder. It can be seen that as the number of iterations increased, the loss value rapidly dropped and converged, and the final loss value stabilized at a low level. It showed that the model had a good degree of data reduction in the process of encoding and decoding and could effectively extract data features, and the extracted features would not lose too much information.  
The change of loss in the second stage of training is shown in Figure 9b. The two curves correspond to the change of loss of the autoencoder and Siamese network parts, respectively. It can be seen that the Siamese network gradually decreased and stabilized with the training loss. The weight parameters of the autoencoder model were migrated, so they were in a low state at the beginning and could remain stable during training.  
The similarity matrix obtained by the two models before and after fine-tuning in the second stage was used for dimensionality reduction using the PCA method. Plot PCA plotted to test the effect of the second-stage algorithm. The result is shown in Figure 10:  
It can be intuitively seen from Figure 9 that the similarity matrix obtained by the clustering model after the first stage of training could distinguish samples of different categories. However, after the second stage of fine-tuning, the distance distribution between various samples was more reasonable, and the distinction between samples was more effective.  
The above chart results show that the two-stage training algorithm designed in this paper can be trained normally and achieve the expected effect at each stage.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Clustering Algorithm** & **Purity** & **KL Divergence** \\ \hline Siamese network & 0.89 & 0.068 \\ Siamese network (balance adjustment) & 0.937 & 0.046 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Experimental results of sample balance processing.  
Figure 9: Model training process. (**a**) Stage 1 training loss curve and (**b**) Stage 2 training loss curve.