## 3 Model Training, Optimization and Explainability  
### Model Training and Optimization  
As stated in the Introduction, XGBoost is selected for this study. The extracted time series data at each site location shown in Figure 1 can be directly used for training. However, to optimize the accuracy of the XGBoost model, proper pre-processing of the grid value from IMPROVER is necessary. Prior to training, the following pre-processing approaches are applied to the site data. It should be noted that the pre-processing techniques adopted in this study are not exhaustive and there are alternatives in the literature. The ones in this study are selected because they show the best performance in the parametric study. _Inclusion of surrounding grid values_: during data extraction from the IMPROVER grid-ded dataset, the grid value at the site location plus those around the location are extracted and used as separate input features. More specifically, for each of the site, the values on a grid are extracted. The grid is centred on the site location and each nearby point is five grid cells away, as shown in Figure 3. Based on the orientation angle, the values of the eight nearby points are marked by subscripts: NW, W, SW... etc., while the central value has the subscription of C. Feature names hereinafter follow this convention. As shown in the parametric studies below, the inclusion of these neighbouring cell values can greatly increase the model's accuracy. These values are also physically important since the spatial variation of a variable indicates the instant spatial flux of that variable. The spacing between the neighbouring points is selected empirically, but a general rule applies that the points being too close leads to highly correlated features being added to the training set. On the other hand, the point being too remote leads to irrelevant features in the training set. _Data selection_: As shown in Figure 2a, IMPROVER data with longer lead time can be considered as containing the same information but mixed with higher random error. Since good data quality in the training set is essential in building an accurate ML model, and data are issued at four different lead times on lead day 0 (shown in Figure 1c for augmentation), only data with lead time 0 h are used for training. The model is expected to learn the essential data pattern that relates to the locational characteristics of the site, rather than  
Figure 3: Positions of extracted grid values at and around a single site. the evolution of the forecast over time, and thus predictions of all lead days are generated using the same model. _Model inputs and outputs_: The input variables are air temperature at ground level (including surrounding grid points), wind at 10 m at the station location, expressed as U\({}_{10}\) and V\({}_{10}\) components, and dewpoint temperature (including at surrounding grid points). The output variables are air temperature and dew point. An individual model is trained for each station and output (i.e., each model predicts a single variable for a single station). _Automatic feature selection_: In Section 2.1, selected variables are extracted from IMPROVER grids as features. As shown in Figure 3, temperature and dew point are extracted at nine points, which adds up to 23 features in total. However, not all features are equally relevant for each site and may also vary between training runs. To remove irrelevant features in the training set, a pre-train with all features included is first performed for each station, and the 10 features with highest global statistical importance will be used for subsequent training while other less important features are removed. This proves to slightly increase the accuracy of the model and, more importantly, reduce the volume of data needed for validation and generating predictions. _Scaling_: XGBoost models do not perform extrapolation [31] and therefore may not generate accurate predictions with feature values that are outside the bounds of the training set.