Flight data prediction method based on bidirectional time series regression model
By dividing flight data into horizontal and vertical time series, combining ARIMA and multivariate linear regression models for weighting processing, the problem of prediction deviation of single mathematical model is solved, the prediction accuracy of flight occupancy is improved, and airlines are helped to optimize resource allocation and Improve operational level.
Patent Information
- Application Number
- CN202410693183.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2024-11-26
AI Technical Summary
In the prior art, a single mathematical model has a large deviation from the prediction results of flight historical occupancy, making it difficult to accurately predict flight occupancy.
The flight data prediction method based on the two-way time series regression model is adopted. By dividing historical flight data into horizontal and vertical time series data, the ARIMA model and the multivariate linear regression model are established respectively, and weighted processing is carried out to improve the prediction accuracy.
It significantly improves the accuracy of flight occupancy prediction, helps airlines and related companies better understand market demand, optimize resource allocation, and improve operational level.
Smart Images

Figure CN119027296A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of aviation information technology, and more specifically to a flight data prediction method based on a bidirectional time series regression model. Background Art
[0002] As a key indicator to measure the operating efficiency of airlines, the load factor is of great significance for improving the airline's capacity utilization, optimizing route resource allocation and maintaining service quality. If the load factor is not high, the airline's capacity and route resources are not fully utilized. If the load factor is too high, it will lead to a decline in service quality and passenger loss. In the general environment, the load factor is affected by many factors, including: ticket prices, company and route brands, flight schedules, seasons, passenger plans, etc. In actual operations, airlines will balance flight load factors through profits and losses. In general, in order to ensure a certain level of operating efficiency and flight service quality at the same time, airlines will control the actual flight load factor within a certain range, that is, the number of seats available on the flight is less than the passenger demand limit, and the company's expected profit reaches the break-even point. The load factor. Therefore, in real life, predicting flight load factors is crucial, which is very helpful for improving airline revenue management and passenger service quality. Summary of the invention
[0003] In view of this, the purpose of the present invention is to provide a flight data prediction method based on a bidirectional time series regression model, so as to solve the technical problem that the prediction results of the historical flight occupancy rate by a single mathematical model in the prior art have large deviations.
[0004] To achieve the above object, the present invention provides the following technical solutions:
[0005] A flight data prediction method based on a bidirectional time series model comprises the following steps:
[0006] S1. Obtain historical flight data, select time variables and passenger load factor variables for two-way time series analysis, and divide the historical flight data into horizontal time series data and vertical time series data;
[0007] S2, preprocessing the horizontal time series data and the vertical time series data respectively;
[0008] S3, performing data verification on the horizontal time series data after data preprocessing to obtain the verified horizontal time series data;
[0009] S4. Preliminarily establish the ARIMA model, and preliminarily determine the order of the parameters of the ARIMA model based on the autocorrelation diagram and partial autocorrelation diagram of the horizontal time series data after the test, and then accurately determine the order of the parameters of the preliminarily determined ARIMA model using the minimum BIC criterion;
[0010] S5, fitting the ARIMA model after the precise order determination in step S4, and performing a residual test, using the ARIMA model after the residual test to predict the occupancy rate, and outputting the predicted value of the occupancy rate by the ARIMA model;
[0011] S6. Performing data verification on the longitudinal time series data, and using the longitudinal time series data to train a multivariate linear regression model to obtain a time series regression model, and using the time series regression model to predict the passenger load factor;
[0012] S7. Weight the predicted value of the occupancy rate by the ARIMA model and the predicted value of the occupancy rate by the time series regression model to obtain the final predicted value of the occupancy rate.
[0013] Furthermore, the data preprocessing in step S1 includes one or more of deletion method, mean interpolation method, forward filling and backward filling method, linear interpolation method, K nearest neighbor interpolation method, regression interpolation method, multiple interpolation method, and expert knowledge filling method.
[0014] Further, the horizontal time series data is: flight occupancy rate data whose collection date is the flight departure date;
[0015] The longitudinal time series data is: flight occupancy rate data collected from seven days to one day before the flight departure date.
[0016] Furthermore, the data test in step S3 specifically includes: a stationarity test and a pure randomness test;
[0017] The ADF test method is used to test the stationarity of the horizontal time series data. For unstable horizontal time series data, differential processing is performed to obtain stable horizontal time series data; pure randomness is used to test the pure randomness in the horizontal time series data.
[0018] Furthermore, in step S5, the ARIMA model after accurate order determination in step S4 is fitted, and a residual test is performed, specifically:
[0019] Test whether the residuals of the ARIMA model after fitting are white noise sequences. If the residuals meet the requirements of white noise sequences, the modeling is terminated. Perform an autocorrelation test on the residuals. When there is no autocorrelation in the residuals, draw a normal QQ graph for the residuals. When most of the data in the normal QQ graph fall on the straight line, it means that the ARIMA model has passed the normality verification. Use the ARIMA model to predict the occupancy rate.
[0020] Furthermore, in step S6, the longitudinal time series data is subjected to data verification, specifically, the maximum and average values of the longitudinal time series data are calculated to obtain a verification value.
[0021] Furthermore, in step S7, the predicted value of the occupancy rate by the ARIMA model and the predicted value of the occupancy rate by the time series regression model are weighted, and the weighting method includes: adjusting and optimizing the weights by using one or more of equal weight weighting, variance weighting, and mean absolute error weighting.
[0022] Furthermore, in step S6, the longitudinal time series data is used to train a multivariate linear regression model, specifically including:
[0023] The longitudinal time series data is divided into training set and test set in proportion, and the training set is used to train the multivariate linear regression model;
[0024] The test set is used to evaluate the prediction performance of the multivariate linear regression model for passenger load factor.
[0025] Furthermore, the longitudinal time series data is divided into a training set and a test set in proportion, specifically including: the training set is the flight occupancy rate from seven days before the flight departure date to one day before the departure date; the test set is the flight occupancy rate on the departure day.
[0026] According to the specific embodiment provided by the present invention, the present application divides the flight history sequence data into a horizontal data sequence and a vertical data sequence respectively, establishes an ARIMA model using the horizontal time series data, and predicts the flight occupancy rate of the next departure day with the occupancy rate result collected on the departure day, and uses the time series regression model constructed by the vertical time series data to predict the occupancy rate collected on the departure day of the flight based on the occupancy rate collected seven days to the day before the flight, and weights the prediction results of the two to obtain the final prediction value, which greatly improves the accuracy of the occupancy rate prediction; and effectively helps civil aviation practitioners to perceive market demand in advance, thereby improving the level of corporate revenue management and providing decision-making support for operating departments at all levels. At the same time, accurate flight occupancy rate prediction results help civil aviation-related companies such as airlines, ticket agents, and aircraft manufacturers to have a deeper understanding of market demand, optimize resource allocation, and improve the overall operation level. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0028] The flight data prediction method based on the bidirectional time series regression model of the present invention is further described below in conjunction with the accompanying drawings;
[0029] Figure 1 It is a general flow chart of the flight data prediction method based on the bidirectional time series regression model provided by the present invention;
[0030] Figure 2 It is a historical flight data graph in the flight data prediction method based on the bidirectional time series regression model provided by the present invention;
[0031] Figure 3 It is a horizontal and vertical data graph in the flight data prediction method based on the bidirectional time series regression model provided by the present invention;
[0032] Figure 4 It is a matrix diagram of missing values of longitudinal flight data in the flight data prediction method based on the bidirectional time series regression model provided by the present invention;
[0033] Figure 5 It is a heat map of missing values of longitudinal flight data in the flight data prediction method based on the bidirectional time series regression model provided by the present invention;
[0034] Figure 6 It is a comparison diagram before and after missing value supplementation in the flight data prediction method based on the bidirectional time series regression model provided by the present invention;
[0035] Figure 7 It is an ACF graph in the flight data prediction method based on the bidirectional time series regression model provided by the present invention;
[0036] Figure 8 It is a PACF diagram in the flight data prediction method based on the bidirectional time series regression model provided by the present invention;
[0037] Fig. 9 It is a residual QQ graph in the flight data prediction method based on the bidirectional time series regression model provided by the present invention;
[0038] Fig.10 It is a comparison chart of the actual value and the predicted value in the flight data prediction method based on the bidirectional time series regression model provided by the present invention;
[0039] Fig.11 It is a scatter plot of flight occupancy rate data in the flight data prediction method based on the bidirectional time series regression model provided by the present invention;
[0040] Fig.12 It is a comparison chart of the predicted value of the ARIMA model and the true value in the flight data prediction method based on the two-way time series regression model provided by the present invention;
[0041] Fig.13 It is a comparison chart of the predicted value and the actual value of the time series regression model for the next ten days in the flight data prediction method based on the two-way time series regression model provided by the present invention;
[0042] Fig.14 The comparison between the weighted predicted value and the actual value for the next ten days in the flight data prediction method based on the bidirectional time series regression model provided by the present invention Figure 1 ;
[0043] Fig.15 The comparison between the weighted predicted value and the actual value for the next ten days in the flight data prediction method based on the bidirectional time series regression model provided by the present invention Figure 2 . DETAILED DESCRIPTION
[0044] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0045] In order to better understand the purpose, structure and function of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings.
[0046] like Figure 1 As shown, the present invention provides a flight data prediction method based on a bidirectional time series regression model, comprising the following steps:
[0047] S1. Obtain historical flight data, select time variables and passenger load factor variables for two-way time series analysis, and divide the historical flight data into horizontal time series data and vertical time series data;
[0048] S2, preprocessing the horizontal time series data and the vertical time series data respectively;
[0049] S3, performing data verification on the horizontal time series data after data preprocessing to obtain the verified horizontal time series data;
[0050] S4. Preliminarily establish the ARIMA model, and preliminarily determine the order of the parameters of the ARIMA model based on the autocorrelation diagram and partial autocorrelation diagram of the horizontal time series data after the test, and then accurately determine the order of the parameters of the preliminarily determined ARIMA model using the minimum BIC criterion;
[0051] S5, fitting the ARIMA model after the precise order determination in step S4, and performing a residual test, using the ARIMA model after the residual test to predict the occupancy rate, and outputting the predicted value of the occupancy rate by the ARIMA model;
[0052] S6. Performing data verification on the longitudinal time series data, and using the longitudinal time series data to train a multivariate linear regression model to obtain a time series regression model, and using the time series regression model to predict the passenger load factor;
[0053] It should be noted that the multiple linear regression model is an effective research method for time series forecasting. It can be used to explore and model the relationship between multiple independent variables and one dependent variable, and can perform parameter estimation and model evaluation through statistical methods.
[0054] S7. Weight the predicted value of the occupancy rate by the ARIMA model and the predicted value of the occupancy rate by the time series regression model to obtain the final predicted value of the occupancy rate.
[0055] The data preprocessing in step S1 includes one or more of deletion method, mean interpolation method, forward filling and backward filling method, linear interpolation method, K nearest neighbor interpolation method, regression interpolation method, multiple interpolation method, and expert knowledge filling method.
[0056] The horizontal time series data is: flight occupancy rate data whose collection date is the flight departure date;
[0057] The longitudinal time series data is: flight occupancy rate data collected from seven days to one day before the flight departure date.
[0058] The data test in step S3 specifically includes: a stationarity test and a pure randomness test;
[0059] The ADF test method is used to test the stationarity of the horizontal time series data. For unstable horizontal time series data, differential processing is performed to obtain stable horizontal time series data; pure randomness is used to test the pure randomness in the horizontal time series data.
[0060] In step S5, the ARIMA model after accurate order determination in step S4 is fitted, and a residual test is performed, specifically:
[0061] Test whether the residuals of the ARIMA model after fitting are white noise sequences. If the residuals meet the requirements of white noise sequences, the modeling is terminated. Perform an autocorrelation test on the residuals. When there is no autocorrelation in the residuals, draw a normal QQ graph for the residuals. When most of the data in the normal QQ graph fall on the straight line, it means that the ARIMA model has passed the normality verification. Use the ARIMA model to predict the occupancy rate.
[0062] In step S6, the longitudinal time series data is subjected to data verification, specifically, the maximum and average values of the longitudinal time series data are calculated to obtain a verification value.
[0063] In step S7, the predicted value of the occupancy rate by the ARIMA model and the predicted value of the occupancy rate by the time series regression model are weighted, and the weighting method includes: using one or more of equal weight weighting, variance weighting, and mean absolute error weighting to adjust and optimize the weights.
[0064] In step S6, the multivariate linear regression model is trained using the longitudinal time series data, specifically including:
[0065] The longitudinal time series data is divided into training set and test set in proportion, and the training set is used to train the multivariate linear regression model;
[0066] The test set is used to evaluate the prediction performance of the multivariate linear regression model for passenger load factor.
[0067] Furthermore, the longitudinal time series data is divided into a training set and a test set in proportion, specifically including: the training set is the flight occupancy rate from seven days before the flight departure date to one day before the departure date; the test set is the flight occupancy rate on the departure day.
[0068] The present application also provides the following embodiments:
[0069] Embodiment 1:
[0070] The flight history sequence data used in this application is as follows Figure 2 As shown, the flight MF8789 with the most complete data is analyzed. The data includes fields such as flight number, flight departure date, collection date, flight occupancy rate, flight segment, etc. The program collects data at four times every day: 8:00, 10:30, 13:00, and 16:00. In order to make the data more comprehensive and the modeling more accurate, the present invention uniformly selects the data collected at 16:00 for analysis.
[0071] The flight data for Harbin-Hangzhou, with a time range from January 1, 2023 to March 31, 2023, select the time variable and flight load factor variable in all fields for two-way time series analysis, and divide this data into horizontal and vertical, such as Figure 3 As shown, the specific data is shown in the following matrix (1). It can be seen that the longitudinal time series is the flight occupancy rate from seven days before the departure date to the day before the departure date, and the horizontal time series is the flight occupancy rate on the departure day; when conducting a two-way time series analysis, from a longitudinal perspective, the occupancy rate collected on the departure day is the response variable. Since the occupancy rate is collected from seven days before the flight departure, the occupancy rate collected from seven days to one day before the departure is the predictor variable. The time series vector is constructed, and each column in the matrix constitutes a longitudinal time series. For example, the first column is the flight occupancy rate from January 1, 2023 to January 8, 2023. The flight occupancy rate from January 1 to January 7 is used to predict the occupancy rate on January 8, so as to conduct an analysis. From a horizontal perspective, the last row in the matrix is the flight occupancy rate data from January 8, 2023 to March 31, 2023. According to the sales law of the flight on the departure day, the time series analysis is conducted with the time variable and the flight occupancy rate on the departure day. After the two-way time series analysis, the results are weighted to make the final prediction and thus draw conclusions.
[0072] Matrix (1)
[0073]
[0074] Preprocess the flight history sequence data:
[0075] This application first detects abnormal values and missing values in the flight history sequence data, removes abnormal data according to the software, and then processes the missing values. For the data analyzed horizontally, the occupancy rate of the flight results on the day of departure is processed. It can be known that the selected flight MF8789 has a total of 83 data, of which the number of samples containing missing values accounts for 2.4% of the total number of samples, which is a small proportion, so it is supplemented with the mean before and after. For the data analyzed vertically, the proportion of missing values in the occupancy rate from one to seven days before departure and on the day of departure accounts for 13.25%. The missing values are visualized using the missing value matrix, as shown in Figure 4 As shown in the figure, the white part is the missing value. It can be observed that the passenger load factor from five days before departure to the day of departure is missing to a certain extent, and accounts for a certain proportion, so this missing value cannot be ignored. The missing value is visualized using a heat map, as shown below. Figure 5 As shown, the correlation between the missing values can be seen. In the present invention, in order to better adapt to the actual situation and better perform subsequent modeling, multiple interpolation method is selected to supplement the missing values. The box plots before and after the missing value supplementation are as follows Figure 6 As shown, it can be seen that there is no significant change before and after supplementing the missing values, and subsequent modeling can be carried out.
[0076] Perform data verification on horizontal data:
[0077] (1) Stability test
[0078] In the time series model, the data must first be tested for stationarity. If it is non-stationary, it is pre-processed to make it a stationary time series. Stationary time series usually show the characteristics of fluctuations along its mean, but non-stationary data often have different trends and different means. The present invention uses the ADF test method to judge it. If the time series is not stationary, it is further differentiated, and if it is stable, it continues to be modeled. The results are shown in Table 1. After the original data is tested by ADF, the statistical values of rejecting the original hypothesis at three levels of 1%, 5%, and 10% are compared with ADF Test result. It can be seen that the ADF Test result is less than these three values at the same time, indicating that the hypothesis is rejected very well. And the p value is required to be less than the given significance level. Here, the p value is less than 0.05, indicating that the horizontal data is stationary.
[0079] Table 1
[0080]
[0081] (2) Pure randomness test
[0082] Next, we need to conduct a pure randomness test on the data, that is, a white noise test. When the data is pure random data, it is meaningless to analyze the data. In order to make the modeling and prediction more accurate, we will test whether the data is purely random. The test results are as follows, as shown in Table 2. From the results, we can see that the p-values of the first-order difference are very small, so the data rejects the original hypothesis and believes that the data is not pure random data, so it can be used for time series analysis.
[0083] Table 2
[0084]
[0085] Model order determination:
[0086] For the ARIMA (p, d, q) model, parameter selection is very important. Therefore, through the above data processing and comparison before and after difference, we can know that the original data before difference is stable, so d = 0.
[0087] Next, we will judge p and q by observing the autocorrelation graph and the partial autocorrelation graph. If the autocorrelation graph shows tailing and the partial autocorrelation graph is p-order truncated, the AR(p) model should be selected for modeling. When the autocorrelation graph is truncated at the q-order and the partial autocorrelation graph shows tailing, the model should be MA(q). If both the autocorrelation graph and the partial autocorrelation graph show tailing, the most significant order in the ACF graph can be used as the q value, and the most significant order in the PACF can be selected as the p value, and finally the ARMA(p,q) model can be established. If both the autocorrelation graph and the partial autocorrelation graph show truncated tailing, it means that it is not suitable to establish an ARMA model.
[0088] When p and q are determined, the ACF and PACF diagrams of the horizontal flight load factor series are as follows: Figure 7 and Figure 8 As shown in the figure, combined with the range of the autocorrelation coefficient and the partial autocorrelation coefficient in the confidence interval, it can be seen that the ACF is tailing, and the PACF coefficient of the flight load factor series has the property of first-order truncation. Therefore, p=1,q=0 can be selected.
[0089] In order to make the model more accurate, the minimum BIC criterion is used to determine the order, and p and q with the smallest BIC are selected. When p is 1 and q is 0, the BIC is the smallest, which is -190.982. Based on the above, the model is determined to be an AR(1) model, that is, ARIMA(1,0,0). This model will be used for prediction and result comparison later.
[0090] Fit the ARIMA model after precise order determination, perform residual test, and use the ARIMA model after residual test for prediction, specifically:
[0091] The values of model p, d, and q can be obtained by determining the model order, and the degree of model fit can be verified by parameter test. The model parameters are obtained by fitting the data based on the ARIMA (1, 0, 0) model, and then tested. It can be seen that the significance test has passed. The results of the ARIMA (1, 0, 0) model are shown in Tables 3 and 4 below.
[0092] Table 3
[0093]
[0094] Table 4
[0095]
[0096] Residual test:
[0097] After the model is established, some tests need to be performed on the residuals. First, a white noise test is performed on it. In the ARIMA model, the residuals are assumed to be Gaussian white noise sequences. Therefore, when the ARIMA model is used to fit the data, the estimated sequence of the residuals needs to be tested by LB after fitting to determine whether it is white noise. If the sequence is white noise, it means that the valuable information in the time series has been fully extracted, and the remaining part is only random interference, which cannot be predicted and used. Therefore, if the residual sequence passes the white noise test, no information can be further extracted, and the modeling is terminated. When the residual is non-white noise, it means that there is still valuable information in the residual, and the model needs to be modified or further information needs to be extracted. Set the significance level to 0.05 or 0.1. When the result is not less than the significance level, the correlation coefficient is not significantly different from zero, that is, it is a white noise sequence. The results are shown in Table 5. It can be seen from Table 5 that at each delay order, the p-value of the white noise test is greater than the significance level, so the residual sequence is white noise. Through the test, the fitted model is also significantly effective, and the whole model has a good fit and can be used for prediction.
[0098] Table 5
[0099]
[0100] Next, the residuals are tested for autocorrelation, also known as the DW test, which is used to test the first-order autocorrelation of the residuals. The final statistic value is 2.002. The closer the value is to 2, the better. Generally, values between 1 and 3 indicate that there is no problem, so there is no autocorrelation in the residuals.
[0101] After establishing the ARIMA model, the software is used to draw a normal QQ graph of the residuals, such as Fig. 9 As shown, according to Fig. 9 It can be observed that most of the data fall on the straight line, so the ARIMA model passes the normality test.
[0102] Model predictions:
[0103] After building the ARIMA(1,0,0) model using the time series data training set, you can see the comparison chart between the actual value and the predicted value as follows: Fig.10 As shown in the figure, the average absolute error is 0.062 and the root mean square error is 0.081, so it can be seen that the fitting effect is relatively good. The blue line is the true value and the red line is the predicted value. From the figure, it can be seen that the fit between the two is relatively high, and the predicted value basically fluctuates around the true value. The overall prediction effect is good.
[0104] From the above, it can be seen that the model prediction effect is good, and it can better predict the changing trend of future flight occupancy rate. The present invention will predict the flight occupancy rate on the departure day from April 1, 2023 to April 10, 2023. The average absolute error of the prediction result is 0.083, and the root mean square error is 0.095. The following is a result chart of the predicted value and the actual flight occupancy rate. The figure compares the actual flight occupancy rate with the predicted value, and calculates the relative error to measure the effect, as shown in Table 6. The smaller the relative error, the more accurate the prediction.
[0105] Table 6
[0106]
[0107] Test the longitudinal data series:
[0108] When establishing a time series regression model, the data must first be tested to determine whether it meets the conditions for linear regression. For the missing values in the time series data, they have been supplemented according to the previous ones. Then make the maximum value, average value and other information of the data, see Table 7, where the numbers 1 to 7 represent seven days before takeoff to the day before takeoff, and 0 represents the day of takeoff. It can be seen from the table that the average passenger load factor of all flights collected seven days before takeoff is 0.24, and the average passenger load factor of flights from seven days before takeoff to the day of takeoff gradually increases; the standard deviation changes very little, and the standard deviation on the day of takeoff is the smallest; the minimum and maximum values of the flight passenger load factor gradually increase, so a preliminary simple observation of the data is made, and it is found that there are no abnormal values.
[0109] Table 7
[0110]
[0111] In order to determine whether it is worthwhile to make a regression model, it is necessary to determine the correlation coefficient of the flight occupancy rate from seven days before departure to the day of departure. The results are shown in Table 8 below. A correlation coefficient of 0-0.3 is a weak correlation, 0.3-0.6 is a medium correlation, and 0.6-1 is a strong correlation. From the results, we can see that most of the correlation coefficients are strong correlations, and some are medium correlations. In order to more intuitively determine the correlation, draw a scatter plot and add a best fit line and a 95% confidence band. Fig.11 , we can see that the fitting line is within its range, indicating that its correlation is very good and meets the required conditions, and linear regression prediction can be performed.
[0112] Table 8
[0113]
[0114] Build a time series regression model:
[0115] First, the data is split into a training set and a test set. The training set data is used to build a model. The flight occupancy rate from seven days before the departure date to the day before the departure date is used to predict the flight occupancy rate on the departure day. After modeling, the intercept in the fitting parameter is 0.11, and the best fitting line is:
[0116] Y=0.11-0.18*X1+0.35*X2-0.26*X3+0.05*X4-0.03*X5-0.14*X6+1.08*X7
[0117] Among them: X1-X7 is the passenger load factor seven days before takeoff minus the passenger load factor one day before takeoff. After obtaining the time series regression model, the time series regression model is used to predict the test set, and the results are as follows Fig.12 As shown by Fig.12 As can be seen, the predicted value is the red line, and the true value is the green line. The fluctuations of the two lines are not much different, which shows that the fitting effect is good. For this model, the root mean square error is 0.025, which is very small, indicating that the model effect is very good. Its coefficient of determination R is 0.914, from which it can be concluded that the fit is relatively good. The F test of the model shows that the F statistic is 15.130 and the p value is 0.0001, which shows that the model is significant.
[0118] Forecasting using a time series regression model:
[0119] The established model is used to predict future data. The flight occupancy rate data from seven days to the day before the departure date are used to predict the flight occupancy rate on the departure day. The departure date is from April 1, 2023 to April 10, 2023. The prediction results are as follows: Fig.13 As shown in the figure, we can see that the predicted data and the original data have roughly the same trend, and the prediction is relatively accurate. The root mean square error of the prediction is 0.038, the coefficient of determination is 0.735, and the mean absolute error is 0.029, which shows that the prediction results are good.
[0120] Weighted forecast of horizontal and vertical flight load factors:
[0121] In the present invention, the time ranges selected for the horizontal and vertical flight occupancy rates are consistent. The ARIMA model is used to model the horizontal flight occupancy rate, and the time series regression model is used to model the vertical flight occupancy rate, wherein the horizontal flight data is the flight occupancy rate on the day of departure, which has an impact on predicting the flight occupancy rate on the day of departure in the next stage; the vertical flight data is the flight occupancy rate from seven days to the day before the departure date, which also has an impact on predicting the flight occupancy rate on the day of departure. According to the modeling and prediction in this article, both of them simultaneously predicted the flight occupancy rate from April 1, 2023 to April 10, 2023, so they are weighted to generate a new predicted value of the flight occupancy rate, and calculate the relative error between the new value and the true value.
[0122] For the prediction results of the ARIMA model, the prediction results of the time series regression model, and the weighted prediction results, this paper chooses to use the mean absolute error (MAE) to judge the accuracy of the prediction results. MAE is one of the indicators to measure the prediction accuracy of the prediction model on a set of observations. It is the average value of the absolute error between the predicted value and the true value. The smaller the value of MAE, the smaller the prediction error of the model and the more accurate the prediction result.
[0123] The present invention also conducted the following experiments to select the best weights:
[0124] Assume that the weight of the ARIMA model prediction result is 0.2, and the weight of the time series regression model prediction result is 0.8, and the results are as follows: Fig.14 As shown by Fig.14 It can be seen that the weighted forecast value is closer to the true value than the ARIMA model forecast value, and the difference with the time series regression model forecast effect is very small. The weighted forecast value from April 8, 2023 to April 10, 2023 is very close to the true value, and the two lines in the figure are almost overlapped. The relative error comparison chart is as follows Fig.15 As shown in the figure, the blue line of relative error 1 is the relative error of the ARIMA model prediction result, and the orange line of relative error 2 is the relative error of the time series regression model prediction result. Fig.15 It can be seen that in most cases, relative error 2 is smaller than relative error 1. The green line of relative error 3 is the relative error of the predicted values after weighting the predicted values of the two models. Fig.15It can be seen that in some cases, the relative error 3 is close to the relative error 2, and in some cases, the relative error 3 is smaller than the relative error 2. The relative error comparison is shown in Table 9. From the specific numbers in Table 9, it can be seen that the weighted forecast values from April 1, 2023 to April 2, 2023 and April 8, 2023 to April 10, 2023 have the smallest relative error and are closest to the true value. The average absolute error of the weighted forecast is 0.025, which is smaller than the average absolute error of 0.083 predicted by the ARIMA model and the average absolute error of 0.029 predicted by the time series regression model, and the forecast effect is better. Therefore, the final weight is obtained. When the ARIMA model forecast weight is 0.2 and the time series regression model forecast weight is 0.8, the forecast effect is the best and the average absolute error is the smallest.
[0125] Table 9
[0126]
[0127] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A flight data prediction method based on a bidirectional time series model, characterized in that: The following steps are involved: S1. Obtain historical flight data, select time variables and passenger load factor variables for two-way time series analysis, and divide the historical flight data into horizontal time series data and vertical time series data; S2, preprocessing the horizontal time series data and the vertical time series data respectively; S3, performing data verification on the horizontal time series data after data preprocessing to obtain the verified horizontal time series data; S4. Preliminarily establish the ARIMA model, and preliminarily determine the order of the parameters of the ARIMA model based on the autocorrelation diagram and partial autocorrelation diagram of the horizontal time series data after the test, and then accurately determine the order of the parameters of the preliminarily determined ARIMA model using the minimum BIC criterion; S5, fitting the ARIMA model after the precise order determination in step S4, and performing a residual test, using the ARIMA model after the residual test to predict the occupancy rate, and outputting the predicted value of the occupancy rate by the ARIMA model; S6. Performing data verification on the longitudinal time series data, and using the longitudinal time series data to train a multivariate linear regression model to obtain a time series regression model, and using the time series regression model to predict the passenger load factor; S7. Weight the predicted value of the occupancy rate by the ARIMA model and the predicted value of the occupancy rate by the time series regression model to obtain the final predicted value of the occupancy rate.
2. The flight data prediction method based on the bidirectional time series model according to claim 1 is characterized in that: The data preprocessing in step S1 includes one or more of deletion method, mean interpolation method, forward filling and backward filling method, linear interpolation method, K nearest neighbor interpolation method, regression interpolation method, multiple interpolation method, and expert knowledge filling method.
3. The flight data prediction method based on the bidirectional time series model according to claim 1 is characterized in that: The horizontal time series data is: flight occupancy rate data whose collection date is the flight departure date; The longitudinal time series data is: flight occupancy rate data collected from seven days to one day before the flight departure date.
4. The flight data prediction method based on a bidirectional time series model according to claim 1 is characterized in that: The data test in step S3 specifically includes: a stationarity test and a pure randomness test; The ADF test method is used to test the stationarity of the horizontal time series data. For unstable horizontal time series data, differential processing is performed to obtain stable horizontal time series data; pure randomness is used to test the pure randomness in the horizontal time series data.
5. The flight data prediction method based on a bidirectional time series model according to claim 1, characterized in that: In step S5, the ARIMA model after accurate order determination in step S4 is fitted, and a residual test is performed, specifically: Test whether the residuals of the ARIMA model after fitting are white noise sequences. If the residuals meet the requirements of white noise sequences, the modeling is terminated. Perform an autocorrelation test on the residuals. When there is no autocorrelation in the residuals, draw a normal QQ graph for the residuals. When most of the data in the normal QQ graph fall on the straight line, it means that the ARIMA model has passed the normality verification. Use the ARIMA model to predict the occupancy rate.
6. The flight data prediction method based on a bidirectional time series model according to claim 1, characterized in that: In step S6, the longitudinal time series data is subjected to data verification, specifically, the maximum and average values of the longitudinal time series data are calculated to obtain a verification value.
7. The flight data prediction method based on a bidirectional time series model according to claim 1, characterized in that: In step S7, the predicted value of the occupancy rate by the ARIMA model and the predicted value of the occupancy rate by the time series regression model are weighted, and the weighting method includes: using one or more of equal weight weighting, variance weighting, and mean absolute error weighting to adjust and optimize the weights.
8. The flight data prediction method based on a bidirectional time series regression model according to claim 1, characterized in that: In step S6, the multivariate linear regression model is trained using the longitudinal time series data, specifically including: The longitudinal time series data is divided into training set and test set in proportion, and the training set is used to train the multivariate linear regression model; The test set is used to evaluate the prediction performance of the multivariate linear regression model for passenger load factor.
9. The flight data prediction method based on a bidirectional time series model according to claim 8, characterized in that: The longitudinal time series data is divided into a training set and a test set in proportion, specifically including: the training set is the flight occupancy rate from seven days before the flight departure date to one day before the flight departure date; the test set is the flight occupancy rate on the departure day.
