# A Quality Control Method for High Frequency Radar Data Based on Machine Learning Neural Networks
## 3 Results
### Single Anomaly  
As illustrated by Figure 5b, single anomalies are the most prevalent type of anomaly. In the actual operation of radar systems, due to the combined effects of various random error factors, such as short-term signal interference, single anomalies tend to occur more frequently. On the other hand, long-duration anomalies, because of their more evident  
Figure 5: (**a**) Schematic representation of anomaly types and (**b**) bar chart of anomaly type counts. abnormal features, are typically filtered out before the synthesizing of radar ocean current vector data. Consequently, single anomalies are the primary focus of this study. Figure 6a illustrates the input sequence structure of the prediction model. When the model attempts to predict the time point \(X_{t}\), it considers data spanning six hours around that point. This design ensures that the model can fully capture the temporal context information adjacent to \(X_{t}\), thereby enhancing the prediction accuracy. More detailed explanations regarding the choice of the input sequence length will be provided in the sensitivity analysis experiment at the end of the Section 3. As shown in Figure 6b,c, the values in the residual time series at the timestamps corresponding to anomalies are significantly high, confirming our model's anomaly detection capabilities. Nevertheless, it is worth mentioning that the normal data around these single-point anomalies also exhibit significant discrepancies in the difference series. One reason for this is that, when predicting these normal points, the model used data from the single-point anomalies in constructing its input sequence. This led to pronounced  
Figure 6: (**a**) Schematic representation of model input sequence, (**b**,**c**) comparison between model predicted output (orange curve) and radar data (blue curve) for single-point anomalies, (**d**) model PR curve plot, (**e**) trend graph of recall and precision as threshold varies. discrepancies even in what should have been normal predictions. With a lower threshold, this can mistakenly classify these points as anomalies, compromising the overall accuracy. Figure 6d depicts the relationship between the precision and recall. The thresholds start from 0 and increase in increments of 0.01 m/s up to 0.5 m/s. These thresholds are applied to the residual time series generated by the model and the test set to obtain the variation curves of precision and recall, further aiming to determine the optimal threshold. As previously discussed in Figure 6b,c, Figure 6e provides a broader perspective from the entire dataset, showcasing the misclassifications at lower thresholds: despite the high recall in this range, the precision is low. When the threshold exceeds 0.2 m/s, there is a notable decline in recall with only a slight increase in precision. Constrained by these factors, the F-score reaches its maximum value of 0.627. These prediction biases were expected given the nature of the training data. During previous model training, only normal data were used as input. However, when applying the model in real-world scenarios, the inclusion of a significant amount of anomalous data in the dataset becomes part of the prediction model's input sequence, affecting its capability to accurately predict regular data. Addressing the aforementioned issue and enhancing the anomaly detection performance necessitates improvements to our model. It should be capable of discerning the most relevant input information while minimizing the influence of anomalous data on its outputs. To enhance the model's ability to recognize anomalous data and its robustness, we decided to draw inspiration from data augmentation techniques in deep learning. We adopted an innovative strategy: injecting simulated anomalous information into the normal data. This strategy aims to optimize the model's generalization capabilities. Experience tells us that solely relying on the original training data may not be sufficient to achieve optimal results in real-world anomaly detection tasks.