# Characterization and Prediction of Air Transport Delays in China
## 5 Effect of Weather on Delay Dynamics
### Delay Prediction  
To complete this analysis, we finally assess the presence of a relationship between weather conditions and delays by means of data mining models. Specifically, we use a model to forecast the average level of delay for a given day and at a given airport using the observed weather condition, and by training it with all available historical data. Note that, while similar, this is not equivalent to the statistical analysis performed in Section 5.1. As shown for instance in [37], a data mining approach can help in unveiling relationships between sets of features that are not easily spotted by a classical statistical approach. Similarly, the analysis here proposed is not aimed at creating prediction models, on the line of what was presented in e.g., [13; 28; 31]; on the contrary, prediction scores are used as a way of quantifying the importance of the detected relationships. The results, using Random Forests (RF) and Leave-One-Out Cross-Validation (LOOCV) techniques, are reported in Figure 6 in the form of Receiver Operating Characteristic (ROC) curves. The closer these curves are to the upper left corner, the more precise is the forecasted value--the gray dashed diagonal lines representing a random classification. Four classifications are reported for each airport: one in which all the features (both traffic level and weather variables) have been included (black lines); a second one, in which information about thunderstorms was discarded (green lines); a third one only considering weather conditions (blue lines); and a fourth one, in which temperature information was discarded. It can be appreciated that a good prediction is achieved in most airports, with a maximum in the Area Under the Curve (AUC) of 0.826 for ZSPD (Shanghai Pudong International Airport). The use of the four different sets of features further allows to understand which aspect is more important from a prediction point of view--as its exclusion would substantially lower the score obtained. It can be seen that in all cases the traffic volume and the average daily temperature are the most important features, while the exclusion of information about thunderstorms has a minimal impact. We finally present in Figure 7 the results of the same classification problem, for all three algorithms described in Section 3.4, and using a simple classification score (fraction of correctly classified days) as the success metric. First of all, it can be observed that results are mostly independent of the considered metric, either AUC or a simple score; the two easiest airports to forecast are ZSPD and ZGGG in both cases. Secondly, results strongly vary when different algorithms are used, with RF clearly outperforming the two other models. SGD tries to construct a linear model, and its low score therefore suggests the presence of non-linear relationships in the data. On the other hand, the low number of instances (913, one per considered day) may not be enough for MLP to reach a stable solution. Note that changing the parameters of the model, as the number of hidden layers and the number of neurons, does not improve the score. Thirdly, the horizontal black dashes report the average classification score obtained when labels (i.e., having large or small delays) are randomly shuffled; in the case of RF the classification score on the real data is much higher than the one for the randomized data set, confirming that the results presented in Figure 6 are statistically significant. Finally, the black vertical bars alongside the RF ones indicate the classification score obtained when classifying only days without thunderstorms. It can be appreciated that the score is lower, but not substantially; it is therefore possible to successfully predict the level of delays also for days without strong adverse meteorological phenomena. Figure 6: ROC curve of classification models predicting the level of binarized delays at each airport. All results correspond to Random Forest (RF) algorithms and a Leave-One-Out cross-validation strategy.