# Predictive Modeling of Flight Delays at an Airport Using Machine Learning Methods
## 6 Results
### Analyses of Feature Importance  
In this section, we delve into the analysis of feature importance. The forecasting model employed in this study incorporated 595 features, resulting in increased decision complexity. The selection of features is of critical importance for determining the extent to which a simplified model can produce results that are comparable in quality to those of a more comprehensive model. Various feature selection approaches exist in the literature, but in this study, we focused on SHAP (SHapley Additive exPlanations) values. SHAP values, originating from cooperative game theory, are widely used to enhance the transparency and interpretability of machine learning models. They aim to measure each input feature's contribution to individual predictions or the final model outcome [68]. A defining feature of SHAP values is that they always sum up to the difference between the model's outcome and the actual outcome when all features are present and to the actual outcome when none of the features is considered. In the context of machine learning, this implies that the sum of SHAP values for all input features is equal to the difference between the baseline (expected) model output and the current model output for the prediction under examination. Figure 1 indicates the relative importance of each feature in influencing the model's output. According to the SHAP results shown in Figure 1, the variables in order of importance were scheduled time, number of passengers (PAX), atmospheric pressure at the arrival airport (P0), travel distance, arrival airport's temperature, arrival airport's relative humidity, arrival airport's dew point temperature, arrival airport's mean wind speed, carried cargo by the flight, and flights departed from Sabiha Goken Airport. Understanding these features' impacts is crucial for interpreting and improving the model, as it allows one to focus on the most influential factors when addressing flight delay predictions. Figure 2 indicates that flights with late scheduled times had a positive impact and were more likely to be delayed. It can be observed that flights with a smaller number of passengers were more likely to be delayed at the destination airport. Longer distances resulted in a positive impact on delay, indicating that longer flights may be more likely to result in arrival delays. The significance of air pressure (P0), relative humidity (U), mean wind speed (FF), and dew point temperature (Td) indicated that the weather conditions exerted a considerable influence on flight delays. A reduction in wind speed or an increase in air pressure appeared to have a negative impact on flight delays, resulting in a greater number of on-time arrivals. Conversely, high wind speeds or low air pressure at the arrival airport were associated with increased delays. The three models (XGBoost, CatBoost, and LightGBM) were selected for analysis due to their high-accuracy results, which demonstrated their robustness and reliability in predicting flight delays. Although the three models exhibited similarly impressive performance, XGBoost was selected for in-depth analysis due to its consistently higher recall rates, which is essential for reducing the number of false negatives when forecasting \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Method** & **Phase** & **Accuracy** & **Recall** & **Precision** & **F-1 Score** & \
\begin{tabular}{c} **Balanced Error** \\ **Rate** \\ \end{tabular} \\ \hline \multirow{2}{*}{
\begin{tabular}{c} Random \\ Forest \\ \end{tabular} } & Train & **1.00** & **1.00** & **1.00** & **1.00** & **0.00** \\ \cline{2-6}  & Test & 0.78 & 0.12 & 0.50 & 0.19 & 0.46 \\ \hline \multirow{2}{*}{CatBoost} & Train & **1.00** & 0.99 & **1.00** & **1.00** & **0.00** \\ \cline{2-6}  & Test & 0.79 & 0.16 & 0.57 & 0.26 & 0.43 \\ \hline \multirow{2}{*}{LightGBM} & Train & 0.89 & 0.78 & 0.99 & 0.87 & 0.11 \\ \cline{2-6}  & Test & **0.80** & 0.15 & **0.70** & 0.24 & 0.44 \\ \hline \hline \end{tabular} Best values are shown in bold.  
\end{table} 
Table 8: Cont.