Weighted combination MIDAS carbon emission prediction method with error correction
By introducing autoregressive terms and GRU into the carbon emission prediction model, combined with weighting strategies and residual correction networks, the problem that single-variable linear models cannot capture the nonlinear effects of multiple factors is solved, and the accuracy and interpretation of carbon emission predictions are improved. ability.
Patent Information
- Application Number
- CN202410773414.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2024-10-01
AI Technical Summary
Existing carbon emission prediction models are mainly based on single-variable linear models, which cannot effectively capture the nonlinear effects of multiple factors on carbon emissions, resulting in insufficient prediction accuracy and explanation capabilities.
The weighted combined MIDAS model with error correction is used, and the AR-MIDAS combined forecast model is constructed by introducing autoregressive terms and gated recurrent units (GRU). It combines different weighting strategies and residual correction networks to handle long-term dependencies in time series. Relationships and non-linear characteristics.
It improves the accuracy and reliability of carbon emission predictions, enhances the explanatory power of the model, corrects prediction errors, and can more accurately capture the nonlinear change trend of carbon emissions.
Smart Images

Figure CN118735543A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of carbon emission prediction, and in particular to a weighted combined MIDAS carbon emission prediction method with error correction. Background Art
[0002] Global warming has become a major environmental problem facing the world today. The continued growth of carbon emissions is considered to be one of the main causes of global warming, of which energy consumption is the main source of carbon emissions. With the rapid economic growth, industrialization and urbanization have led to a surge in energy demand, and the extensive use of fossil fuels has caused greenhouse gas emissions such as carbon dioxide to continue to rise. Therefore, it is urgent to develop a method that can accurately predict carbon dioxide emissions to provide a scientific basis and action guide for responding to global warming.
[0003] Regarding the prediction of carbon emissions, existing scholars often use homogeneous data for modeling, and convert high-frequency data into low-frequency data by summing them up, which inevitably results in the loss of effective information carried by high-frequency data. In order to solve the modeling and prediction problems of mixed-frequency data, Ghysels et al. proposed the Mixed-frequency Data Sampling (MIDAS) model, which directly uses the original data to extract useful information from high-frequency and low-frequency variables, avoiding the loss of information caused by the homogeneity of variables, thereby improving the effectiveness of model estimation and the accuracy of prediction.
[0004] Chinese and foreign scholars have also achieved good results in the mixed frequency prediction of carbon emissions. Xu et al. used the MIDAS model to predict the annual carbon emissions of China's power industry and found that the MIDAS model has higher prediction accuracy than the autoregressive distributed lag model. Zhao et al. used a combined model of the MIDAS model and the back propagation (BP) neural network to predict the impact of GDP growth on carbon dioxide emissions. Qin Huaying et al. used the autoregressive MIDAS model to analyze the impact of high-frequency quarterly GDP on low-frequency carbon dioxide emissions. The results show the rationality of the MIDAS model in predicting carbon dioxide emissions.
[0005] However, most current studies tend to construct a univariate mixed data model based on a single variable to predict carbon emissions, but in reality, changes in carbon emissions are often affected by multiple factors. As the dimension of the variable increases, the nonlinear characteristics between variables become more significant. The mixed data model can only identify and capture the linear trend of carbon emissions changes, and the explanatory power of the model is weakened. Summary of the invention
[0006] The purpose of the present invention is to provide a weighted combination MIDAS carbon emissions prediction method with error correction in response to the deficiencies in the above-mentioned background technology, construct a combined prediction model of AR-MIDAS based on different weighting strategies, and seek the optimal model form for predicting China's carbon emissions; introduce a gated recurrent unit (GRU) into the mixed data prediction model to process the long-term dependencies in the time series, and deal with the nonlinear problems between variables, correct the prediction errors of the mixed data model, and thus improve the prediction accuracy of carbon emissions.
[0007] In order to achieve the above object, the present invention provides a weighted combined MIDAS carbon emissions prediction method with error correction, comprising the following steps:
[0008] S1: Obtain historical data on carbon emissions and macroeconomic indicators;
[0009] S2: preprocess the raw data;
[0010] S3: Using macroeconomic indicators as high-frequency independent variables and carbon emissions as low-frequency dependent variables, an AR-MIDAS model is constructed, and multiple single-variable AR-MIDAS models are combined for forecasting through different weighting strategies;
[0011] S4: The prediction error of the optimal combination model is used as the input of GRU, and the prediction result is corrected through the residual correction network model.
[0012] Furthermore, in step S1, obtaining historical data of carbon emissions and macroeconomic indicators refers to obtaining historical data of macroeconomic indicators from 1952 to 2022 from the National Bureau of Statistics, wherein the macroeconomic indicators include GDP, industrial added value, construction added value and transportation added value, and obtaining historical data of carbon dioxide emissions from 1952 to 2022 from Our World in Data.
[0013] Further, in step S2, the data preprocessing includes:
[0014] S21: Missing value detection and filling;
[0015] First, check whether there are missing values in the data set. If so, use the nearest neighbor interpolation method to fill the missing values to ensure the completeness of the data and the accuracy of the analysis;
[0016] S22: Outlier identification and processing;
[0017] By calculating the mean, standard deviation, median, quartile and other statistical indicators of the data, combined with visualization tools such as histograms and box plots, it is determined whether there are outliers in the data. If there are, the mean value correction method is used to eliminate the possible interference of outliers on subsequent analysis;
[0018] S23: Macroeconomic indicator conversion;
[0019] Considering that China only began to publish macroeconomic indicator data such as quarterly GDP, quarterly industrial value added, quarterly construction value added, and quarterly transportation value added in 1992, in order to expand the time range, the quadratic interpolation method was used to convert the annual macroeconomic indicator data from 1952 to 1992 into quarterly data, thereby enriching the data base;
[0020] S24: Calculation of year-on-year growth rate;
[0021] In order to capture the dynamic changing characteristics in the data, quantitatively analyze the changing trends of carbon emissions and related macroeconomic indicators, and calculate the year-on-year growth rates of carbon emissions and various macroeconomic indicators respectively, the year-on-year growth rates are obtained by comparing the percentage of data changes between the current period and the same period of the previous year to the data volume of the same period of the previous year. This processing method helps to eliminate the impact of seasonal fluctuations and long-term trends, making the data smoother and easier to analyze.
[0022] Furthermore, in step S3, the AR-MIDAS model is constructed with macroeconomic indicators as high-frequency independent variables and carbon emissions as low-frequency dependent variables, and multiple single-variable AR-MIDAS models are combined for prediction through different weighting strategies, including the following steps:
[0023] S31: Construct AR-MIDAS model;
[0024] The AR-MIDAS model takes into account the hysteresis effect of carbon emissions itself, which can be expressed as:
[0025]
[0026] Among them, y represents the year-on-year growth rate of carbon emissions, x represents the year-on-year growth rate of macroeconomic indicators, represents the polynomial function of the weight function and the lag operator, K is the maximum lag order of high-frequency data, L is the lag operator, m represents the frequency multiple difference between high-frequency data and low-frequency data, p is the autoregressive lag order, h is the forward prediction step size, α, β, λ are unknown parameters, μ~N(0,σ 2 ) is a random disturbance term;
[0027] The above formula indicates that the carbon emissions in year t depend on the carbon emissions in year p in the past and the changes in the corresponding macroeconomic indicators in the past K quarters;
[0028] The weight functions include: Almon weight function, ExpAlmon weight function, Beta weight function, BetaNN weight function, unrestricted weight function and piecewise function (Step) weight.
[0029] S32: Construct weighted combination MIDAS model;
[0030] The expression of the combined prediction model is as follows:
[0031]
[0032] In the formula, Represents the combined prediction result, measured by the sum of N weighted individual predictions, is the nth result predicted at time t, w n,t Represents the weight of a single prediction result;
[0033] Weighting strategies include the following:
[0034] AIC weighted method:
[0035]
[0036] BIC weighted method:
[0037]
[0038] MSFE weighted method and DMSFE weighted method:
[0039]
[0040] in, t0 corresponds to the starting point of the out-of-sample forecast, y s and Represent the actual value and predicted value of carbon emissions respectively. When δ=1, w n,t represents the MSFE weight. When δ=0, w n,t Represents the DMSFE weight.
[0041] Furthermore, in step S4, the prediction error of the optimal combination model is used as the input of the GRU, and the prediction result is corrected by the residual correction network model, including the following steps:
[0042] S41: Select the optimal combined prediction model;
[0043] The root mean square error (RMSE) is used to compare the prediction accuracy of the combined models based on different weighting strategies, and the model with the smallest RMSE is selected as the optimal combined prediction model. The expression of RMSE is:
[0044]
[0045] In the formula, y s and Represent the actual and predicted values of carbon emissions respectively;
[0046] S42: Error correction based on GRU model;
[0047] Subtract the prediction result of the optimal combination prediction model from the original data to obtain an error sequence, use the error sequence as the input of the GRU model, output the error prediction value, superimpose the error prediction value with the prediction value of the optimal combination model to obtain the final prediction result, and complete the error correction;
[0048] The GRU error correction model specifically uses the following formula:
[0049] z t =σ(w z ·[h t-1 ,x t ])
[0050] r t =σ(w r ·[h t-1 ,x t ])
[0051]
[0052]
[0053] Among them, z t and r t Represent the reset gate and update gate respectively, x t is the input data at time t, h t and are the hidden layer state and candidate hidden layer state at time t, σ is the activation function, w r and w z They are r t and z t The weight matrix of .
[0054] Compared with the prior art, the significant advantages of the present invention are embodied in the following aspects:
[0055] 1. Taking into account the hysteresis effect of carbon emissions themselves, the present invention introduces an autoregressive term into the traditional MIDAS model and constructs an AR-MIDAS model to capture the impact of past carbon emission levels on current carbon emissions, thereby improving the accuracy of prediction.
[0056] 2. Since the fluctuation of carbon emissions is affected by many factors, in order to reduce the risk of prediction errors, the present invention constructs a combined prediction model of AR-MIDAS based on different weighting strategies, extracts and integrates prediction information from single variable models, improves the accuracy of prediction, and increases the reliability of prediction results;
[0057] 3. As the dimension of variables increases, the nonlinear characteristics between variables become more and more obvious. The mixed data model can only identify and capture the linear trend of changes in carbon emissions. Based on this, the present invention introduces GRU into the mixed data model, so that the model can capture the nonlinear characteristics of carbon emissions, and effectively handle the long-term dependencies in the time series, correct the prediction error of the mixed data model, and thus improve the prediction accuracy of carbon emissions.
[0058] The technical solution of the present invention is further described in detail below through the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 The present invention is a flow chart of the method. DETAILED DESCRIPTION
[0060] The specific embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings, and technical members of the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. It should be emphasized that the described embodiments are only a part of the embodiments of the present disclosure. The present invention can also be applied through other different implementation methods. Without departing from the basic concept of the present invention, the various details in this specification can also be adjusted or changed accordingly based on different viewpoints and applications. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in the art without making creative work are within the scope of protection of the present disclosure.
[0061] As shown in the figure, an embodiment of the present invention provides a weighted combined MIDAS carbon emissions prediction method with error correction, comprising the following steps:
[0062] S1: Obtain historical data on carbon emissions and macroeconomic indicators;
[0063] The historical data of macroeconomic indicators from 1952 to 2022 are obtained from the National Bureau of Statistics, wherein the macroeconomic indicators include GDP, industrial value added, construction value added and transportation value added; the historical data of carbon dioxide emissions from 1952 to 2022 are obtained from Our World in Data; the in-sample estimation interval selected in the present invention is from 1952 to 2002, and the out-of-sample prediction interval is from 2003 to 2022.
[0064] S2: preprocess the raw data;
[0065] S21: Missing value detection and filling;
[0066] First, check whether there are missing values in the data set. If so, use the nearest neighbor interpolation method to fill the missing values to ensure the completeness of the data and the accuracy of the analysis;
[0067] S22: Outlier identification and processing;
[0068] By calculating the mean, standard deviation, median, quartile and other statistical indicators of the data, combined with visualization tools such as histograms and box plots, it is determined whether there are outliers in the data. If there are, the mean value correction method is used to eliminate the possible interference of outliers on subsequent analysis;
[0069] S23: Macroeconomic indicator conversion;
[0070] Considering that China only began to publish macroeconomic indicator data such as quarterly GDP, quarterly industrial value added, quarterly construction value added, and quarterly transportation value added in 1992, in order to expand the time range, the quadratic interpolation method was used to convert the annual macroeconomic indicator data from 1952 to 1992 into quarterly data, thereby enriching the data base;
[0071] S24: Calculation of year-on-year growth rate;
[0072] In order to capture the dynamic changing characteristics in the data, quantitatively analyze the changing trends of carbon emissions and related macroeconomic indicators, and calculate the year-on-year growth rates of carbon emissions and various macroeconomic indicators respectively, the year-on-year growth rates are obtained by comparing the percentage of data changes between the current period and the same period of the previous year to the data volume of the same period of the previous year. This processing method helps to eliminate the impact of seasonal fluctuations and long-term trends, making the data smoother and easier to analyze.
[0073] S3: Using macroeconomic indicators as high-frequency independent variables and carbon emissions as low-frequency dependent variables, an AR-MIDAS model is constructed. Multiple single-variable AR-MIDAS models are combined for forecasting through different weighting strategies, including the following steps:
[0074] S31: Construct AR-MIDAS model;
[0075] The basic MIDAS (m, K) model uses a lagged weighted polynomial function to perform a weighted summation of high-frequency data to achieve the interpretation and prediction of low-frequency data. Since the acquisition of annual data has a certain time lag, for example, the carbon emission data for 2012 will not be available until 2013, the h-step forward prediction MIDAS (m, K, h) model can use quarterly data to make real-time forecasts and multi-period forecasts for annual data, and use the latest published quarterly data to correct the forecast and predicted values of annual carbon emissions. h = 1 means that the information of the first three quarters of the tth year is applied to the forecast of carbon emissions for this year. When h>4, the MIDAS (m, K, h) model can predict carbon emissions after t years, and use the quarterly data of t years to correct the forecast after t years.
[0076] At the same time, the lag effect of carbon emissions itself is taken into account, that is, when using high-frequency macroeconomic indicators to predict the growth rate of carbon emissions, the autoregressive term of the explained variable is added to construct the AR-MIDAS model. The model expression is as follows:
[0077]
[0078] Among them, y represents the year-on-year growth rate of carbon emissions, x represents the year-on-year growth rate of macroeconomic indicators, represents the polynomial function of the weight function and the lag operator, K is the maximum lag order of high-frequency data, L is the lag operator, m represents the frequency multiple difference between high-frequency data and low-frequency data. In this embodiment, the frequency multiple difference between annual carbon emissions and quarterly macroeconomic indicators is 4, that is, m = 4, p is the autoregressive lag order, h is the forward prediction step size, α, β, λ are unknown parameters, μ~N(0,σ 2 ) is a random disturbance term.
[0079] The above formula indicates that the carbon emissions in year t depend on the carbon emissions in year p and the changes in the corresponding macroeconomic indicators in the past K quarters.
[0080] The weight functions include six types: Almon weight function, ExpAlmon weight function, Beta weight function, BetaNN weight function, unrestricted weight function and piecewise function (Step) weight.
[0081] S32: Construct weighted combination MIDAS model;
[0082] In order to reduce the risk of prediction errors, multiple single-variable AR-MIDAS models are combined for prediction. The combined prediction model extracts and fuses prediction information from single-variable models to improve the accuracy of predictions and increase the reliability of prediction results. The expression of the combined prediction model is as follows:
[0083]
[0084] In the formula, Represents the combined prediction result, measured by the sum of N weighted individual predictions, is the nth result predicted at time t, w n,t Represents the weight of a single prediction result.
[0085] Weighting strategies include the following:
[0086] AIC weighted method:
[0087]
[0088] BIC weighted method:
[0089]
[0090] AIC and BIC are statistical criteria for model selection and are used to compare the advantages and disadvantages of different models. The smaller the value of both, the better the model.
[0091] MSFE weighted method and DMSFE weighted method:
[0092]
[0093] in, t0 corresponds to the starting point of the out-of-sample forecast, y s and Represent the actual value and predicted value of carbon emissions respectively. When δ=1, w n,t represents the MSFE weight. When δ=0, w n,t Represents the DMSFE weight.
[0094] S4: The prediction error of the optimal combination model is used as the input of GRU, and the prediction result is corrected through the residual correction network model, including the following steps:
[0095] S41: Select the optimal combined prediction model;
[0096] The root mean square error (RMSE) is used to compare the prediction accuracy of the combined models based on different weighting strategies, and the model with the smallest RMSE is selected as the optimal combined prediction model. The expression of RMSE is:
[0097]
[0098] In the formula, y s and Represent the actual and predicted values of carbon emissions respectively.
[0099] S42: Error correction based on GRU model;
[0100] The prediction result of the optimal combination prediction model is subtracted from the original data to obtain an error sequence, which is used as the input of the GRU model, and an error prediction value is output. The error prediction value is superimposed with the prediction value of the optimal combination model to obtain the final prediction result, thus completing the error correction.
[0101] GRU is an improved model of RNN (recurrent neural network). It controls the update of hidden state through reset gate and update gate. The reset gate determines how much past information is forgotten, and the update gate determines how much past state information is retained. This gating mechanism enables GRU to process long sequence data more effectively and avoid the gradient vanishing problem. The GRU error correction model specifically adopts the following formula:
[0102] z t =σ(w z ·[h t-1 ,x t ])
[0103] r t =σ(w r ·[h t-1 ,x t ])
[0104]
[0105]
[0106] Among them, z t and r t Represent the reset gate and update gate respectively, x t is the input data at time t, h t and are the hidden layer state and candidate hidden layer state at time t, σ is the activation function, w r and w z They are r t and z t The weight matrix of .
[0107] The present invention takes into account the lag effect of carbon emissions themselves, introduces autoregressive terms into the traditional MIDAS model, constructs an AR-MIDAS model, captures the impact of past carbon emission levels on current carbon emissions, and thus improves the accuracy of prediction; the present invention constructs a combined prediction model of AR-MIDAS based on different weighting strategies, extracts and fuses prediction information from single variable models, improves prediction accuracy, and increases the reliability of prediction results; the present invention introduces GRU into the mixed data prediction model to make up for the defect that the mixed data model can only identify and capture linear trends, effectively handles long-term dependencies in time series, and corrects the prediction errors of the mixed data model, thereby improving the prediction accuracy of carbon emissions.
[0108] The above is a detailed description of the embodiments of the present invention. For ordinary technicians in this technical field, after understanding the basic principles of the present invention, they can make various modifications, equivalent substitutions, improvements, etc. to the present invention without departing from the concept of the present invention, which should all be included in the protection scope of the present invention.
Claims
1. A weighted combined MIDAS carbon emissions prediction method with error correction, characterized in that: The steps include: S1: Obtain historical data on carbon emissions and macroeconomic indicators; S2: preprocess the raw data; S3: Using macroeconomic indicators as high-frequency independent variables and carbon emissions as low-frequency dependent variables, an AR-MIDAS model is constructed, and multiple single-variable AR-MIDAS models are combined for forecasting through different weighting strategies; S4: The prediction error of the optimal combination model is used as the input of GRU, and the prediction result is corrected through the residual correction network model.
2. The weighted combination MIDAS carbon emissions prediction method with error correction according to claim 1 is characterized in that: In step S1, historical data of macroeconomic indicators from 1952 to 2022 are obtained from the National Bureau of Statistics, where the macroeconomic indicators include GDP, industrial added value, construction added value, and transportation added value, and historical data of carbon dioxide emissions from 1952 to 2022 are obtained from Our World in Data.
3. The weighted combination MIDAS carbon emissions prediction method with error correction according to claim 1 is characterized in that: The data preprocessing in step S2 includes: S21: Missing value detection and filling; Check if there are any missing values in the data set. If so, use the nearest neighbor interpolation method to fill in the missing values; S22: Outlier identification and processing; By calculating the mean, standard deviation, median, quartile and other statistical indicators of the data, combined with visualization tools such as histograms and box plots, it is determined whether there are outliers in the data. If there are, the mean value correction method is used to process them; S23: Macroeconomic indicator conversion; Considering that China only started to publish macroeconomic indicator data such as quarterly GDP, quarterly industrial value added, quarterly construction value added, and quarterly transportation value added in 1992, in order to expand the time range, the quadratic interpolation method was used to convert the annual macroeconomic indicator data from 1952 to 1992 into quarterly data; S24: Calculation of year-on-year growth rate; In order to quantitatively analyze the changing trends of carbon emissions and related macroeconomic indicators, the year-on-year growth rates of carbon emissions and various macroeconomic indicators were calculated respectively. The year-on-year growth rates were obtained by comparing the percentage of the data change between the current period and the same period of the previous year to the data volume of the same period of the previous year.
4. The weighted combined MIDAS carbon emissions prediction method with error correction according to claim 1 is characterized in that: The step S3 specifically includes the following: S31: Construct AR-MIDAS model; The AR-MIDAS model takes into account the hysteresis effect of carbon emissions itself, which can be expressed as: Among them, y represents the year-on-year growth rate of carbon emissions, x represents the year-on-year growth rate of macroeconomic indicators, represents the polynomial function of the weight function and the lag operator, K is the maximum lag order of high-frequency data, L is the lag operator, m represents the frequency multiple difference between high-frequency data and low-frequency data, p is the autoregressive lag order, h is the forward prediction step size, α, β, λ are unknown parameters, μ~N(0,σ 2 ) is a random disturbance term; The above formula indicates that the carbon emissions in year t depend on the carbon emissions in year p in the past and the changes in the corresponding macroeconomic indicators in the past K quarters; The weight functions include: Almon weight function, ExpAlmon weight function, Beta weight function, BetaNN weight function, unrestricted weight function and piecewise function (Step) weight. S32: Construct weighted combination MIDAS model; The expression of the combined prediction model is as follows: In the formula, Represents the combined prediction result, measured by the sum of N weighted individual predictions, is the nth result predicted at time t, w n,t Represents the weight of a single prediction result; Weighting strategies include the following: AIC weighted method: BIC weighted method: MSFE weighted method and DMSFE weighted method: in, t0 corresponds to the starting point of the out-of-sample forecast, y s and Represent the actual value and predicted value of carbon emissions respectively. When δ=1, w n,t represents the MSFE weight. When δ=0, w n,t Represents the DMSFE weight.
5. The weighted combination MIDAS carbon emissions prediction method with error correction according to claim 1 is characterized in that: The step S4 specifically includes the following: S41: Select the optimal combined prediction model; The root mean square error (RMSE) is used to compare the prediction accuracy of the combined models based on different weighting strategies, and the model with the smallest RMSE is selected as the optimal combined prediction model. The expression of RMSE is: In the formula, y s and Represent the actual and predicted values of carbon emissions respectively; S42: Error correction based on GRU model; Subtract the prediction result of the optimal combination prediction model from the original data to obtain an error sequence, use the error sequence as the input of the GRU model, output the error prediction value, superimpose the error prediction value with the prediction value of the optimal combination model to obtain the final prediction result, and complete the error correction; The GRU error correction model specifically uses the following formula: z t =σ(w z ·[h t-1 ,x t ]) r t =σ(w r ·[h t-1 ,x t ]) Among them, z t and r t Represent the reset gate and update gate respectively, x t is the input data at time t, h t and are the hidden layer state and candidate hidden layer state at time t, σ is the activation function, w r and w z They are r t and z t The weight matrix of .
