Method for predicting and evaluating uncertainty of regional ozone concentration based on XGBoost
By combining the XGBoost model with gridded meteorological data, a multi-dimensional systematic evaluation framework is constructed, which solves the problems of insufficient evaluation of data condition differences in complex environments and prediction bias in high-pollution scenarios in existing ozone prediction technologies. It realizes the refined prediction and uncertainty quantification of regional ozone concentration and has good engineering applicability.
Patent Information
- Application Number
- CN202611358762.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-03
- Publication Date
- 2026-11-27
AI Technical Summary
Existing ozone prediction technologies suffer from several problems in complex and variable natural and artificial observation environments, including insufficient assessment of data condition differences, lack of standardized quantitative characterization system for uncertainty, neglect of prediction bias in high-pollution scenarios, insufficient regional-scale fine prediction capability, and difficulty in reproducing technical processes.
The XGBoost model is used to construct a site-scale ozone-meteorological feature dataset for training and cross-validation. It is then combined with gridded meteorological data for prediction. Multiple sensitivity test scenarios are set up, and an uncertainty assessment index system is constructed, including the performance deviation index and the ozone concentration prediction deviation index, to achieve a multi-dimensional systematic evaluation.
It enables systematic identification of data condition disturbances, improves the interpretability of prediction results, accurately quantifies the risks of high pollution underestimation, breaks through the regional scale refinement of single-point prediction, and has good engineering applicability and versatility.
Smart Images

Figure CN123182830A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of atmospheric environment numerical simulation technology, specifically to a method for predicting regional ozone concentration and assessing uncertainty based on XGBoost. Background Technology
[0002] With the rapid development of industrialization and urbanization in my country, near-surface ozone pollution has become increasingly prominent. As a secondary pollutant, ozone formation exhibits complex nonlinear relationships with precursor emissions and meteorological conditions (such as temperature, solar radiation, wind speed, and direction). While traditional atmospheric chemical transport models (such as CMAQ and CAMx) can simulate the physicochemical processes of ozone, they are computationally intensive and have complex parameterization schemes. Therefore, machine learning methods, with their powerful nonlinear fitting capabilities and high computational efficiency, have been widely applied to the simulation and research of the spatiotemporal distribution of air pollution, becoming one of the mainstream techniques for ozone concentration prediction. However, after in-depth research and engineering practice of existing technologies in this field, the core research focus of current machine learning-based ozone prediction technologies remains on the construction of prediction model structures, feature selection, and concentration numerical fitting. Model performance verification relies solely on conventional test sets for basic accuracy assessment. Although these methods have a certain predictive ability under normal conditions, they exhibit significant technical defects and shortcomings in practical applications, especially in complex and variable natural and artificial observation environments. The existing technologies mainly suffer from the following five defects:
[0003] First, there is a lack of a systematic evaluation framework that addresses the differences in input data conditions.
[0004] Existing ozone prediction models are all trained using ozone data from on-site observations and synchronous meteorological data. However, in actual modeling, there are significant differences in the total number of training samples, the spatial coverage of monitoring stations, and the distribution ratio of ozone samples at different pollution levels. When the training sample size is insufficient, the spatial distribution of stations is unbalanced, or high-pollution ozone samples are scarce, the model's prediction accuracy and stability will fluctuate drastically. Current mainstream technologies only focus on the overall fitting accuracy of the model, without systematically identifying and quantifying key influencing factors such as changes in sample quantity, differences in sample spatial distribution, and changes in the sample ratio of pollution levels. As a result, in practical applications, maintenance personnel cannot intuitively understand under what data conditions the model is unreliable, severely limiting the model's adaptability and reliability in complex data scenarios.
[0005] Second, there is a lack of a standardized quantitative characterization system for the uncertainty of prediction results.
[0006] Most existing ozone prediction studies rely solely on basic accuracy metrics such as correlation coefficient (R), coefficient of determination (R²), root mean square error (RMSE), and mean absolute error (MAE) for model evaluation, or only provide simple qualitative descriptions of prediction errors. This makes it difficult to quantify the fluctuation range of model performance predictions compared to a baseline scenario under different data scenarios. Furthermore, existing technologies lack unified quantitative indicators for performance deviation and prediction bias to address issues such as missing samples, cross-regional extrapolation, and differences in model stability under different pollution levels. This makes the reliability of prediction results extremely ambiguous, preventing policymakers from accurately determining the usability of the output.
[0007] Third, the prediction bias in high-pollution ozone scenarios is ignored.
[0008] Ozone pollution exhibits significant peaks and extreme pollution characteristics. However, in actual observational data, high-concentration, exceeding-standard ozone samples account for a relatively small proportion, with training samples often dominated by low- to medium-concentration ozone data. This uneven sample distribution easily leads to systematic underestimation of heavy pollution events by the model. However, current technologies only evaluate model performance using the overall test set data, without conducting stratified error analysis based on ozone pollution levels. This makes it impossible to accurately identify the risk of underestimation and sources of uncertainty in high-pollution scenarios, resulting in poor predictive adaptability of the model in severe ozone pollution events. This can easily lead to an inverted phenomenon where the more severe the pollution, the more severe the underreporting, which is fatal for early warning systems.
[0009] Fourth, the lack of refined regional-scale forecasting capabilities results in significant limitations in spatial applications.
[0010] Ozone pollution exhibits significant spatial heterogeneity and temporal dynamics, with its pollution processes often crossing administrative boundaries and being heavily influenced by regional transport. However, existing ozone prediction models are mostly limited to single-point, point-scale concentration predictions, outputting only ozone concentration data at the site level. This single-point prediction cannot comprehensively reflect the overall distribution pattern of regional ozone pollution, and cannot support environmental protection departments in conducting macro-management decisions such as regional pollution pattern analysis, transmission channel identification, and zoned and classified prevention and control, greatly limiting the practical application value of ozone prediction technology.
[0011] Fifth, the technical processes are difficult to reproduce, and the projects are not fully implemented.
[0012] Existing technologies often focus on model testing in specific regions or time periods, lacking a complete and replicable standardized technical process from feature construction, model optimization, spatial gridding expansion to uncertainty assessment. This makes it difficult to form a universal solution at the technical level and promote it to other regions or other pollutant types. Summary of the Invention
[0013] The main objective of this application is to provide a method for predicting regional ozone concentration and assessing uncertainty based on XGBoost, including the following steps:
[0014] Step S1: Obtain ozone observation data and synchronous meteorological observation data from ground monitoring stations in the study area during the target time period. After data cleaning, feature extraction and variable transformation, construct a station-scale ozone-meteorological feature dataset.
[0015] Step S2: Based on the ozone-meteorological feature dataset at the station scale, divide the training set and the independent test set. With the ozone concentration prediction value as the target variable and the meteorological features as the input variable, establish an ozone prediction XGBoost model. Evaluate the model performance through cross-validation and the independent test set to obtain the benchmark XGBoost model.
[0016] Step S3: Obtain gridded meteorological data of the study area, preprocess the gridded meteorological data to make its input feature dimension consistent with the ozone-meteorological feature dataset at the station scale, input the preprocessed gridded meteorological data into the benchmark XGBoost model, perform ozone concentration prediction grid by grid, and output the gridded spatial distribution result of ozone concentration in the study area in multiple time series dimensions.
[0017] Step S4: Set the benchmark XGBoost model as the benchmark scenario, and set multiple sensitivity test scenarios respectively; the sensitivity test scenarios include at least the training sample size gradient change scenario for simulating the effect of insufficient training sample size, the regional sample retention scenario for simulating the effect of uneven spatial distribution of sites, and the ozone pollution level sample retention scenario for simulating the effect of sample scarcity at extreme pollution levels.
[0018] Step S5: For multiple sensitive test scenarios, construct an uncertainty assessment index system, which includes a model performance deviation index and an ozone concentration prediction deviation index; calculate the model performance deviation value and ozone concentration prediction deviation value of the sensitive test scenarios relative to the baseline scenario, and output the uncertainty assessment results caused by the sample size, spatial distribution and pollution level structure.
[0019] In one embodiment, the feature extraction and variable transformation in step S1 specifically includes:
[0020] Based on hourly ozone observation data, the daily maximum 8-hour moving average ozone concentration MDA8O3 was calculated and used as the target variable for model prediction.
[0021] Hourly meteorological observation data are aggregated on a daily scale to calculate seven meteorological characteristic variables: daily average temperature, daily maximum temperature, daily maximum wind speed, daily average relative humidity, daily average surface air pressure, daily average boundary layer height, and daily cumulative precipitation.
[0022] The wind direction angle variable, which is cyclically distributed in 360 degrees, is converted and calculated into two continuous characteristic variables: the sine component and the cosine component of the wind direction.
[0023] A site-scale ozone-meteorological feature dataset was constructed, comprising ten dimensions including the MDA8 O3 prediction target variable and nine input feature variables.
[0024] In one embodiment, the step S2 of establishing the XGBoost prediction model specifically includes:
[0025] Using meteorological characteristics as input variables and MDA8 O3 as the prediction target variable, the hyperparameters of the XGBoost model are optimized by traversing the training set using a grid search algorithm. The hyperparameters include at least the number of decision trees, learning rate, maximum tree depth, minimum sample weight of child nodes, sample sampling ratio, feature sampling ratio, and L1 / L2 regularization coefficient.
[0026] The stability of the model within the training set is verified using K-fold cross-validation, and the generalization performance of the XGBoost model is verified using the independent test set to obtain the benchmark XGBoost model.
[0027] The performance evaluation of the XGBoost model adopts a multi-dimensional accuracy index, which includes the correlation coefficient R, root mean square error RMSE, mean absolute error MAE, normalized mean deviation NMB, and symmetric mean absolute percentage error sMAPE.
[0028] In one embodiment, step S2 further includes:
[0029] According to the Ambient Air Quality Standard GB 3095-2026, the concentration of MDA8 O3 is divided into three levels: Level 1 standard sample, Level 2 standard sample, and sample exceeding the standard.
[0030] The prediction accuracy of the benchmark XGBoost model on samples of each pollution level was statistically analyzed to quantify the model's ability to identify different ozone pollution levels.
[0031] In one embodiment, step S3 specifically includes:
[0032] Obtain gridded reanalysis meteorological data covering the study area, and perform the same feature extraction and variable transformation processing on the gridded meteorological data as in step S1, so that the input feature dimension is consistent with the input feature dimension in the station-scale ozone-meteorological feature dataset;
[0033] The preprocessed gridded meteorological data is input into the baseline XGBoost model grid by grid, and the ozone concentration prediction value of each grid cell is output to generate the daily-scale regional ozone concentration gridded prediction result.
[0034] Based on the daily-scale gridded prediction results, the gridded spatial distribution results of regional ozone concentrations with seasonal average and / or annual average are generated through time aggregation calculations.
[0035] In one embodiment, the training sample size gradient change scenario in step S4 specifically includes:
[0036] Set multi-gradient training sample ratios, and select training subsets of the baseline scenario as four gradients: 20%, 40%, 60%, and 80%.
[0037] The corresponding XGBoost models are trained independently using the training subsets of the four gradients mentioned above, and the performance is evaluated using the independent test set to quantify the uncertainty of the prediction results caused by insufficient total sample size.
[0038] In one embodiment, the regional sample reservation scenario in step S4 specifically includes:
[0039] The study area was divided into several typical geographical sub-regions according to geographical zoning rules;
[0040] A region-by-region leave-out validation strategy is adopted. Each time, all samples of one geographic sub-region are used as the test set, and samples of all other geographic sub-regions are used as the training set. Under the condition of keeping the model structure and hyperparameter configuration consistent with the baseline scenario, the XGBoost model under the corresponding region leave-out scenario is retrained.
[0041] Leaveout operations are performed sequentially for each geographic sub-region, and the uncertainty caused by uneven spatial distribution of monitoring stations is quantified by cross-regional performance comparison.
[0042] In one embodiment, the ozone pollution level sample retention scenario in step S4 specifically includes:
[0043] Three independent sample subsets were constructed by removing primary standard samples, secondary standard samples, or samples exceeding the pollution standard, respectively.
[0044] The model was trained using samples from the remaining two grades as the training set, and tested and validated on the corresponding removed grade samples.
[0045] By comparing and analyzing the prediction error, concentration deviation, and level identification accuracy of the XGBoost model under scenarios where samples of each pollution level are missing, this study aims to quantify the prediction uncertainty and systemic underestimation risk caused by the scarcity of samples at extreme pollution levels.
[0046] In one embodiment, the model performance deviation index and ozone concentration prediction deviation index in step S5 are specifically calculated using the following formulas:
[0047] The formula for calculating the Performance Deviation Index (PDI) is as follows:
[0048]
[0049] Where Si represents the i-th type of sensitive scenario. sMAPE(Base) represents the symmetrical mean absolute percentage error for this scenario, while sMAPE(Base) represents the symmetrical mean absolute percentage error for the baseline scenario.
[0050] The mean absolute ozone prediction bias The calculation formula is:
[0051]
[0052] Relative mean absolute ozone prediction bias The calculation formula is:
[0053]
[0054] Among them, O 3j O represents the predicted ozone value for the j-th sample under sensitivity scenario Si. 3j BASE Let N represent the ozone prediction value of the j-th sample under the baseline scenario, and N represent the total number of samples.
[0055] Therefore, this application has the following beneficial effects:
[0056] 1. A multi-dimensional systematic evaluation framework was constructed, filling the gap in the identification of data conditional disturbances.
[0057] This application innovatively sets up three sensitivity test scenarios: gradient change in training sample size, regional sample retention, and ozone pollution level sample retention. From three core dimensions—sufficiency of sample quantity, representativeness of spatial distribution of monitoring stations, and balance of pollution level structure—it systematically analyzes the impact mechanism of input data condition perturbation on model accuracy and stability, effectively making up for the technical shortcomings of existing technologies that lack quantitative assessment of data source bias.
[0058] 2. A standardized quantitative indicator system was proposed, which significantly improved the interpretability of the prediction results.
[0059] This application constructs a "Performance Deviation Index (PDI)" and an "Ozone Concentration Prediction Deviation Index" using a baseline scenario as an anchor. This system calculates the error fluctuation amplitude and absolute concentration deviation relative to the baseline scenario under different data deviation scenarios, achieving a quantitative and standardized expression of prediction uncertainty. It overcomes the shortcomings of traditional accuracy indicators that cannot directly reflect differences in sample distribution and sources of uncertainty, providing a solid quantitative basis for environmental decision-making.
[0060] 3. It accurately quantifies the risks of underestimating high pollution levels, providing a basis for correcting early warnings for heavy pollution prevention and control.
[0061] This application, through pollution level stratification assessment and dedicated pollution level leave-in sensitivity experiments, accurately identifies and quantifies the risk of systematic underestimation of pollution levels by the model due to the scarcity of extreme pollution samples exceeding standards. This mechanism can intuitively warn of the magnitude of prediction bias and the level of confidence decline in the model during heavy pollution processes, providing clear risk correction guidance for refined assessment and decision-making during heavy pollution processes.
[0062] 4. Breaking through the limitations of single points, it has achieved refined gridded spatial prediction at the regional scale.
[0063] This application successfully extends forecasting capabilities from single-site to a continuous grid space across the entire region by seamlessly coupling an optimized baseline XGBoost model with gridded meteorological data. Combined with aggregated outputs across multiple time series dimensions, it accurately reflects the spatial heterogeneity and seasonal evolution characteristics of ozone pollution, effectively addressing the challenges of insufficient spatial representation capabilities and difficulty in supporting zoned control in existing technologies.
[0064] 5. The standardized end-to-end process has strong versatility and engineering applicability.
[0065] This application covers a complete set of standardized processes, including data cleaning, feature engineering, parameter optimization, gridded extrapolation, and uncertainty quantification. The framework is independent of specific hardware and highly modular, allowing for flexible migration to different geographical regions, different input feature sets, or prediction and reliability assessment of other atmospheric pollutants. It has broad application value and good engineering practicality. Attached Figure Description
[0066] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0067] Figure 1 This is a system flowchart based on the XGBoost method for predicting regional ozone concentration and assessing uncertainty.
[0068] Figure 2 This is a box plot of ozone observations and anomaly identification results based on the XGBoost regional ozone concentration prediction and uncertainty assessment method.
[0069] Figure 3 This is a comparison chart of the baseline XGBoost model predicted value MDA8 O3 and the observed value based on the XGBoost regional ozone concentration prediction and uncertainty assessment method.
[0070] Figure 4 This is a time series comparison chart of observed and predicted MDA8 O3 values under seven regional sample hold-out scenarios based on the XGBoost regional ozone concentration prediction and uncertainty assessment method. Detailed Implementation
[0071] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0072] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of this application.
[0073] To address the common technical problems of existing ozone prediction technologies, such as the lack of quantitative methods for assessing the impact of data condition perturbations, the lack of standardized uncertainty evaluation systems for prediction results, insufficient regional-scale simulation and characterization capabilities, and the inability to effectively identify prediction bias risks under high-pollution scenarios, this application provides an XGBoost-based method for regional ozone concentration prediction and uncertainty assessment, including steps S1-S5, as described above. Figure 1 , Figure 1 This is a system flowchart for the XGBoost-based method for predicting regional ozone concentration and assessing uncertainty.
[0074] Step S1: Obtain ozone observation data and synchronous meteorological observation data from ground monitoring stations in the study area during the target time period. After data cleaning, feature extraction and variable transformation, construct a station-scale ozone-meteorological feature dataset.
[0075] Step S2: Based on the ozone-meteorological feature dataset at the station scale, divide the training set and the independent test set. With the ozone concentration prediction value as the target variable and the meteorological features as the input variable, establish an ozone prediction XGBoost model. Evaluate the model performance through cross-validation and the independent test set to obtain the benchmark XGBoost model.
[0076] Step S3: Obtain gridded meteorological data of the study area, preprocess the gridded meteorological data to make its input feature dimension consistent with the ozone-meteorological feature dataset at the station scale, input the preprocessed gridded meteorological data into the benchmark XGBoost model, perform ozone concentration prediction grid by grid, and output the gridded spatial distribution result of ozone concentration in the study area in multiple time series dimensions.
[0077] Step S4: Set the benchmark XGBoost model as the benchmark scenario, and set multiple sensitivity test scenarios respectively; the sensitivity test scenarios include at least the training sample size gradient change scenario for simulating the effect of insufficient training sample size, the regional sample retention scenario for simulating the effect of uneven spatial distribution of sites, and the ozone pollution level sample retention scenario for simulating the effect of sample scarcity at extreme pollution levels.
[0078] Step S5: For multiple sensitive test scenarios, construct an uncertainty assessment index system, which includes a model performance deviation index and an ozone concentration prediction deviation index; calculate the model performance deviation value and ozone concentration prediction deviation value of the sensitive test scenarios relative to the baseline scenario, and output the uncertainty assessment results caused by the sample size, spatial distribution and pollution level structure.
[0079] Specifically, in this embodiment, the ozone and meteorological data of 2019 are used as the basis, and combined with ERA5 gridded meteorological input data, to provide a detailed implementation description.
[0080] Step S1: Construction of Site-Scale Ozone-Meteorological Feature Dataset
[0081] First, hourly ozone (O3) observation data were collected from 1,439 national-level air quality monitoring stations across the country in 2019, along with synchronous meteorological observation data from 502 national-level surface meteorological stations. The meteorological data included temperature, wind speed, wind direction, relative humidity, surface pressure, boundary layer height, and precipitation.
[0082] Secondly, data cleaning and quality control were performed. Samples with missing variables were removed, and invalid records with ozone concentrations less than or equal to zero were deleted. To eliminate the influence of statistical outliers, the quartile box plot method was used to treat ozone concentration data outside the range [Q1-1.5IQR, Q3+1.5IQR] as outliers and remove them. After processing, a total of 436,143 valid modeling samples were obtained.
[0083] Finally, feature extraction and variable transformation were performed. The original wind direction angle data were converted into sine and cosine components to eliminate the periodic discontinuity of the angle. Based on hourly ozone concentration, the daily maximum 8-hour moving average ozone concentration (MDA8 O3) was calculated using the sliding window method and used as the target variable for model prediction. Simultaneously, the hourly meteorological data were aggregated at a daily scale to construct seven daily input features, including daily average temperature, daily maximum temperature, daily maximum wind speed, daily average relative humidity, daily average surface pressure, daily average boundary layer height, and daily cumulative precipitation. Finally, the cleaned data was matched with the constructed features to form a station-scale ozone-meteorological feature dataset. Following commonly used domestic geographical zoning rules, the entire region was divided into seven major regions: Northeast, North China, East China, Central China, South China, Southwest, and Northwest. The spatial distribution of monitoring stations showed significant unevenness, with denser station deployment in the eastern region and sparser stations in the central and western regions and the Qinghai-Tibet Plateau region.
[0084] Step S2: Benchmark XGBoost Model Construction and Evaluation
[0085] First, a stratified random sampling method was used to divide the constructed site-scale dataset into a training set (348,914 records) and an independent test set (87,229 records) at a ratio of 80% and 20%, respectively, to ensure that the distribution of ozone pollution level samples in the training set and the test set is consistent with that in the original dataset.
[0086] Secondly, model training and hyperparameter optimization were performed. Using seven daily meteorological features as input variables and MDA8 O3 as the prediction target, an XGBoost model was built on the training set. A grid search algorithm was used to optimize the model's key hyperparameters, including the number of decision trees (n_estimators), learning rate, maximum tree depth (max_depth), minimum child weight (min_child_weight), subsample ratio, colsample_bytree ratio, and regularization coefficients (gamma, reg_alpha, reg_lambda).
[0087] Finally, model performance was evaluated. The trained model was evaluated using both 10-fold cross-validation and an independent test set. The evaluation results showed that the baseline XGBoost model had a coefficient of determination (R²) of 0.85, a root mean square error (RMSE) of 8.14 ppb, and a symmetric mean absolute percentage error (sMAPE) of 15.2% on the independent test set, indicating that the model has good predictive performance and can be used as a baseline XGBoost model for subsequent analysis.
[0088] Step S3: Regional gridded ozone concentration prediction
[0089] First, ERA5 reanalysis gridded meteorological data covering the study area were acquired, with a spatial resolution of 0.25°×0.25°. The same feature extraction and variable transformation processes as in step S1 were then performed on this gridded meteorological data to ensure that the input feature dimensions remained consistent with the station-scale dataset.
[0090] Secondly, the preprocessed gridded meteorological data is input grid by grid into the pre-trained baseline XGBoost model to predict ozone concentration and generate daily MDA8 O3 gridded prediction results for 2019.
[0091] Finally, based on the daily forecast results, a gridded spatial distribution map of the average MDA8 O3 for spring, summer, autumn, winter, and the whole year of 2019 was generated through time aggregation calculation. The forecast results show that high ozone concentration areas are mainly concentrated in the central and eastern regions such as the North China Plain, the Yangtze River Delta, and the Pearl River Delta, and exhibit a seasonal characteristic of high concentrations in summer and low concentrations in winter, which is consistent with the observation data from the stations.
[0092] Step S4: Setting up the sensitivity test scenario
[0093] The baseline XGBoost model is set as the baseline scenario, and three types of sensitivity test scenarios are set:
[0094] Training sample size gradient scenario: Keeping the independent test set unchanged, randomly sample subsets from the original training set at proportions of 20%, 40%, 60%, and 80% respectively as training data to construct models under four different sample size gradients, in order to simulate the impact of insufficient monitoring data on the model's predictive stability.
[0095] Regional Sample Removal Scenario: The study area is divided into seven major geographical sub-regions: Northeast, North China, East China, Central China, South China, Southwest, and Northwest. Samples from one of these sub-regions are completely removed from the training set, and the model is trained using samples from the remaining six sub-regions. The model is then validated on the test set of the removed sub-region. This scenario simulates the uncertainty in model generalization ability caused by the uneven spatial distribution of monitoring stations.
[0096] Ozone pollution level sample retention scenario: Based on the "Ambient Air Quality Standards," samples are divided into three pollution levels: Level 1 (Excellent), Level 2 (Good), and Exceeding Standards. Samples of each level are sequentially removed from the training set. The model is trained using samples from the remaining levels and validated on the test set of the removed levels. This scenario simulates the impact of extreme pollution level sample scarcity on the model's predictive performance.
[0097] Step S5: Construction of Uncertainty Assessment Indicators and Output of Results
[0098] An uncertainty assessment index system was constructed, which includes model performance deviation index and ozone concentration prediction deviation index.
[0099] Model performance deviation index: Using sMAPE as a model performance metric, a model performance deviation index (PDI) is constructed. Its calculation formula is: PDI(Si) = (sMAPE(Si) - sMAPE(Base)) / sMAPE(Base) × 100%. Where Si represents the i-th type of sensitivity scenario. A larger PDI value indicates a more severe degradation in model performance and higher uncertainty under that scenario.
[0100] Ozone concentration prediction bias index: By comparing the ozone prediction values under each sensitive scenario with the baseline scenario on a sample-by-sample basis, the mean absolute ozone prediction bias and the relative mean absolute ozone prediction bias are calculated to quantify the absolute and relative deviation of the ozone concentration prediction results due to changes in data conditions.
[0101] Finally, the comprehensive calculation and evaluation results were output. The results show that the PDI values induced by regional sample retention, especially in South China and Southwest China, and by the retention of samples exceeding the standard, were the highest, exceeding 115% and 80% respectively, far higher than the 43.33% PDI value generated when the training sample size was reduced to 20%. This indicates that, compared to insufficient sample size alone, the uneven spatial distribution of monitoring stations and the scarcity of extreme pollution samples are the more significant factors causing uncertainty in regional ozone prediction. In particular, under the scenario of retaining samples exceeding the standard, the model showed an average negative bias of 25.43% in predicting high concentrations of ozone, revealing a significant risk of underestimation under heavy pollution weather conditions.
[0102] In one embodiment, the feature extraction and variable transformation in step S1 specifically includes:
[0103] Based on hourly ozone observation data, the daily maximum 8-hour moving average ozone concentration MDA8O3 was calculated and used as the target variable for model prediction.
[0104] Hourly meteorological observation data are aggregated on a daily scale to calculate seven meteorological characteristic variables: daily average temperature, daily maximum temperature, daily maximum wind speed, daily average relative humidity, daily average surface air pressure, daily average boundary layer height, and daily cumulative precipitation.
[0105] The wind direction angle variable, which is cyclically distributed in 360 degrees, is converted and calculated into two continuous characteristic variables: the sine component and the cosine component of the wind direction.
[0106] A site-scale ozone-meteorological feature dataset was constructed, comprising ten dimensions including the MDA8 O3 prediction target variable and nine input feature variables.
[0107] Specifically, in this embodiment, the maximum daily 8-hour moving average ozone concentration (MDA8O3) is first calculated using the sliding window method based on hourly ozone observation data. Specifically, for each monitoring station, the hourly ozone concentration value is continuously slid across windows of 8 hours each with a 1-hour step size. The 8-hour average concentration within each sliding window is calculated, and the maximum value across all sliding windows throughout the day is taken as the daily MDA8O3 value. MDA8O3 is an internationally accepted ozone pollution assessment indicator and is also the daily ozone assessment concentration indicator specified in my country's "Ambient Air Quality Standards." Using it as a target variable for model prediction has clear physical significance and regulatory applicability.
[0108] This embodiment implemented a rigorous data cleaning process: samples with missing core target variables or key meteorological features were removed, samples with ozone concentrations ≤0 that lacked physical significance were removed, and statistical outlier filtering was performed using interquartile range box plots. As shown in the figure... Figure 2 This is a box plot of ozone observations and outlier identification results based on the XGBoost regional ozone concentration prediction and uncertainty assessment method. In this embodiment, a total of 525,235 initial samples were obtained after spatiotemporal matching. Through the above cleaning, the first quartile Q1 of the MDA8 O3 sequence was 27.52 ppb, the third quartile Q3 was 56.90 ppb, and the interquartile range (IQR) was 29.38 ppb. Based on the 1.5 times IQR criterion, the lower bound for outlier removal was calculated to be -16.56 ppb and the upper bound to be 100.98 ppb. A total of 5,213 outlier observation records outside this range were removed, and finally 436,143 valid modeling samples were retained.
[0109] Secondly, hourly meteorological observation data were aggregated on a daily scale to calculate seven meteorological characteristic variables. These include: taking the daily average and daily maximum values of hourly temperature to obtain the daily average temperature and daily maximum temperature, respectively; taking the daily maximum value of hourly wind speed to obtain the daily maximum wind speed; taking the daily average values of hourly relative humidity and surface air pressure to obtain the daily average relative humidity and daily average surface air pressure, respectively; in addition, the boundary layer height from the ERA5 reanalysis data was introduced, and the daily average value was taken as the daily average boundary layer height. This variable can characterize the vertical mixing capacity of the atmosphere and has an important impact on ozone formation and diffusion; and the daily cumulative precipitation was obtained by summing the hourly precipitation. These seven variables comprehensively characterize the key meteorological driving factors affecting ozone formation and accumulation from five dimensions: thermodynamic conditions, dynamic conditions, humidity conditions, vertical mixing conditions, and wet deposition conditions.
[0110] The wind direction angle variable, which is cyclically distributed over 360 degrees, is transformed into two continuous feature variables: a sine component and a cosine component. The specific transformation formulas are: WD_sin = sin(WD × π / 180), WD_cos = cos(WD × π / 180), where WD is the original wind direction angle. This transformation solves the problem of numerical discontinuity in the wind direction variable at the boundary between 0 degrees and 360 degrees, enabling the model to correctly identify the periodicity and directionality of wind direction. The original wind direction angle is in degrees, ranging from 0° to 360°, where 0° (or 360°) represents northerly winds, 90° represents easterly winds, 180° represents southerly winds, and 270° represents westerly winds. Because there is a numerical abrupt change in the wind direction angle between 0° and 360° (both actually point due north), directly using the angle value as the model input feature would result in 0° and 360° being the furthest apart numerically but identical in physical meaning, causing severe distortion in feature representation.
[0111] Table 1 Feature Variables
[0112]
[0113] Finally, as shown in Table 1, the above-mentioned MDA8 O3 prediction target variable was matched and integrated with seven meteorological feature variables and two wind direction component variables to construct a station-scale ozone-meteorological feature dataset containing ten dimensions, providing a standardized input data foundation for subsequent model training in this embodiment.
[0114] In one embodiment, the step S2 of establishing the XGBoost prediction model specifically includes:
[0115] Using meteorological characteristics as input variables and MDA8 O3 as the prediction target variable, the hyperparameters of the XGBoost model are optimized by traversing the training set using a grid search algorithm. The hyperparameters include at least the number of decision trees, learning rate, maximum tree depth, minimum sample weight of child nodes, sample sampling ratio, feature sampling ratio, and L1 / L2 regularization coefficient.
[0116] The stability of the model within the training set is verified using K-fold cross-validation, and the generalization performance of the XGBoost model is verified using the independent test set to obtain the benchmark XGBoost model.
[0117] The performance evaluation of the XGBoost model adopts a multi-dimensional accuracy index, which includes the correlation coefficient R, root mean square error RMSE, mean absolute error MAE, normalized mean deviation NMB, and symmetric mean absolute percentage error sMAPE.
[0118] Specifically, in this embodiment, based on the site-scale modeling dataset constructed in step S1, a stratified random sampling method is used to divide it into a training set and an independent test set. In this embodiment, there are a total of 436,143 valid modeling samples, of which 348,914 samples (80% of the total samples) are randomly selected as the training set for subsequent model training and hyperparameter optimization; the remaining 87,229 samples (20% of the total samples) are used as the independent test set, which does not participate in the model training process and is only used to evaluate the generalization ability of the final model. Figure 3 As shown, Figure 3 This is a comparison chart of the predicted value of MDA8 O3 and the observed value based on the benchmark XGBoost model for regional ozone concentration prediction and uncertainty assessment method.
[0119] Using the nine meteorological variables extracted in step S1 as input features and MDA8 O3 as the target variable for model prediction, an XGBoost nonlinear regression prediction model is established on the training set. To fully explore the model's performance and suppress the risk of overfitting, this embodiment uses a grid search algorithm to traverse and optimize the hyperparameters. After multiple rounds of testing and cross-comparison, the optimal hyperparameter combination is finally determined as follows: number of decision trees n_estimators = 3200, learning rate = 0.015, maximum tree depth max_depth = 16, minimum loss decrease value for node splitting gamma = 0.01, minimum child weight min_child_weight = 0.5, sample sampling ratio subsample = 0.98, feature sampling ratio colsample_bytree = 0.98, L1 regularization term reg_alpha = 0.0, and L2 regularization term reg_lambda = 1.2.
[0120] This embodiment introduces K-fold cross-validation to internally test the model's stability, with K preferably set to 10. Specifically, the 348,914 training samples are divided into 10 equal subsets, iterated 10 times, selecting 9 subsets for training and 1 subset for validation each time. The mean and standard deviation of each cross-validation evaluation metric are then calculated. After 10-fold cross-validation, the mean correlation coefficient R is 0.91 ± 0.001, and the mean root mean square error (RMSE) is 8.38 ± 0.05 ppb, demonstrating that the model exhibits good stability within the training set and does not have a significant risk of overfitting.
[0121] The basic evaluation metrics for the XGBoost model's training set, 10-fold cross-validation, and independent testing are shown in Table 2. The R-values for the training set, 10-fold cross-validation mean, and independent test set are 0.99, 0.91, and 0.92, respectively. The model shows good fit on samples not used in the training, with a low risk of overfitting, and can serve as a unified benchmark model for regional gridded prediction and multi-scenario sensitivity analysis. According to the "Ambient Air Quality Standard" GB 3095-2026, MDA8 O3 is classified into three categories: Level I, Level II, and Exceeding Standard. The accuracy of the benchmark model in identifying samples of different pollution levels is shown in Table 3. The prediction accuracy for Level I, Level II, and Exceeding Standard samples is 94.2%, 79.4%, and 58.7%, respectively. The model exhibits a significant systematic underestimation of high-concentration exceeding pollution processes, consistent with the core defects of existing technologies.
[0122] Table 2. Evaluation results of XGBoost model training, cross-validation, and test set.
[0123]
[0124] Table 3. Sample identification accuracy at different ozone pollution levels under baseline scenario.
[0125]
[0126] Finally, the generalization performance of the model was verified using 87,229 independent test cases that were not used in training. This embodiment employed multi-dimensional accuracy metrics for comprehensive evaluation, yielding the following results: correlation coefficient R = 0.92, root mean square error (RMSE) = 8.14 ppb, mean absolute error (MAE) = 5.50 ppb, normalized mean bias (NMB) = -0.18%, and symmetric mean absolute percentage error (sMAPE) = 15.54%. Based on these evaluation metrics, this embodiment ultimately determined the model with these parameter configurations as the benchmark XGBoost model for subsequent regional gridded prediction and multi-scenario sensitivity comparison.
[0127] In one embodiment, step S2 further includes:
[0128] According to the Ambient Air Quality Standard GB 3095-2026, the concentration of MDA8 O3 is divided into three levels: Level 1 standard sample, Level 2 standard sample, and sample exceeding the standard.
[0129] The prediction accuracy of the benchmark XGBoost model on samples of each pollution level was statistically analyzed to quantify the model's ability to identify different ozone pollution levels.
[0130] In this embodiment, after completing the baseline model performance evaluation, step S2 further includes a stratified evaluation step for ozone pollution levels.
[0131] First, based on the ozone concentration threshold specified in the "Ambient Air Quality Standard" (GB 3095-2026) and considering the monitoring needs of ozone pollution, the MDA8 O3 concentration of the test set samples was divided into three pollution levels: Level 1 standard sample (MDA8 O3 concentration ≤ 100 µg / m³). 3 (approximately 50 ppb), secondary standard sample (100 µg / m) 3 < MDA8 O3 ≤ 160µg / m 3 (corresponding to approximately 50-80 ppb) and samples with excessive pollution (MDA8 O3 > 160 µg / m³). 3 (corresponding to approximately greater than 80 ppb).
[0132] Secondly, the prediction results of the benchmark XGBoost model on the aforementioned independent test set were compared one by one with the corresponding measured values to statistically analyze the model's accuracy in identifying samples of different pollution levels. The specific statistical results are as follows: The test set actually contained 59,283 Level 1 standard samples, of which the model correctly detected 55,817, achieving an accuracy rate of 94.2%; it contained 23,587 Level 2 standard samples, of which the model correctly detected 18,719, achieving an accuracy rate of 79.4%; and it contained 4,359 samples exceeding the pollution standard, of which the model correctly detected 2,560, achieving an accuracy rate of only 58.7%. The total number of samples in the overall test set was 87,229, with an overall comprehensive accuracy rate of 88.4%.
[0133] The above stratified evaluation results show that although the benchmark XGBoost model exhibits extremely high recognition accuracy for samples with low to medium concentrations (Level 1 and Level 2 standards), its recognition accuracy drops significantly for samples with high concentrations of pollution exceeding the standard, indicating a clear systematic underestimation. This specific evaluation accurately quantifies the model's ability to recognize different pollution levels. Through the stratified evaluation in this embodiment, the performance shortcomings of the model in high-pollution scenarios can be accurately identified, providing a quantitative benchmark for subsequent sensitivity tests to address the issue of scarce samples exceeding the standard.
[0134] In one embodiment, step S3 specifically includes:
[0135] Obtain gridded reanalysis meteorological data covering the study area, and perform the same feature extraction and variable transformation processing on the gridded meteorological data as in step S1, so that the input feature dimension is consistent with the input feature dimension in the station-scale ozone-meteorological feature dataset;
[0136] The preprocessed gridded meteorological data is input into the baseline XGBoost model grid by grid, and the ozone concentration prediction value of each grid cell is output to generate the daily-scale regional ozone concentration gridded prediction result.
[0137] Based on the gridded prediction results at the daily scale, the gridded spatial distribution results of the regional ozone concentration with seasonal average and / or annual average are generated by time aggregation calculation.
[0138] Specifically, in this embodiment, gridded reanalysis meteorological data covering the study area is first acquired as the data source for regional prediction. This embodiment uses the ERA5 global reanalysis meteorological dataset with a spatial resolution of 0.25°×0.25°. This dataset needs to extract variables consistent with the station-scale characteristics in step S1, including surface temperature, maximum temperature, maximum wind speed, relative humidity, surface pressure, boundary layer height, daily cumulative precipitation, and raw wind direction data.
[0139] The acquired gridded meteorological data undergoes the same preprocessing and feature extraction as in step S1. This includes imputation of missing measurements, removal of outlier grid data, and standardization of the data format. Specifically, the original wind direction angle variables in the grid are transformed using the same "wind direction sine component" and "wind direction cosine component" conversions to ensure strict consistency between the grid input feature dimensions and the station-scale feature inputs, achieving standardized matching of the model input features.
[0140] The preprocessed daily time-series gridded meteorological characteristic data are input one by one into the trained benchmark XGBoost model according to the spatial grid sequence for inference and prediction, thereby obtaining the predicted value of MDA8 O3 concentration for each grid unit in the study area, and generating daily spatial gridded prediction results covering the entire area.
[0141] Finally, based on the daily gridded prediction results, a gridded spatial distribution map of regional ozone concentration at both the seasonal and annual average scales was generated through time-dimensional aggregation calculations. In this embodiment, based on the aggregation results, it was found that the regional average ozone concentration in the study area for the four seasons was 30.82 ppb in spring, 41.54 ppb in summer, 31.34 ppb in autumn, and 24.44 ppb in winter, reflecting a typical seasonal evolution pattern of highest concentration in summer, lowest concentration in winter, and intermediate concentration in spring and autumn. Simultaneously, the gridded prediction results accurately depicted the spatial heterogeneity pattern of higher concentrations in the central and eastern regions and lower concentrations in the southwest and Qinghai-Tibet Plateau regions, verifying the effectiveness of this method in refined spatial simulation of ozone at the regional scale.
[0142] The spatial distribution of ozone in the study area shows significant heterogeneity. The annual average concentration is generally higher in the central and eastern regions, while the concentration is lower in the southwestern and Qinghai-Tibet Plateau regions. The high-value areas predicted by the grid and the high-value areas observed by the stations have a good spatial match, which can accurately characterize the spatial distribution pattern of ozone in the region.
[0143] The regional average concentrations for each season were 30.82 ppb in spring, 41.54 ppb in summer, 31.34 ppb in autumn, and 24.44 ppb in winter, exhibiting a seasonal variation pattern of highest concentrations in summer, lowest concentrations in winter, and intermediate concentrations in spring and autumn. This is consistent with the objective mechanism of ozone photochemical formation driven by sunlight, temperature, atmospheric boundary layer, and diffusion conditions. Furthermore, the arithmetic mean of the daily gridded prediction values throughout the year was calculated to generate the annual average MDA8 O3 gridded prediction results for 2019. Figure 4 The comparison between the annual gridded prediction and the actual spatial distribution of ozone was conducted. The high-value areas predicted by the grid and the high-value areas observed by the stations showed good spatial matching, which can accurately depict the spatial distribution pattern of ozone in the region.
[0144] In one embodiment, the training sample size gradient change scenario in step S4 specifically includes:
[0145] Set multi-gradient training sample ratios, and select training subsets of the baseline scenario as four gradients: 20%, 40%, 60%, and 80%.
[0146] Using the training subsets of the four gradients mentioned above, while maintaining the model structure and hyperparameter configuration consistent with the baseline scenario, XGBoost models for the corresponding sample size scenarios are trained independently, and the independent test set is used uniformly for performance evaluation to quantify the uncertainty of prediction results caused by insufficient total sample size.
[0147] Specifically, in this embodiment, a unified baseline scenario is first established based on the optimal hyperparameter configuration determined in step S2 and the baseline XGBoost model. To quantify the fluctuation of model prediction performance in the absence of sufficient historical observation data, this application performs gradient reduction only on the size of the training data while keeping the core parameters of the model and the independent test set (containing 87,229 samples) completely unchanged.
[0148] Specifically, 20%, 40%, 60% and 80% of the total amount of the complete benchmark training set (a total of 348,914 samples) constructed in step S2 are respectively extracted to construct four independent training subsets of gradients, with the corresponding number of samples participating in model training being 69,783, 139,566, 209,348 and 279,131 samples, respectively.
[0149] Subsequently, the XGBoost model was independently trained using the four training subsets of different sizes, and the performance of each model was evaluated using the aforementioned 87,229 independent test sets. Using the baseline scenario of full-sample, full-domain training as a control, three types of single-variable sensitivity experiments were set up to quantify the perturbation effects of the total training sample size, spatial distribution of monitoring stations, and missing pollution level samples on ozone prediction performance and concentration results. The sample allocation rules and sample sizes for each training and test set are shown in Table 4.
[0150] Table 4. Baseline Scenario and Three Types of Sensitivity Test Protocols and Sample Allocation
[0151]
[0152] The detailed comparison of the test results in this embodiment is shown in Table 5. When the training sample ratio is reduced to 20%, the correlation coefficient R of the model on the test set drops to 0.84, the RMSE expands to 11.13 ppb, the corresponding performance deviation index PDI is as high as 43.33%, and the relative deviation of ozone concentration O3AbsDev is 10.23%. As the training sample ratio increases to 40% and 60%, the model performance gradually recovers. When the sample ratio reaches 80%, the model correlation coefficient R rises back to 0.91, the RMSE drops to 8.59 ppb, the PDI narrows significantly to 6.11%, and the relative deviation of ozone concentration is only 2.62%.
[0153] Table 5 Performance and uncertainty indices of scenario models with different training sample sizes
[0154]
[0155] In this embodiment, XGBoost models are trained independently based on four gradient training subsets. All models use the exact same hyperparameter configuration as the baseline model (3200 decision trees, learning rate 0.015, maximum tree depth 16, etc.) to eliminate the interference of model structure differences on performance comparison. After the four models are trained, the same independent test set is used for performance evaluation. By comparing the accuracy indicators and prediction bias under different sample sizes, the prediction uncertainty caused by insufficient training samples is quantified. The evaluation results are shown in Table 6: As the training sample ratio increased from 20% to the baseline level of 100%, the correlation coefficient R of the test set increased from 0.84 to 0.92, and the RMSE decreased from 11.13 ppb to 8.14 ppb, indicating a continuous improvement in the overall predictive performance of the model. The PDI for the 20% small-scale sample scenario reached 43.33%, with the model accuracy significantly lower than the baseline scenario. The PDI for the 80% sample scenario decreased to 6.11%, approaching the baseline level. O3AbsDev decreased from 10.23% for the 20% sample scenario to 2.62% for the 80% sample scenario, indicating that the more sufficient the sample size, the closer the prediction results are to the baseline scenario. This gradient experiment confirms that the total amount of training samples is an important source of uncertainty in ozone prediction. When the sample size is insufficient, the model cannot fully learn the nonlinear coupling relationship between meteorological factors and ozone concentration, resulting in a significant decrease in prediction accuracy. This embodiment, through multi-gradient experimental design, compensates for the lack of a sample gradient sensitivity evaluation framework in existing technologies, providing a quantitative basis for determining the minimum effective training sample size.
[0156] The gradient test data above fully demonstrates that the total amount of training samples is a significant source of uncertainty in ozone prediction; when faced with insufficient historical observation samples in practical applications, the model's prediction accuracy will significantly decrease. This gradient sensitivity experiment effectively compensates for the lack of a sample size gradient evaluation framework in existing technologies, and can systematically quantify the overall perturbation uncertainty of prediction results caused by insufficient total sample size.
[0157] In one embodiment, the regional sample reservation scenario in step S4 specifically includes:
[0158] The study area was divided into several typical geographical sub-regions according to geographical zoning rules;
[0159] A per-region leave-out validation strategy is adopted, where all samples from one geographic sub-region are used as the test set each time, and samples from all other geographic sub-regions are used as the training set to train the baseline XGBoost model.
[0160] Leaveout operations are performed sequentially for each geographic sub-region, and the uncertainty caused by uneven spatial distribution of monitoring stations is quantified by cross-regional performance comparison.
[0161] Specifically, in this embodiment, to quantify the uncertainty in cross-regional model extrapolation caused by uneven spatial distribution of monitoring stations and missing samples in some areas, this embodiment first divides the study area into seven typical geographical sub-regions: Northeast, North China, East China, Central China, South China, Southwest, and Northwest, according to commonly used geographical zoning rules in China. Statistical analysis of sample distribution in each region shows that the spatial distribution of monitoring stations is significantly uneven, with East China having the largest sample size (128,930 samples) and Northwest China having the smallest (29,552 samples). The eastern region has a dense network of stations, while the central and western regions and the Qinghai-Tibet Plateau have sparse stations, consistent with the actual monitoring network layout. A validation strategy is adopted, where all samples from one geographical sub-region are used as the test set each time, and samples from all other geographical sub-regions are used as the training set to train the baseline XGBoost model.
[0162] In this embodiment, a region-by-region validation operation is performed sequentially for the seven geographic sub-regions. Each time a single region is reserved, all samples from that region are completely removed from the training data and used only as a test set to evaluate the model's cross-regional extrapolation capability. The remaining six regions are used as the training set, and the XGBoost model is independently trained using the same hyperparameter configuration as the baseline model. Prediction validation is then performed on the samples from the reserved regions. For example, in the North China region, the training set consists of 375,282 samples from the other six regions, and the test set consists of 60,861 samples from the North China region. Similarly, in the East China region, the training set consists of 307,213 samples from the other six regions, and the test set consists of 128,930 samples from the East China region.
[0163] Subsequently, a sensitivity testing strategy of leave-out validation for each region was adopted, and seven independent cross-tests were performed sequentially: each time, one geographic sub-region was selected, and all samples (including the training set and the test set) of it were used as the leave-out test set for this test. All samples from the remaining six geographic sub-regions were merged as the training set, and the XGBoost model was retrained. After training was completed, the performance was evaluated using the samples from the leave-out region.
[0164] This embodiment conducted systematic testing and statistical analysis of the leave-out scenarios for each region. Experimental results show that the model's performance significantly degrades when extrapolating across regions. As shown in Table 6, the model performance fluctuates most dramatically after leaving out samples from South China and Southwest China, with performance deviation indices (PDI) reaching 117.34% and 115.48%, respectively, and corresponding RMSEs increasing to 16.17 ppb and 14.4 ppb, respectively. Leaving out samples from Northwest China has the least impact on the overall model accuracy, with a PDI of 54.10%. The comparative tests reveal that when samples from South China and Southwest China are missing, the model cannot fully learn the unique meteorological conditions and pollution transport coupling patterns of these regions, resulting in a severe deficiency in its ability to predict peak ozone levels during periods of high ozone concentration and seasonal transitions.
[0165] Table 6 Performance and Uncertainty Indicators of the Leaveout Scenario Model for Samples in Different Regions
[0166]
[0167] Time series comparison of observed and predicted MDA8 O3 values under the sample hold-out scenario in seven major regions Figure 4 As shown, the predicted time-series curves for Central China, East China, and Northwest China can reproduce the seasonal fluctuations of observed values relatively well; however, there are significant systematic deviations between the predicted and observed values for South China and Southwest China, and the ability to adequately characterize peak ozone levels during high-value periods and seasonal transitions is insufficient. When complete geographical regions are not involved in model training, the model cannot fully learn the regionally specific meteorological and pollution coupling patterns, resulting in a significant decrease in spatial extrapolation and generalization capabilities, leading to significant spatial dimensional prediction uncertainty.
[0168] In one embodiment, the ozone pollution level sample retention scenario in step S4 specifically includes:
[0169] Three independent sample subsets were constructed by removing primary standard samples, secondary standard samples, or samples exceeding the pollution standard, respectively.
[0170] The model was trained using samples from the remaining two grades as the training set, and tested and validated on the corresponding removed grade samples.
[0171] By comparing and analyzing the prediction error, concentration deviation, and level identification accuracy of the XGBoost model under scenarios where samples of each pollution level are missing, this study aims to quantify the prediction uncertainty and systemic underestimation risk caused by the scarcity of samples at extreme pollution levels.
[0172] Specifically, in this embodiment, to quantify the impact of missing samples at different pollution levels on the model's predictive performance, based on the three pollution level classification results determined in step S2 according to the "Ambient Air Quality Standard" (GB 3095-2026), three independent sample retention scenarios are constructed respectively. The three retention scenarios are as follows: (1) Level 1 sample retention scenario: all Level 1 standard samples (MDA8 O3≤100μg / m 3 (1) Remove from the training set, retaining only the secondary standard samples and the excessive contamination samples as training data; (2) Secondary level sample retention scenario: remove all secondary standard samples (100μg / m 3 <MDA8 O3≤160μg / m 3 (2) Remove from the training set, retaining only the first-level standard samples and the samples exceeding the standard as training data; (3) Scenario for removing samples exceeding the standard: remove all samples exceeding the standard (MDA8 O3 > 160 μg / m 3 The samples were removed from the training set, and only the first-level and second-level standard samples were retained as training data. The training set sample sizes for each retention scenario were as follows: when first-level samples were retained, the training set contained 111,757 samples (second-level + over-standard); when second-level samples were retained, the training set contained 254,512 samples (first-level + over-standard); and when over-standard samples were retained, the training set contained 331,559 samples (first-level + second-level).
[0173] For the three sample retention scenarios, all samples from the remaining two pollution levels were used as training sets. XGBoost models were trained independently while maintaining identical hyperparameter configurations for the baseline model (3200 decision trees, learning rate 0.015, maximum tree depth 16, etc.). After training, each model was tested and validated on the corresponding removed pollution level samples to evaluate its predictive ability under conditions where samples of that level were completely missing. Specifically, the test set for the Level 1 sample retention scenario consisted of all Level 1 standard samples (59283 samples), the test set for the Level 2 sample retention scenario consisted of all Level 2 standard samples (23587 samples), and the test set for the excessive pollution level sample retention scenario consisted of all excessive pollution samples (4359 samples). Simultaneously, all three models were evaluated on the same complete and independent test set to comprehensively compare model performance under each scenario.
[0174] Table 7 Performance and Uncertainty Indicators of Retention Scenario Models for Samples at Different Pollution Levels
[0175]
[0176] In this embodiment, the uncertainty caused by the lack of pollution level samples is quantified by comparing the accuracy index, performance deviation index, and ozone concentration deviation index of the baseline scenario and the three types of sample retention scenarios. The evaluation results are shown in Table 7: the PDI of the Level 1 sample retention scenario is as high as 265.09%, and the NMB is 87.10%, indicating a serious overestimation by the model; the PDI of the excessive pollution sample retention scenario is 160.76%, and the NMB is -25.43%, indicating a systematic underestimation of high concentration ozone by the model, with the correlation coefficient R dropping to -0.12, and the model completely losing its meaningful predictive ability for high pollution samples; regarding O3AbsDev, the retention rate of Level 1 samples is 78.31%, Level 2 samples is 17.44%, and excessive samples is 18.56%. The results show that the lack of low ozone level samples causes the strongest predictive perturbation, while the lack of excessive level samples significantly weakens the model's ability to identify high pollution events. This embodiment, through a tiered retention test, accurately identifies the scarcity of samples exceeding the standard as the key reason for the systematic underestimation of heavy pollution prediction, thus making up for the shortcomings of existing technologies that cannot assess the prediction bias of pollution levels in a tiered manner.
[0177] In one embodiment, the model performance deviation index and ozone concentration prediction deviation index in step S5 are specifically calculated using the following formulas:
[0178] The formula for calculating the Performance Deviation Index (PDI) is as follows:
[0179]
[0180] Where Si represents the i-th type of sensitive scenario. sMAPE(Base) represents the symmetrical mean absolute percentage error for this scenario, while sMAPE(Base) represents the symmetrical mean absolute percentage error for the baseline scenario.
[0181] The mean absolute ozone prediction bias The calculation formula is:
[0182]
[0183] Relative mean absolute ozone prediction bias The calculation formula is:
[0184]
[0185] Among them, O 3j O represents the predicted ozone value for the j-th sample under sensitivity scenario Si. 3j BASE Let N represent the ozone prediction value of the j-th sample under the baseline scenario, and N represent the total number of samples.
[0186] Specifically, in this embodiment, the model performance deviation index and the ozone concentration prediction deviation index in step S5 are calculated using the following formulas:
[0187] (1) Model performance deviation index
[0188] Using the baseline scenario's sMAPE as a benchmark, a performance deviation index (PDI) is constructed to quantitatively characterize the model error fluctuation magnitude of each sensitive scenario relative to the standard scenario. The formula is as follows:
[0189]
[0190] Where Si represents the i-th sensitive scenario, sMAPE(Si) is the relative error of the corresponding scenario, and sMAPE(Base) is the baseline scenario error. A PDI greater than 0 indicates an increase in model error and a decrease in prediction performance; a PDI less than 0 indicates a narrowing of model error and an improvement in performance.
[0191] (2) Ozone concentration prediction deviation index
[0192] To quantify the impact of different data perturbation scenarios on ozone concentration prediction results, we constructed the average absolute ozone prediction bias and the relative average absolute ozone prediction bias indices:
[0193]
[0194]
[0195] in, The value represents the average absolute ozone prediction bias of the sensitivity scenario Si relative to the baseline scenario BASE, in ppb. This represents the relative mean absolute ozone prediction bias of the sensitivity scenario Si relative to the baseline scenario BASE, expressed in % (%). This represents the ozone prediction value of the j-th sample under sensitivity scenario Si; This represents the ozone prediction value of the j-th sample under the baseline scenario (BASE); N represents the number of samples included in the comparison. By comparing the ozone prediction values under different scenarios with the baseline scenario sample by sample, this index can characterize the overall magnitude of the disturbance caused by data perturbation to the ozone prediction results, and avoid the cancellation of positive and negative biases.
[0196] This embodiment uses the above three sets of indicators to achieve a standardized quantitative characterization of the prediction uncertainty of each sensitive scenario from two dimensions: the Performance Deviation Index (PDI) and the Concentration Deviation Amplitude (O3AbsDiff, O3AbsDev). The comparison of the PDI and O3AbsDev indices for the three scenarios is shown in Tables 5, 6 and 7, which fully reveals the ranking of the influence intensity of the three types of data disturbance factors—sample size, spatial distribution and pollution level structure—on the ozone prediction results.
[0197] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0198] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0199] It should be particularly noted that, through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, or of course, by hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0200] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for predicting and assessing the uncertainty of regional ozone concentration based on XGBoost, characterized in that, Includes the following steps: Step S1: Obtain ozone observation data and synchronous meteorological observation data from ground monitoring stations in the study area during the target time period. After data cleaning, feature extraction and variable transformation, construct a station-scale ozone-meteorological feature dataset. Step S2: Based on the ozone-meteorological feature dataset at the station scale, divide the training set and the independent test set. With the ozone concentration prediction value as the target variable and the meteorological features as the input variable, establish an ozone prediction XGBoost model. Evaluate the model performance through cross-validation and the independent test set to obtain the benchmark XGBoost model. Step S3: Obtain gridded meteorological data of the study area, preprocess the gridded meteorological data to make its input feature dimension consistent with the ozone-meteorological feature dataset at the station scale, input the preprocessed gridded meteorological data into the benchmark XGBoost model, perform ozone concentration prediction grid by grid, and output the gridded spatial distribution result of ozone concentration in the study area in multiple time series dimensions. Step S4: Set the benchmark XGBoost model as the benchmark scenario, and set multiple sensitivity test scenarios respectively; the sensitivity test scenarios include at least the training sample size gradient change scenario for simulating the effect of insufficient training sample size, the regional sample retention scenario for simulating the effect of uneven spatial distribution of sites, and the ozone pollution level sample retention scenario for simulating the effect of sample scarcity at extreme pollution levels. Step S5: For multiple sensitive test scenarios, construct an uncertainty assessment index system, which includes a model performance deviation index and an ozone concentration prediction deviation index; calculate the model performance deviation value and ozone concentration prediction deviation value of the sensitive test scenarios relative to the baseline scenario, and output the uncertainty assessment results caused by the sample size, spatial distribution and pollution level structure.
2. The method according to claim 1, characterized in that, The feature extraction and variable transformation in step S1 specifically include: Based on hourly ozone observation data, the daily maximum 8-hour moving average ozone concentration (MDA8 O3) was calculated as the target variable for model prediction. Hourly meteorological observation data are aggregated on a daily scale to calculate seven meteorological characteristic variables: daily average temperature, daily maximum temperature, daily maximum wind speed, daily average relative humidity, daily average surface air pressure, daily average boundary layer height, and daily cumulative precipitation. The wind direction angle variable, which is cyclically distributed in 360 degrees, is converted and calculated into two continuous characteristic variables: the sine component and the cosine component of the wind direction. A site-scale ozone-meteorological feature dataset was constructed, comprising ten dimensions including the MDA8 O3 prediction target variable and nine input feature variables.
3. The method according to claim 1, characterized in that, The step S2, which establishes the XGBoost prediction model, specifically includes: Using meteorological characteristics as input variables and MDA8 O3 as the prediction target variable, the hyperparameters of the XGBoost model are optimized by traversing the training set using a grid search algorithm. The hyperparameters include at least the number of decision trees, learning rate, maximum tree depth, minimum sample weight of child nodes, sample sampling ratio, feature sampling ratio, and L1 / L2 regularization coefficient. The stability of the model within the training set is verified using K-fold cross-validation, and the generalization performance of the XGBoost model is verified using the independent test set to obtain the benchmark XGBoost model. The performance evaluation of the XGBoost model adopts a multi-dimensional accuracy index, which includes the correlation coefficient R, root mean square error RMSE, mean absolute error MAE, normalized mean deviation NMB, and symmetric mean absolute percentage error sMAPE.
4. The method according to claim 1, characterized in that, Step S2 further includes: According to the Ambient Air Quality Standard GB 3095-2026, the concentration of MDA8 O3 is divided into three levels: Level 1 standard sample, Level 2 standard sample, and sample exceeding the standard. The prediction accuracy of the benchmark XGBoost model on samples of each pollution level was statistically analyzed to quantify the model's ability to identify different ozone pollution levels.
5. The method according to claim 1, characterized in that, Step S3 specifically includes: Obtain gridded reanalysis meteorological data covering the study area, and perform the same feature extraction and variable transformation processing on the gridded meteorological data as in step S1, so that the input feature dimension is consistent with the input feature dimension in the station-scale ozone-meteorological feature dataset; The preprocessed gridded meteorological data is input into the baseline XGBoost model grid by grid, and the ozone concentration prediction value of each grid cell is output to generate the daily-scale regional ozone concentration gridded prediction result. Based on the daily-scale gridded prediction results, the gridded spatial distribution results of regional ozone concentrations with seasonal average and / or annual average are generated through time aggregation calculations.
6. The method according to claim 1, characterized in that, The training sample size gradient change scenario in step S4 specifically includes: Set multi-gradient training sample ratios, and select training subsets of the baseline scenario as four gradients: 20%, 40%, 60%, and 80%. The corresponding XGBoost models are trained independently using the training subsets of the four gradients mentioned above, and the performance is evaluated using the independent test set to quantify the uncertainty of the prediction results caused by insufficient total sample size.
7. The method according to claim 1, characterized in that, The scenario for reserving regional samples in step S4 specifically includes: The study area was divided into several typical geographical sub-regions according to geographical zoning rules; A region-by-region hold-out validation strategy is adopted. Each time, all samples from one geographic sub-region are used as the test set, and samples from all other geographic sub-regions are used as the training set. Under the condition of keeping the model structure and hyperparameter configuration consistent with the baseline scenario, the XGBoost model under the corresponding region hold-out scenario is retrained. Leaveout operations are performed sequentially for each geographic sub-region, and the uncertainty caused by uneven spatial distribution of monitoring stations is quantified by cross-regional performance comparison.
8. The method according to claim 1, characterized in that, The ozone pollution level sample retention scenario in step S4 specifically includes: Three independent sample subsets were constructed by removing primary standard samples, secondary standard samples, or samples exceeding the pollution standard, respectively. The model was trained using samples from the remaining two grades as the training set, and tested and validated on the corresponding removed grade samples. By comparing and analyzing the prediction error, concentration deviation, and level identification accuracy of the XGBoost model under scenarios where samples of each pollution level are missing, this study aims to quantify the prediction uncertainty and systemic underestimation risk caused by the scarcity of samples at extreme pollution levels.
9. The method according to claim 1, characterized in that, The model performance deviation index and ozone concentration prediction deviation index in step S5 are calculated using the following formulas: The formula for calculating the Performance Deviation Index (PDI) is as follows: ; Where Si represents the i-th type of sensitive scenario. sMAPE(Base) represents the symmetrical mean absolute percentage error for this scenario, while sMAPE(Base) represents the symmetrical mean absolute percentage error for the baseline scenario. The mean absolute ozone prediction bias The calculation formula is: ; Relative mean absolute ozone prediction bias The calculation formula is: ; Among them, O 3j O represents the predicted ozone value for the j-th sample under sensitivity scenario Si. 3j BASE Let N represent the ozone prediction value of the j-th sample under the baseline scenario, and N represent the total number of samples.
