CN111192453A - Short-term traffic flow prediction method and system based on Bayesian optimization - Google Patents

Short-term traffic flow prediction method and system based on Bayesian optimization Download PDF

Info

Publication number
CN111192453A
CN111192453A CN201911397429.8A CN201911397429A CN111192453A CN 111192453 A CN111192453 A CN 111192453A CN 201911397429 A CN201911397429 A CN 201911397429A CN 111192453 A CN111192453 A CN 111192453A
Authority
CN
China
Prior art keywords
traffic flow
short
time
flow prediction
prediction model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911397429.8A
Other languages
Chinese (zh)
Inventor
周志文
肖竹
王东
汪成成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Mapgoo Technology Co ltd
Original Assignee
Shenzhen Mapgoo Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Mapgoo Technology Co ltd filed Critical Shenzhen Mapgoo Technology Co ltd
Priority to CN201911397429.8A priority Critical patent/CN111192453A/en
Publication of CN111192453A publication Critical patent/CN111192453A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/0104Measuring and analyzing of parameters relative to traffic conditions
    • G08G1/0125Traffic data processing
    • G08G1/0129Traffic data processing for creating historical data or processing based on historical data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N7/00Computing arrangements based on specific mathematical models
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/0104Measuring and analyzing of parameters relative to traffic conditions
    • G08G1/0125Traffic data processing
    • G08G1/0133Traffic data processing for classifying traffic situation
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/065Traffic control systems for road vehicles by counting the vehicles in a section of the road or in a parking area, i.e. comparing incoming count with outgoing count

Abstract

The embodiment of the invention discloses a short-term traffic flow prediction method and a short-term traffic flow prediction system based on Bayesian optimization, wherein the method comprises the following steps: collecting original traffic flow data passing through a fixed time interval of a fixed road position, preprocessing the original traffic flow data according to a seasonal model algorithm, and generating time sequence traffic flow data; constructing a short-term traffic flow prediction model based on a support vector regression machine and training; calculating the average absolute percentage error of the short-term traffic flow prediction model, and acquiring the prediction precision of the short-term traffic flow prediction model according to the average absolute percentage error; optimizing the model parameters corresponding to the prediction precision according to a Bayesian optimization algorithm until a target short-time traffic flow prediction model is generated; and predicting the short-time traffic flow according to the target short-time traffic flow prediction model. The embodiment of the invention improves the generalization capability of the short-time traffic flow prediction model, improves the prediction precision and provides convenience for intelligent traffic.

Description

Short-term traffic flow prediction method and system based on Bayesian optimization
Technical Field
The invention relates to the technical field of intelligent traffic, in particular to a short-time traffic flow prediction method and system based on Bayesian optimization.
Background
In recent years, with the development of economy and the increasing demand of people for convenient transportation, the automobile holding capacity is rapidly increased, which brings great pressure to limited road resources. With the continuous development of scientific technology in the traffic field, the concept of an Intelligent Transportation System (ITS) is proposed, and people, vehicles, roads and other information are considered comprehensively through big data and various intelligent algorithm technologies on the premise of not building new urban roads and other traffic facilities in a large quantity, so that a reasonable traffic path is made to improve the vehicle operation efficiency, and the road traffic pressure is reduced. The intelligent traffic system becomes an effective strategy for relieving traffic conflict. Among the branches of intelligent transportation systems, short-time traffic flow prediction is a fundamental work and a challenging research topic. Accurate traffic flow prediction can predict the degree of congestion of roads, so that a driver is guided to select an optimal path to reach a destination, and more effective guidance data is provided for traffic authorities. Thus, short-term traffic flow predictions over the last several decades have focused on the interest of many researchers.
Many methods for short-term traffic flow prediction have been proposed at home and abroad. From the perspective of space-time prediction, traffic flow prediction models mainly based on probability maps, such as Markov chains, Markov Random Fields (MRFs), Kalman filtering and the like, show better results. Compared with the space-time prediction, the single-point prediction is easier to model and the model is more practical. For short-time traffic flow prediction of a single position, a classical time series method plays an important role. The autoregressive moving average ARMA algorithm proposed by Box and Jenkins achieves good results in time-series traffic flow prediction. Improved versions of ARMA, such as the differential integrated moving average autoregressive model ARIMA, seasonal ARIMA, are widely used for traffic flow prediction. These models can capture the characteristics of linear systems very well. However, the traffic flow of a single point is influenced by various factors, the variability is large, and the traffic flow time sequence has non-stationarity. Traffic flow prediction is quite complex, is a typical nonlinear time series prediction problem, and an ARMA-based model cannot achieve the optimal traffic flow prediction result. Research has shown that machine learning methods generally have a better ability to capture traffic flow time series uncertainty and complex non-linearities. The common methods are as follows: support Vector Regression (SVR), Artificial Neural Networks (ANN) and bayesian networks. The Support Vector Regression (SVR) -based method is one of the widely used methods, which is suitable for the high-dimensional data prediction problem under the condition of small samples, while achieving satisfactory results in terms of the solution of both the nonlinear problem and the local minimum problem. Recently, deep learning also arouses much interest in academia and industry, but the deep learning has high requirements on data volume and is not suitable for a prediction task under a small sample condition.
For almost all machine learning algorithms, the parameter optimization problem is inevitable. The success of selecting the best parameters has become an important factor that hinders the performance of the algorithm. In order to maximize the learning speed of the model and the generalization ability of the basic model, in recent years, some experts have proposed some automatic parameter optimization methods. Specifically, the parameter optimization process is regarded as a maximization process of a black box function, the parameters of the model are regarded as independent variables of the function, the generalization ability of the model is regarded as a maximization process of the function, the parameters of the model are regarded as independent variables of the function, and the generalization ability of the model is regarded as a dependent variable of the function. And obtaining the maximum value of the function by an optimization method to obtain a group of optimal parameters. There are many methods for function optimization, such as a gradient optimization method or a monte carlo sampling method. However, the optimization problem in the short-term traffic flow prediction algorithm has no specific function expression, and the gradient optimization method or the monte carlo sampling method is not suitable for the short-term traffic flow prediction algorithm. Particle Swarm Optimization (PSO) algorithms may limit partially optimal solutions.
The prior art is therefore still subject to further development.
Disclosure of Invention
Aiming at the technical problems, the embodiment of the invention provides a short-term traffic flow prediction method and system based on Bayesian optimization, which can solve the technical problems of poor generalization capability and low prediction accuracy of short-term traffic flow prediction algorithms in the prior art.
The first aspect of the embodiment of the invention provides a short-time traffic flow prediction method based on Bayesian optimization, which comprises the following steps:
collecting original traffic flow data passing through a fixed time interval of a fixed road position, preprocessing the original traffic flow data according to a seasonal model algorithm, and generating time sequence traffic flow data;
constructing a short-time traffic flow prediction model based on a support vector regression machine, and training the short-time traffic flow prediction model according to time sequence traffic flow data;
calculating the average absolute percentage error of the short-term traffic flow prediction model, and acquiring the prediction precision of the short-term traffic flow prediction model according to the average absolute percentage error;
obtaining model parameters corresponding to the prediction precision, optimizing the model parameters corresponding to the prediction precision according to a Bayesian optimization algorithm, and adjusting the short-time traffic flow prediction model according to the optimized model parameters until a target short-time traffic flow prediction model is generated;
and predicting the short-time traffic flow according to the target short-time traffic flow prediction model.
Optionally, the preprocessing the original traffic flow data according to a seasonal model algorithm to generate time-series traffic flow data further includes:
constructing a format of time-series traffic flow data, wherein the format of the time-series traffic flow data is as follows:
Figure BDA0002346676560000021
wherein v isiRepresenting the traffic flow in the ith time period, i-1 representing the ith-1 time period, i-day representing the ith time period corresponding to a time period before one day, i-week representing the ith time period corresponding to a time period before one week, and so on, X is the input feature vector of the short-time traffic flow prediction model, and y is viIs a regression target of the short-term traffic flow prediction model.
Optionally, the constructing a short-time traffic flow prediction model based on a support vector regression, and training the short-time traffic flow prediction model according to the time-series traffic flow data includes:
acquiring a training data set corresponding to the time sequence traffic flow data, wherein the training data set is marked as D, and D { (X)1,y1),(X2,y2),...,(Xn,yn)},yi∈R,XiFeature vector, y, representing a sampleiRepresenting a corresponding traffic flow prediction target value;
constructing a short-time traffic flow prediction model supporting a vector regression, mapping input data to a high-dimensional feature space through a kernel function, and constructing a nonlinear mapping from an input space to an output space, wherein the short-time traffic flow prediction model is marked as f (x), and the calculation mode of f (x) is shown as a formula (2):
Figure BDA0002346676560000031
wherein
Figure BDA0002346676560000032
Representing a kernel function that converts input data to a high-dimensional feature space;
the kernel function adopts a Radial Basis (RBF) kernel function, which is shown in formula (3):
Figure BDA0002346676560000033
where σ is a kernel parameter;
the generalized objective of the support vector regression is expressed by the following equation (4):
Figure BDA0002346676560000034
s.t f(x)i-yi≤ε+ξi(5)
Figure BDA0002346676560000035
Figure BDA0002346676560000036
wherein ξiThe lower slack variable is represented by the lower slack variable,
Figure BDA0002346676560000037
representing an upper relaxation variable corresponding to an insensitivity range y-f (x). ltoreq.epsilon, the first term being 1/2 |2The second term is an empirical error term, C is a penalty parameter, and ε is an insensitivity loss parameter.
Optionally, the calculating an average absolute percentage error of the short-term traffic flow prediction model, and obtaining the prediction precision of the short-term traffic flow prediction model according to the average absolute percentage error includes:
calculating the average absolute percentage error MAPE of the short-term traffic flow prediction model, wherein the calculation formula of the average absolute percentage error MAPE is
Figure BDA0002346676560000041
Wherein f isiObserved value of traffic flow, fi' is a predicted value of traffic flow, and n is a total number of samples;
obtaining the prediction precision of the short-term traffic flow prediction model according to the average absolute percentage error, wherein the prediction precision is recorded as m, and the specific calculation formula of m is
m=1–MAPE (9)。
Optionally, the obtaining of the model parameter corresponding to the prediction accuracy, optimizing the model parameter corresponding to the prediction accuracy according to a bayesian optimization algorithm, and adjusting the short-term traffic flow prediction model according to the optimized model parameter to generate the target short-term traffic flow prediction model includes:
obtaining a punishment parameter C, an insensitive loss parameter epsilon and a kernel parameter sigma corresponding to the prediction precision;
taking a Gaussian process as an objective function of a Bayesian optimization algorithm, wherein the objective function is expressed as shown in formula (10):
f(x)~GP(μ(x),k(x,x′)) (10);
constructing an acquisition function for determining the next sample point to be acquired, wherein the acquisition function is shown in formula (11):
Figure BDA0002346676560000042
wherein the content of the first and second substances,
Figure BDA0002346676560000043
and Φ (·) represents the PDF and CDF of a standard normal distribution, respectively;
Figure BDA0002346676560000044
Figure BDA0002346676560000045
representing the current best observation; μ (x) and σ (x) represent a prediction mean function and a prediction variance function of the objective function, respectively;
and carrying out iterative optimization on a penalty parameter C, a non-sensitivity loss parameter epsilon and a kernel parameter sigma corresponding to the prediction precision according to a Gaussian process and an acquisition function, and adjusting the short-time traffic flow prediction model according to the result after the iterative optimization until a target short-time traffic flow prediction model is generated.
The second aspect of the embodiment of the invention provides a short-time traffic flow prediction system based on Bayesian optimization, and the system comprises: a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program when executed by the processor implementing the steps of:
collecting original traffic flow data passing through a fixed time interval of a fixed road position, preprocessing the original traffic flow data according to a seasonal model algorithm, and generating time sequence traffic flow data;
constructing a short-time traffic flow prediction model based on a support vector regression machine, and training the short-time traffic flow prediction model according to time sequence traffic flow data;
calculating the average absolute percentage error of the short-term traffic flow prediction model, and acquiring the prediction precision of the short-term traffic flow prediction model according to the average absolute percentage error;
obtaining model parameters corresponding to the prediction precision, optimizing the model parameters corresponding to the prediction precision according to a Bayesian optimization algorithm, and adjusting the short-time traffic flow prediction model according to the optimized model parameters until a target short-time traffic flow prediction model is generated;
and predicting the short-time traffic flow according to the target short-time traffic flow prediction model.
Optionally, the computer program when executed by the processor further implements the steps of:
constructing the format of the time-series traffic flow data, wherein the construction format of the time-series traffic flow data is as follows:
Figure BDA0002346676560000051
wherein v isiRepresenting the traffic flow in the ith time period, i-1 representing the ith-1 time period, i-day representing the ith time period corresponding to a time period before one day, i-week representing the ith time period corresponding to a time period before one week, and so on, X is the input feature vector of the short-time traffic flow prediction model, and y is viIs a regression target of the short-term traffic flow prediction model.
Optionally, the computer program when executed by the processor further implements the steps of:
acquiring a training data set corresponding to the time sequence traffic flow data, wherein the training data set is marked as D, and D { (X)1,y1),(X2,y2),...,(Xn,yn)},yi∈R,XiFeature vector, y, representing a sampleiRepresenting a corresponding traffic flow prediction target value;
constructing a short-time traffic flow prediction model supporting a vector regression, mapping input data to a high-dimensional feature space through a kernel function, and constructing a nonlinear mapping from an input space to an output space, wherein the short-time traffic flow prediction model is marked as f (x), and the calculation mode of f (x) is shown as a formula (13):
Figure BDA0002346676560000052
wherein
Figure BDA0002346676560000053
Representing a kernel function that converts input data to a high-dimensional feature space;
the kernel function adopts a radial basis RBF kernel function, and the radial basis RBF kernel function is shown as a formula (14):
Figure BDA0002346676560000054
where σ is a kernel parameter;
the generalized objective of the support vector regression is expressed by the following equation (15):
Figure BDA0002346676560000055
s.t f(x)i-yi≤ε+ξi(16)
Figure BDA0002346676560000056
Figure BDA0002346676560000057
wherein ξiThe lower slack variable is represented by the lower slack variable,
Figure BDA0002346676560000058
representing an upper relaxation variable corresponding to an insensitivity range y-f (x). ltoreq.epsilon, the first term being 1/2 |2The second term is an empirical error term, C is a penalty parameter, and ε is an insensitivity loss parameter.
Optionally, the computer program when executed by the processor further implements the steps of:
calculating the average absolute percentage error of the short-term traffic flow prediction model, and acquiring the prediction precision of the short-term traffic flow prediction model according to the average absolute percentage error, wherein the method comprises the following steps:
calculating the average absolute percentage error MAPE of the short-term traffic flow prediction model, wherein the calculation formula of the average absolute percentage error MAPE is
Figure BDA0002346676560000061
Wherein f isiObserved value of traffic flow, fi' is a predicted value of traffic flow, and n is a total number of samples;
obtaining the prediction precision of the short-term traffic flow prediction model according to the average absolute percentage error, wherein the prediction precision is recorded as m, and the specific calculation formula of m is
m=1–MAPE (20)。
A third aspect of the embodiments of the present invention provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by one or more processors, the one or more processors may be configured to execute the foregoing short-time traffic flow prediction method based on bayesian optimization.
In the technical scheme provided by the embodiment of the invention, the original traffic flow data passing through a fixed time interval of a fixed road position is collected, and the original traffic flow data is preprocessed according to a seasonal model algorithm to generate time sequence traffic flow data; constructing a short-term traffic flow prediction model based on a support vector regression machine and training; calculating the average absolute percentage error of the short-term traffic flow prediction model, and acquiring the prediction precision of the short-term traffic flow prediction model according to the average absolute percentage error; optimizing the model parameters corresponding to the prediction precision according to a Bayesian optimization algorithm until a target short-time traffic flow prediction model is generated; and predicting the short-time traffic flow according to the target short-time traffic flow prediction model. Compared with the prior art, the embodiment of the invention improves the generalization capability of the short-time traffic flow prediction model, improves the prediction precision and provides convenience for intelligent traffic.
Drawings
Fig. 1 is a schematic flow chart of an embodiment of a short-term traffic flow prediction method based on bayesian optimization according to the present invention;
fig. 2 is a schematic hardware configuration diagram of another embodiment of a short-time traffic flow prediction system based on bayesian optimization according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The following detailed description of embodiments of the invention refers to the accompanying drawings.
Referring to fig. 1, fig. 1 is a flowchart illustrating an embodiment of a short-term traffic flow prediction method based on bayesian optimization according to the present invention. As shown in fig. 1, includes:
s100, collecting original traffic flow data passing through a fixed time interval of a fixed road position, preprocessing the original traffic flow data according to a seasonal model algorithm, and generating time sequence traffic flow data;
s200, constructing a short-time traffic flow prediction model based on a support vector regression machine, and training the short-time traffic flow prediction model according to time sequence traffic flow data;
step S300, calculating an average absolute percentage error of the short-term traffic flow prediction model, and obtaining the prediction precision of the short-term traffic flow prediction model according to the average absolute percentage error;
s400, obtaining model parameters corresponding to prediction precision, optimizing the model parameters corresponding to the prediction precision according to a Bayesian optimization algorithm, and adjusting a short-time traffic flow prediction model according to the optimized model parameters until a target short-time traffic flow prediction model is generated;
and S500, predicting the short-term traffic flow according to the target short-term traffic flow prediction model.
Specifically, the invention mainly relates to short-term traffic flow prediction in an Intelligent Transportation System (ITS), and mainly researches short-term traffic flow time sequence prediction and model parameter optimization problems in a non-stationary environment.
The invention provides a method based on a seasonal model and Support Vector Regression (SVR) combined with Bayesian Optimization (BO), which utilizes a single-point traffic flow historical time sequence data training model and learns the nonlinear change relationship of traffic flow data to accurately predict the traffic flow of the next time interval (generally taking 5 minutes or 15 minutes) and provides guiding significance for traffic guidance and urban road optimization.
The design idea of the invention is as follows: based on the idea of seasonal model, historical traffic flow data is processed to eliminate non-translational property of the data. And selecting a support vector machine as a basic regression prediction model, and training a regression model on the preprocessed time sequence traffic flow data. Different from the traditional parameter selection method, the invention utilizes Bayesian optimization to determine the parameter configuration of the regression model by optimizing the Acquisition Function (Acquisition Function) of GP, and finally obtains the optimal short-time traffic flow regression model by repeating the Gaussian process and the iterative training model for many times.
Preprocessing original data by collecting traffic flow data passing through a fixed time interval of a fixed road position by utilizing the idea of a seasonal model;
the SVR is selected as a basic model for predicting traffic flow. Training a regression model for the preprocessed time sequence traffic flow data, converting low-dimensional traffic flow data into a high-dimensional space through a kernel function, and then converting a regression prediction problem into a convex quadratic programming problem by constructing a linear decision function;
selecting a Mean Absolute Percent Error (MAPE) as an evaluation standard of a prediction model, and expressing the prediction precision (m) of the model by using m as 1-MAPE, which is also an optimization target in the optimization process of model parameters;
and converting the regression model parameter optimization problem into a function optimization problem, and performing optimization configuration on the parameters by using Bayesian optimization to obtain an optimal short-term traffic flow prediction model.
And predicting the short-term traffic flow according to the obtained target short-term traffic flow prediction model.
The invention discloses a short-time traffic flow regression prediction method based on Bayesian optimization and a support vector machine, which comprises the following steps: 1) preprocessing data based on a seasonal model idea to eliminate non-stationarity characteristics of the data; 2) and selecting a support vector machine as a basic regression prediction model, and training a regression model on the preprocessed time sequence traffic flow data. The method comprises the steps of mapping traffic flow data of a low-dimensional space to a high-dimensional space by using a kernel function, so that linear regression can be performed, and 3) optimizing hyper-parameters of a regression model by using a Bayesian optimization method, so that the model automatically selects parameters, the generalization capability of the model is improved, the parameter optimization process is regarded as the optimization process of an unknown black box function, the Gaussian process and the obtained function are combined, the optimal combination of the parameters is found after multiple iterations, and the optimal short-term traffic flow prediction model based on the SVR is further obtained.
Further, preprocessing the original traffic flow data according to a seasonal model algorithm to generate time sequence traffic flow data, and the method further comprises the following steps:
constructing a format of time-series traffic flow data, wherein the construction format is as follows:
Figure BDA0002346676560000081
wherein v isiRepresenting the traffic flow in the ith time period, i-1 representing the ith-1 time period, i-day representing the ith time period corresponding to a time period before one day, i-week representing the ith time period corresponding to a time period before one week, and so on, X is the input feature vector of the short-time traffic flow prediction model, and y is viIs a regression target of the short-term traffic flow prediction model. We expect that the model can utilize historical traffic flow to time i through learning of the training data set DAnd making accurate prediction of the interval traffic flow.
Further, constructing a short-time traffic flow prediction model based on a support vector regression machine, and training the short-time traffic flow prediction model according to time sequence traffic flow data, wherein the short-time traffic flow prediction model comprises the following steps:
acquiring a training data set corresponding to the time sequence traffic flow data, wherein the training data set is marked as D, and D { (X)1,y1),(X2,y2),...,(Xn,yn)},yi∈R,XiFeature vector, y, representing a sampleiRepresenting a corresponding traffic flow prediction target value;
constructing a short-time traffic flow prediction model supporting a vector regression, mapping input data to a high-dimensional feature space through a kernel function, and constructing a nonlinear mapping from an input space to an output space, wherein the short-time traffic flow prediction model is marked as f (x), and the calculation mode of f (x) is shown as a formula (2):
Figure BDA0002346676560000082
wherein
Figure BDA0002346676560000083
Representing a kernel function that converts input data to a high-dimensional feature space; support Vector Regression (SVR) constructs a non-linear mapping from the input space to the output space by mapping the input data to a high dimensional feature space through a kernel function. Equation (2) shows a regression function model, representing a regression hyperplane.
Wherein
Figure BDA0002346676560000084
Representing a kernel function that converts the input data to a high-dimensional feature space. By means of the conversion, the low-dimensional non-linear problem can be converted into the high-dimensional linear problem.
Through learning of the training set, the hyperplane normal vector ω and the displacement b can be determined. Specifically, the generalized target of the support vector regression is expressed by the following formula (3):
Figure BDA0002346676560000091
s.t f(x)i-yi≤ε+ξi(4)
Figure BDA0002346676560000092
Figure BDA0002346676560000093
wherein ξiThe lower slack variable is represented by the lower slack variable,
Figure BDA0002346676560000094
representing an upper relaxation variable corresponding to an insensitivity range y-f (x). ltoreq.epsilon, the first term being 1/2 |2The second term is an empirical error term for the regularization term, where C is a penalty parameter, ε is an insensitivity loss parameter, and σ is a kernel parameter.
in equation (3), the insensitivity loss superparameter ε is typically a positive real numberiOr
Figure BDA0002346676560000095
The hyper-parameter epsilon affects the magnitude of the training error and thus the generalization ability of the model. To avoid under-and over-fitting of the training data, the regularization term 1/2 | ω | should be minimized2And training errors
Figure BDA0002346676560000096
To minimize equation (3), introducing a lagrangian multiplier, one can obtain the following lagrangian function:
Figure BDA0002346676560000097
then, four independent variables (ω, b, ξ) are calculated*) And let the partial derivative be zero, we can get:
Figure BDA0002346676560000098
Figure BDA0002346676560000099
C=αii(10)
Figure BDA00023466765600000910
substituting the above equations (8), (9), (10) and (11) into equation (7), the optimization problem of equation (3) can be transformed into the following dual problem, which is a convex quadratic programming problem.
Figure BDA0002346676560000101
Figure BDA0002346676560000102
The above process is limited by the KKT condition:
Figure BDA0002346676560000103
finally, the regression prediction results can be expressed by the following formula:
Figure BDA0002346676560000104
wherein, K (x)iAnd x) represents a kernel function. Since traffic flow time series prediction is not a simple linear regression problem, by using a kernel function, traffic flow data of a low-dimensional space can be mapped to a high-dimensional space, so that linear regression can be performed. Typical kernel functions are linear kernel, multiA polynomial nucleus, a radial basis nucleus, and the like. The selection of the appropriate kernel function is critical to the SVR model. In the present invention, a Radial Basis (RBF) kernel function is used, as shown in equation (16).
Figure BDA0002346676560000105
Where σ is the kernel parameter gamma; its correct selection or not has a significant impact on the performance of the SVR model. Therefore, it is crucial to select the parameter gamma correctly.
In conclusion, the penalty parameter C, the insensitivity loss parameter epsilon and the kernel parameter sigma, and the configuration of the three superparameters determines the learning efficiency and generalization capability of the model. The invention configures the optimal parameters (C, epsilon, sigma) by taking the hyper-parameter optimization process of the model as the maximization of an unknown function through an optimization method.
Further, calculating an average absolute percentage error of the short-term traffic flow prediction model, and obtaining the prediction precision of the short-term traffic flow prediction model according to the average absolute percentage error, wherein the method comprises the following steps:
calculating the average absolute percentage error MAPE of the short-term traffic flow prediction model, wherein the calculation formula of the average absolute percentage error MAPE is
Figure BDA0002346676560000111
Wherein f isiObserved value of traffic flow, fi' is a predicted value of traffic flow, and n is a total number of samples;
and the prediction precision m of the short-time traffic flow prediction model is 1-MAPE.
In particular, the performance of time series regression prediction typically uses an error metric. The validity of the proposed model was evaluated using Mean Absolute Percent Error (MAPE). MAPE is a measure of the prediction accuracy of a prediction method. It usually expresses the accuracy in percentage, and the present invention obtains the prediction accuracy (m) by m-1-MAPE, which is also the optimization target of bayesian optimization in step S4.
Further, obtaining model parameters corresponding to the prediction precision, optimizing the model parameters corresponding to the prediction precision according to a Bayesian optimization algorithm, adjusting the short-time traffic flow prediction model according to the optimized model parameters, and generating a target short-time traffic flow prediction model, including:
obtaining a punishment parameter C, an insensitive loss parameter epsilon and a kernel parameter sigma corresponding to the prediction precision;
taking a Gaussian process as an objective function of a Bayesian optimization algorithm, wherein the objective function is expressed as shown in a formula (18):
f(x)~GP(μ(x),k(x,x′)) (18);
constructing an acquisition function for determining the next sample point to be acquired, the acquisition function being shown in equation (19):
Figure BDA0002346676560000112
wherein the content of the first and second substances,
Figure BDA0002346676560000113
and Φ (·) represents the PDF and CDF of a standard normal distribution, respectively;
Figure BDA0002346676560000114
Figure BDA0002346676560000115
representing the current best observation; μ (x) and σ (x) represent a prediction mean function and a prediction variance function of the objective function, respectively;
and carrying out iterative optimization on a penalty parameter C, a non-sensitivity loss parameter epsilon and a kernel parameter sigma corresponding to the prediction precision according to a Gaussian process and an acquisition function, and adjusting the short-time traffic flow prediction model according to the result after the iterative optimization until a target short-time traffic flow prediction model is generated.
In specific implementation, the invention provides a hyper-parameter optimization method based on Bayesian optimization, which can automatically select parameters and improve the generalization capability of a model.
Bayesian optimization is a function optimization method that can find an extreme value of an objective function without a specific expression of the objective function (but an observed value can be obtained by sampling). Bayesian optimization differs from other methods in that it constructs a probabilistic model of the objective function f (x) and obtains a prior distribution by sampling the objective function. The estimate of the unknown objective function is then updated using the a posteriori distribution to determine the next sample point in the bounded set X. By leveraging the information obtained from previous sampling of f (x), rather than relying solely on local gradients and Hessian approximations, bayesian optimization can find the most significant value of a complex non-convex function with a relatively small number of samples.
When introducing bayesian optimization, two parts are mainly introduced. First, an estimate of the objective optimization function is represented by an a priori distribution function. The present invention selects Gaussian Process (Gaussian Process) as a prior function due to its flexibility and ease of processing. The next is an Acquisition Function (Acquisition Function) for constructing a utility Function to determine the next sample point to be acquired. Next, the working principle of bayesian optimization is elucidated by introducing gaussian process priors and acquisition functions.
The Gaussian Process (GP) provides a practical strong a priori distribution representation over a smooth function space. The gaussian process consists of a set of infinite number of random variables, where any finite number of random variables obey a joint gaussian distribution. The sample points on the unknown function can be considered as random variables of the GP, so it can be assumed that the objective function conforms to the gaussian process formula. The gaussian process equation is shown in equation (18).
The support and nature of the gaussian process is determined by its mean function and covariance function. By choosing some sample points of the objective function as priors, it is assumed that these points are part of the GP. That is, they follow a joint gaussian distribution. By using the properties of a multivariate gaussian distribution, the mean and variance can be calculated. Typically in the gaussian process, to be non-trivial, the a priori mean function can be assumed to be zero, so that the gaussian function is completely determined by the covariance function. The ability of the gaussian process to express the information of the objective function is entirely dependent on the covariance function, which is squared exponential as shown in equation (19).
The squared exponential covariance function is a hot choice in the gaussian process. The initialization sample point of the objective function will result in { x }1,x2,...,xtAnd the corresponding function value y1,y2,...,ytIn which y is1:t=f(x1:t). As can be seen, these data pairs { x }1:t,y1:tIt is a gaussian process prior sample with zero mean and covariance functions. Function value y1:tThus following a joint gaussian distribution N (0, K), the covariance matrix is given by the following equation (20):
Figure BDA0002346676560000121
where the diagonal value is 1 and the matrix is a positive definite matrix. It should be noted that the present invention now considers the result in a noise-free environment. Furthermore, the zero mean function is chosen for simplicity.
In each iteration of the optimization task, the present invention uses the sampled data to fit the GP and obtain the posterior distribution through the external model. For each iteration, the point of the next sub-sample is determined in combination with the acquisition function of the posterior distribution. Scholars have demonstrated that bayesian optimization can achieve the best optimization results with as few iterations as possible. For an arbitrary sample point, the value of the function is expressed as yt+1=f(xt+1). Likewise, y1:tAnd yt+1All obey joint Gaussian distribution, and through the attribute of a Gaussian process, the following can be obtained (21):
Figure BDA0002346676560000122
wherein k ═ k (x)1,xt+1)k(x2,xt+2)…k(xt,xt+1)]Using the Sherman-Morrison-Woodbury formula, the posterior distribution of the objective function can be written as (22):
Figure BDA0002346676560000134
wherein
μt(xt+1)=kTK-1y1:t(23)
Figure BDA0002346676560000131
By the goal, the present inventors have discussed gaussian process priors for the objective function and how to update these priors based on new sampled observations. The acquisition function will be described below.
As previously described, the get function is used to determine the point to sample the next to the objective function in the optimization iteration process, thereby indexing the sample to the optimal point. In bayesian optimization, the gain function can be considered as a proxy function, which is easier to evaluate compared to a complex objective function. Typically, the maximum of the derived function corresponds to the potential maximum of the objective function. Since the position of the maximum of the acquisition function represents the position where the maximum of the objective function may occur or where there is a large uncertainty, the maximization of the acquisition function is used to determine the next sample point of the objective function. That is, argmax is desiredxu (x | D) samples f, where u (·) is the general sign of the acquisition function.
There are several main stream choices for obtaining the function, which are mainly classified into two types, namely, an improved standard and a confidence-based standard, and hereinafter, three main stream obtaining functions are respectively described. In the following, φ (-) and φ (-) denote PDF and CDF of a standard normal distribution, respectively.
Figure BDA0002346676560000135
Representing the current best observation. μ (x) and σ (x) represent a prediction mean function and a prediction variance function of the objective function, respectively.
1)Probability of Improvement(PI):
Figure BDA0002346676560000132
The strategy of PI is to maximize the probability of improving the best current probe point. An attendant disadvantage is that this strategy is purely developed and not explored. Thus, another acquisition function is Expected Improvement (EI), which chooses to maximize the current best expectation of Improvement.
2)Expected Improvement(EI):
Figure BDA0002346676560000133
Another acquisition function is GP-UCB, which predicts the confidence upper bound of the distribution using a gaussian process.
3)GP Upper Confidence Bound(GP-UCB):
aUCP=μ(x)+kσ(x) (27)
Where the parameter k is used to balance the development versus exploration tradeoffs.
In the present invention, the EI standard will be applied because it proves to be better than PI and, unlike GP-UCP, it does not require its own tuning parameters. At each generation, an EI acquisition function is used to determine whether to develop or explore in the next sample. Finally, a global optimum of the objective function may be obtained instead of a local optimum.
In each iteration, the EI acquisition function is used to determine whether to develop or explore in the next sample. Finally, a global optimum of the objective function may be obtained instead of a local optimum.
By combining the Gaussian process and the acquisition function, the optimal combination of the parameters can be found after multiple iterations, so that the short-term traffic flow prediction model of the SVR is optimized.
The invention also provides a specific embodiment, which specifically comprises the following steps: the experimental data used for verifying the traffic flow prediction algorithm is from Caltrans Performance Measurement System (PeMS) public database. In a highway system in california, there are over 15000 individual traffic detectors. These sensors count the number of vehicles passing through the road section in units of every 30 seconds. The vehicle data was then summarized into 5 minute traffic flow data and uploaded to the internet for use by researchers. In this experiment, the data were further summarized as 15 minutes, 30 minutes for short term prediction studies. 4 typical road segment locations were selected for the study since the road nodes in these typical cases play a more dominant role in the impact on road traffic. Where node 1 is a busy road segment with a large traffic flow. The node 2 is located close to a complex intersection. Node 3 is the city backbone and node 4 is on a bridge.
The selected time ranges of the experimental data are from 25/9/2017 to 9/10/2017, from 25/6/2017 to 9/7/2017, and from 25/9/2017 to 9/10/2017. The data from the first two weeks are used herein as the training set and the remaining data as the test set. The flow prediction in the morning and evening peak periods of each day is mainly concerned, and the flow prediction is respectively 5: 00-10: 00AM and 5: 00-10: 00PM, predicted ranges are 5 minutes, 15 minutes and 30 minutes.
The performance tests of the proposed traffic flow prediction method (BO-SVR) are divided into two groups. The first set of experiments was aimed at verifying the effectiveness of bayesian optimization algorithms in traffic flow prediction model parameter selection based on support vector regression. The second group will be compared with other classical traffic flow prediction methods to verify the overall effectiveness of the method presented herein.
Three hyper-parameters, i.e., C, epsilon, and sigma, need to be optimized in the SVR model applied in the present invention. Four pairs of comparative experiments were designed. The parameters of the SVR are optimized using bayesian optimization and zero parameters are first selected for optimization, i.e., no bayesian optimization, and then one parameter is added at a time. For non-optimized parameters, the parameter of C is set to 1 by default. ε is set to 0.1 and gamma is set to 1/n _ features. These models were trained and tested using the same traffic flow data set, with data derived from probe collection at node 4. The selected time ranges from 25 days 9 months 2017 to 9 days 10 months 2017. The data from the first two weeks were used as the training set and the remaining data as the test set, with a prediction horizon of 15 minutes into the future.
The prediction accuracy of the comparison experiment shows that the accuracy of the optimized model of all parameters of the invention is over 90 percent, and is obviously better than that of all other models. Meanwhile, it can be seen that the accuracy of the model is significantly improved with the increase of the optimization parameters. Thus, it can be concluded that bayesian optimization is effective for parameter selection for SVR-based short-term traffic flow prediction models.
The overall performance of the proposed BO-SVR method was further validated. Separate experiments were performed using data collected from four node probes. The training set and data set settings were consistent with the previous section. First, by observing the comparison result of the 15-minute prediction of the traffic flow of the node 3 for one day and the actual traffic flow, it can be known that there are peak hours in the traffic flow of one day, which are from 5 am to 10 pm. The aim of traffic flow prediction is to alleviate traffic pressure during peak hours due to research. Therefore, subsequent experiments focused on the predicted effect of the proposed model during peak periods.
The foregoing describes a short-term traffic flow prediction method based on bayesian optimization in an embodiment of the present invention, and the following describes a short-term traffic flow prediction system based on bayesian optimization in an embodiment of the present invention, please refer to fig. 2, where fig. 2 is a schematic hardware structure diagram of another embodiment of a short-term traffic flow prediction system based on bayesian optimization in an embodiment of the present invention, and as shown in fig. 2, the system 10 includes: a memory 101, a processor 102 and a computer program stored on the memory and executable on the processor, the computer program realizing the following steps when executed by the processor 101:
collecting original traffic flow data passing through a fixed time interval of a fixed road position, preprocessing the original traffic flow data according to a seasonal model algorithm, and generating time sequence traffic flow data;
constructing a short-time traffic flow prediction model based on a support vector regression machine, and training the short-time traffic flow prediction model according to time sequence traffic flow data;
calculating the average absolute percentage error of the short-term traffic flow prediction model, and acquiring the prediction precision of the short-term traffic flow prediction model according to the average absolute percentage error;
obtaining model parameters corresponding to the prediction precision, optimizing the model parameters corresponding to the prediction precision according to a Bayesian optimization algorithm, and adjusting the short-time traffic flow prediction model according to the optimized model parameters until a target short-time traffic flow prediction model is generated;
and predicting the short-time traffic flow according to the target short-time traffic flow prediction model.
The specific implementation steps are the same as those of the method embodiments, and are not described herein again.
Optionally, the computer program when executed by the processor 101 further implements the steps of:
constructing the format of the time-series traffic flow data, wherein the construction format of the time-series traffic flow data is as follows:
Figure BDA0002346676560000151
wherein v isiRepresenting the traffic flow in the ith time period, i-1 representing the ith-1 time period, i-day representing the ith time period corresponding to a time period before one day, i-week representing the ith time period corresponding to a time period before one week, and so on, X is the input feature vector of the short-time traffic flow prediction model, and y is viIs a regression target of the short-term traffic flow prediction model.
The specific implementation steps are the same as those of the method embodiments, and are not described herein again.
Optionally, the computer program when executed by the processor 101 further implements the steps of:
acquiring a training data set corresponding to the time sequence traffic flow data, wherein the training data set is marked as D, and D { (X)1,y1),(X2,y2),...,(Xn,yn)},yi∈R,XiFeature vector, y, representing a sampleiRepresenting a corresponding traffic flow prediction target value;
constructing a short-time traffic flow prediction model supporting a vector regression, mapping input data to a high-dimensional feature space through a kernel function, and constructing a nonlinear mapping from an input space to an output space, wherein the short-time traffic flow prediction model is marked as f (x), and the calculation mode of f (x) is shown as a formula (29):
Figure BDA0002346676560000161
wherein
Figure BDA0002346676560000162
Representing a kernel function that converts input data to a high-dimensional feature space;
the kernel function adopts a radial basis RBF kernel function, and the radial basis RBF kernel function is shown as a formula (30):
Figure BDA0002346676560000163
where σ is a kernel parameter;
the generalized target of the support vector regression is represented by the following equation (31):
Figure BDA0002346676560000164
s.t f(x)i-yi≤ε+ξi(32)
Figure BDA0002346676560000165
Figure BDA0002346676560000166
wherein ξiThe lower slack variable is represented by the lower slack variable,
Figure BDA0002346676560000167
representing an upper relaxation variable corresponding to an insensitivity range y-f (x). ltoreq.epsilon, the first term being 1/2 |2Is a regularization term, the second term is an empirical error term, C is a penalty parameter, ε is an insensitivity loss parameter,
the specific implementation steps are the same as those of the method embodiments, and are not described herein again.
Optionally, the computer program when executed by the processor 101 further implements the steps of:
calculating the average absolute percentage error of the short-term traffic flow prediction model, and acquiring the prediction precision of the short-term traffic flow prediction model according to the average absolute percentage error, wherein the method comprises the following steps:
calculating the average absolute percentage error MAPE of the short-term traffic flow prediction model, wherein the calculation formula of the average absolute percentage error MAPE is
Figure BDA0002346676560000168
Wherein f isiObserved value of traffic flow, fi' is a predicted value of traffic flow, and n is a total number of samples;
obtaining the prediction precision of the short-term traffic flow prediction model according to the average absolute percentage error, wherein the prediction precision is recorded as m, and the specific calculation formula of m is
m=1–MAPE (36)。
The specific implementation steps are the same as those of the method embodiments, and are not described herein again.
Embodiments of the present invention provide a non-transitory computer-readable storage medium storing computer-executable instructions for execution by one or more processors, for example, to perform method steps S100-S500 of fig. 1 described above.
The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A short-time traffic flow prediction method based on Bayesian optimization is characterized by comprising the following steps:
collecting original traffic flow data passing through a fixed time interval of a fixed road position, preprocessing the original traffic flow data according to a seasonal model algorithm, and generating time sequence traffic flow data;
constructing a short-time traffic flow prediction model based on a support vector regression machine, and training the short-time traffic flow prediction model according to time sequence traffic flow data;
calculating the average absolute percentage error of the short-term traffic flow prediction model, and acquiring the prediction precision of the short-term traffic flow prediction model according to the average absolute percentage error;
obtaining model parameters corresponding to the prediction precision, optimizing the model parameters corresponding to the prediction precision according to a Bayesian optimization algorithm, and adjusting the short-time traffic flow prediction model according to the optimized model parameters until a target short-time traffic flow prediction model is generated;
and predicting the short-time traffic flow according to the target short-time traffic flow prediction model.
2. The Bayesian optimization-based short-time traffic flow prediction method according to claim 1, wherein the preprocessing is performed on original traffic flow data according to a seasonal model algorithm to generate time-series traffic flow data, and further comprising:
constructing a format of time-series traffic flow data, wherein the construction format is as follows:
{(X,y)|X=[vi-1,vi-1-vi-2,vi-week,vi-week-vi-week-1,vi-day,vi-day-vi-day-1]T,y=vi} (1)
wherein v isiRepresenting the traffic flow in the ith time period, i-1 representing the ith-1 time period, i-day representing the ith time period corresponding to a time period before one day, i-week representing the ith time period corresponding to a time period before one week, and so on, X is the input feature vector of the short-time traffic flow prediction model, and y is viIs a regression target of the short-term traffic flow prediction model.
3. The Bayesian optimization-based short-time traffic flow prediction method according to claim 2, wherein the constructing of the short-time traffic flow prediction model based on the support vector regression, and the training of the short-time traffic flow prediction model according to the time-series traffic flow data comprises:
acquiring a training data set corresponding to the time sequence traffic flow data, wherein the training data set is marked as D, and D { (X)1,y1),(X2,y2),...,(Xn,yn)},yi∈R,XiFeature vector, y, representing a sampleiRepresenting a corresponding traffic flow prediction target value;
constructing a short-time traffic flow prediction model supporting a vector regression, mapping input data to a high-dimensional feature space through a kernel function, and constructing a nonlinear mapping from an input space to an output space, wherein the short-time traffic flow prediction model is marked as f (x), and the calculation mode of f (x) is shown as a formula (2):
Figure FDA0002346676550000011
wherein
Figure FDA0002346676550000012
Representing a kernel function that converts input data to a high-dimensional feature space;
the kernel function adopts a Radial Basis (RBF) kernel function, which is shown in formula (3):
Figure FDA0002346676550000021
where σ is a kernel parameter;
the generalized objective of the support vector regression is expressed by the following equation (4):
Figure FDA0002346676550000022
s.t f(x)i-yi≤ε+ξi(5)
Figure FDA0002346676550000023
Figure FDA0002346676550000024
wherein ξiThe lower slack variable is represented by the lower slack variable,
Figure FDA0002346676550000025
representing an upper relaxation variable corresponding to an insensitivity range y-f (x). ltoreq.epsilon, the first term being 1/2 |2The second term is an empirical error term, C is a penalty parameter, and ε is an insensitivity loss parameter.
4. The Bayesian optimization-based short-term traffic flow prediction method according to claim 3, wherein the calculating of the average absolute percentage error of the short-term traffic flow prediction model and the obtaining of the prediction accuracy of the short-term traffic flow prediction model according to the average absolute percentage error comprises:
calculating the average absolute percentage error MAPE of the short-term traffic flow prediction model, wherein the calculation formula of the average absolute percentage error MAPE is
Figure FDA0002346676550000026
Wherein f isiObserved value of traffic flow, fi' is a predicted value of traffic flow, and n is a total number of samples;
obtaining the prediction precision of the short-term traffic flow prediction model according to the average absolute percentage error, wherein the prediction precision is recorded as m, and the specific calculation formula of m is
m=1–MAPE (9)。
5. The Bayesian optimization-based short-term traffic flow prediction method according to claim 4, wherein the obtaining of the model parameters corresponding to the prediction accuracy, the optimization of the model parameters corresponding to the prediction accuracy according to a Bayesian optimization algorithm, and the adjustment of the short-term traffic flow prediction model according to the optimized model parameters to generate the target short-term traffic flow prediction model comprises:
obtaining a punishment parameter C, an insensitive loss parameter epsilon and a kernel parameter sigma corresponding to the prediction precision;
taking a Gaussian process as an objective function of a Bayesian optimization algorithm, wherein the objective function is expressed as shown in formula (10):
f(x)~GP(μ(x),k(x,x′)) (10);
constructing an acquisition function for determining the next sample point to be acquired, wherein the acquisition function is shown in formula (11):
Figure FDA0002346676550000031
wherein the content of the first and second substances,
Figure FDA0002346676550000032
and Φ (·) represents the PDF and CDF of a standard normal distribution, respectively;
Figure FDA0002346676550000033
Figure FDA0002346676550000034
representing the current best observation; μ (x) and σ (x) represent a prediction mean function and a prediction variance function of the objective function, respectively;
and carrying out iterative optimization on a penalty parameter C, a non-sensitivity loss parameter epsilon and a kernel parameter sigma corresponding to the prediction precision according to a Gaussian process and an acquisition function, and adjusting the short-time traffic flow prediction model according to the result after the iterative optimization until a target short-time traffic flow prediction model is generated.
6. A short-term traffic flow prediction system based on Bayesian optimization, the system comprising: a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program when executed by the processor implementing the steps of:
collecting original traffic flow data passing through a fixed time interval of a fixed road position, preprocessing the original traffic flow data according to a seasonal model algorithm, and generating time sequence traffic flow data;
constructing a short-time traffic flow prediction model based on a support vector regression machine, and training the short-time traffic flow prediction model according to time sequence traffic flow data;
calculating the average absolute percentage error of the short-term traffic flow prediction model, and acquiring the prediction precision of the short-term traffic flow prediction model according to the average absolute percentage error;
obtaining model parameters corresponding to the prediction precision, optimizing the model parameters corresponding to the prediction precision according to a Bayesian optimization algorithm, and adjusting the short-time traffic flow prediction model according to the optimized model parameters until a target short-time traffic flow prediction model is generated;
and predicting the short-time traffic flow according to the target short-time traffic flow prediction model.
7. The bayesian-optimization-based short-time traffic flow prediction system according to claim 6, wherein the computer program when executed by the processor further performs the steps of:
constructing the format of the time-series traffic flow data, wherein the construction format of the time-series traffic flow data is as follows:
{(X,y)|X=[vi-1,vi-1-vi-2,vi-week,vi-week-vi-week-1,vi-day,vi-day-vi-day-1]T,y=vi} (12)
wherein v isiRepresenting the traffic flow in the ith time period, i-1 representing the ith-1 time period, i-day representing the ith time period corresponding to a time period before one day, i-week representing the ith time period corresponding to a time period before one week, and so on, X is the input feature vector of the short-time traffic flow prediction model, and y is viIs a regression target of the short-term traffic flow prediction model.
8. The bayesian-optimization-based short-time traffic flow prediction system according to claim 7, wherein the computer program when executed by the processor further performs the steps of:
acquiring a training data set corresponding to the time sequence traffic flow data, wherein the training data set is marked as D, and D { (X)1,y1),(X2,y2),...,(Xn,yn)},yi∈R,XiFeature vector, y, representing a sampleiRepresenting a corresponding traffic flow prediction target value;
constructing a short-time traffic flow prediction model supporting a vector regression, mapping input data to a high-dimensional feature space through a kernel function, and constructing a nonlinear mapping from an input space to an output space, wherein the short-time traffic flow prediction model is marked as f (x), and the calculation mode of f (x) is shown as a formula (13):
Figure FDA0002346676550000041
wherein
Figure FDA0002346676550000042
Representing a kernel function that converts input data to a high-dimensional feature space;
the kernel function adopts a radial basis RBF kernel function, and the radial basis RBF kernel function is shown as a formula (14):
Figure FDA0002346676550000043
where σ is a kernel parameter;
the generalized objective of the support vector regression is expressed by the following equation (15):
Figure FDA0002346676550000044
s.t f(x)i-yi≤ε+ξi(16)
Figure FDA0002346676550000045
Figure FDA0002346676550000046
wherein ξiThe lower slack variable is represented by the lower slack variable,
Figure FDA0002346676550000047
representing an upper relaxation variable corresponding to an insensitivity range y-f (x). ltoreq.epsilon, the first term being 1/2 |2The second term is an empirical error term, C is a penalty parameter, and ε is an insensitivity loss parameter.
9. The bayesian-optimization-based short-time traffic flow prediction system according to claim 8, wherein the computer program when executed by the processor further performs the steps of:
calculating the average absolute percentage error of the short-term traffic flow prediction model, and acquiring the prediction precision of the short-term traffic flow prediction model according to the average absolute percentage error, wherein the method comprises the following steps:
calculating the average absolute percentage error MAPE of the short-term traffic flow prediction model, wherein the calculation formula of the average absolute percentage error MAPE is
Figure FDA0002346676550000048
Wherein f isiObserved value of traffic flow, fi' is a predicted value of traffic flow, and n is a total number of samples;
obtaining the prediction precision of the short-term traffic flow prediction model according to the average absolute percentage error, wherein the prediction precision is recorded as m, and the specific calculation formula of m is
m=1–MAPE (20)。
10. A non-transitory computer-readable storage medium storing computer-executable instructions that, when executed by one or more processors, cause the one or more processors to perform the bayesian-optimization-based short-time traffic flow prediction method of any of claims 1-5.
CN201911397429.8A 2019-12-30 2019-12-30 Short-term traffic flow prediction method and system based on Bayesian optimization Pending CN111192453A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911397429.8A CN111192453A (en) 2019-12-30 2019-12-30 Short-term traffic flow prediction method and system based on Bayesian optimization

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911397429.8A CN111192453A (en) 2019-12-30 2019-12-30 Short-term traffic flow prediction method and system based on Bayesian optimization

Publications (1)

Publication Number Publication Date
CN111192453A true CN111192453A (en) 2020-05-22

Family

ID=70709677

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911397429.8A Pending CN111192453A (en) 2019-12-30 2019-12-30 Short-term traffic flow prediction method and system based on Bayesian optimization

Country Status (1)

Country Link
CN (1) CN111192453A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111783534A (en) * 2020-05-28 2020-10-16 东南大学 Sleep staging method based on deep learning
CN111859264A (en) * 2020-07-09 2020-10-30 北京工商大学 Time sequence prediction method and device based on Bayes optimization and wavelet decomposition
CN112016243A (en) * 2020-07-30 2020-12-01 东南大学 Traffic flow prediction model parameter calibration method based on response surface
CN112489419A (en) * 2020-10-28 2021-03-12 华为技术有限公司 Method and device for determining road capacity and storage medium
CN112884203A (en) * 2021-01-22 2021-06-01 浙江大学 Online prediction method for dioxin emission based on Bayesian support vector regression
CN113096380A (en) * 2021-03-03 2021-07-09 南京理工大学 Short-term road traffic jam prediction method based on BA-SVR algorithm
CN113409576A (en) * 2021-06-24 2021-09-17 北京航空航天大学 Bayesian network-based traffic network dynamic prediction method and system
CN113591380A (en) * 2021-07-28 2021-11-02 浙江大学 Traffic flow prediction method, medium and equipment based on graph Gaussian process
CN113763710A (en) * 2021-09-16 2021-12-07 汕头大学 Short-term traffic flow prediction method based on nonlinear adaptive system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106935030A (en) * 2017-03-31 2017-07-07 青岛海信网络科技股份有限公司 A kind of expressway safety hidden danger section recognition methods and device
CN108877223A (en) * 2018-07-13 2018-11-23 南京理工大学 A kind of Short-time Traffic Flow Forecasting Methods based on temporal correlation
CN109377754A (en) * 2018-10-29 2019-02-22 东南大学 A kind of short-term traffic flow speed predicting method under car networking environment
CN109447178A (en) * 2018-11-13 2019-03-08 淮北师范大学 A kind of svm classifier method based on mixed kernel function
CN109712393A (en) * 2019-01-10 2019-05-03 浙江工业大学 Intelligent transportation Time segments division method based on Gaussian process regression algorithm
CN110110877A (en) * 2018-10-31 2019-08-09 南京森林警察学院 Magnitude of traffic flow Forecasting Approach for Short-term and system, storage medium, electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106935030A (en) * 2017-03-31 2017-07-07 青岛海信网络科技股份有限公司 A kind of expressway safety hidden danger section recognition methods and device
CN108877223A (en) * 2018-07-13 2018-11-23 南京理工大学 A kind of Short-time Traffic Flow Forecasting Methods based on temporal correlation
CN109377754A (en) * 2018-10-29 2019-02-22 东南大学 A kind of short-term traffic flow speed predicting method under car networking environment
CN110110877A (en) * 2018-10-31 2019-08-09 南京森林警察学院 Magnitude of traffic flow Forecasting Approach for Short-term and system, storage medium, electronic equipment
CN109447178A (en) * 2018-11-13 2019-03-08 淮北师范大学 A kind of svm classifier method based on mixed kernel function
CN109712393A (en) * 2019-01-10 2019-05-03 浙江工业大学 Intelligent transportation Time segments division method based on Gaussian process regression algorithm

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
NING ZHANG: "Seasonal Autoregressive Integrated", 《TRANSPORTATION RESEARCH RECORD》 *
WANG, DONG: "Bayesian optimization of support vector machine for regression", 《INTELLIGENT DATA ANALYSIS》 *
徐承亮: "基于SGPLVM-LSSVM 算法的U 形折弯件模型参数优化研究", 《机床与液压》 *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111783534A (en) * 2020-05-28 2020-10-16 东南大学 Sleep staging method based on deep learning
CN111859264A (en) * 2020-07-09 2020-10-30 北京工商大学 Time sequence prediction method and device based on Bayes optimization and wavelet decomposition
CN111859264B (en) * 2020-07-09 2024-02-02 北京工商大学 Time sequence prediction method and device based on Bayesian optimization and wavelet decomposition
CN112016243B (en) * 2020-07-30 2022-02-15 东南大学 Traffic flow prediction model parameter calibration method based on response surface
CN112016243A (en) * 2020-07-30 2020-12-01 东南大学 Traffic flow prediction model parameter calibration method based on response surface
CN112489419A (en) * 2020-10-28 2021-03-12 华为技术有限公司 Method and device for determining road capacity and storage medium
CN112489419B (en) * 2020-10-28 2022-04-26 华为技术有限公司 Method and device for determining road capacity and storage medium
CN112884203A (en) * 2021-01-22 2021-06-01 浙江大学 Online prediction method for dioxin emission based on Bayesian support vector regression
CN113096380A (en) * 2021-03-03 2021-07-09 南京理工大学 Short-term road traffic jam prediction method based on BA-SVR algorithm
CN113409576A (en) * 2021-06-24 2021-09-17 北京航空航天大学 Bayesian network-based traffic network dynamic prediction method and system
CN113591380A (en) * 2021-07-28 2021-11-02 浙江大学 Traffic flow prediction method, medium and equipment based on graph Gaussian process
CN113763710A (en) * 2021-09-16 2021-12-07 汕头大学 Short-term traffic flow prediction method based on nonlinear adaptive system
CN113763710B (en) * 2021-09-16 2023-01-24 汕头大学 Short-term traffic flow prediction method based on nonlinear adaptive system

Similar Documents

Publication Publication Date Title
CN111192453A (en) Short-term traffic flow prediction method and system based on Bayesian optimization
Djaafari et al. Hourly predictions of direct normal irradiation using an innovative hybrid LSTM model for concentrating solar power projects in hyper-arid regions
Ayoub A review on machine learning algorithms to predict daylighting inside buildings
Abedinia et al. Improved EMD-based complex prediction model for wind power forecasting
CN109243172B (en) Traffic flow prediction method for optimizing LSTM neural network based on genetic algorithm
Jiang et al. Forecast of hourly global horizontal irradiance based on structured kernel support vector machine: A case study of Tibet area in China
Russo et al. Air quality prediction using optimal neural networks with stochastic variables
Khajavi et al. Predicting the carbon dioxide emission caused by road transport using a Random Forest (RF) model combined by Meta-Heuristic Algorithms
Mellit et al. An adaptive artificial neural network model for sizing stand-alone photovoltaic systems: application for isolated sites in Algeria
Marzouq et al. New daily global solar irradiation estimation model based on automatic selection of input parameters using evolutionary artificial neural networks
Wang et al. Bayesian optimization of support vector machine for regression prediction of short-term traffic flow
Poonia et al. Rainfall-runoff modeling for the Hoshangabad Basin of Narmada River using artificial neural network
CN111144644B (en) Short-term wind speed prediction method based on variation variance Gaussian process regression
CN105956709B (en) A kind of modularization support vector machines tide prediction method based on GUI
JP2022022106A (en) Prediction method of energy used in route executed by computer
Gürel et al. A state of art review on estimation of solar radiation with various models
CN113469427A (en) Convolution LSTM-based photovoltaic power station day-ahead power generation amount prediction method and system
Chukwu et al. Analysis of some meteorological parameters using artificial neural network method for Makurdi, Nigeria
Singla et al. Different normalization techniques as data preprocessing for one step ahead forecasting of solar global horizontal irradiance
Zjavka PV power intra‐day predictions using PDE models of polynomial networks based on operational calculus
KR20210133751A (en) Power market price prediction system based on artificial neural network
Mellit et al. Neural network adaptive wavelets for sizing of stand-alone photovoltaic systems
Pranolo et al. Optimized Three Deep Learning Models Based-PSO Hyperparameters for Beijing PM2. 5 Prediction
CN114897264A (en) Photovoltaic output interval prediction method under small sample scene based on transfer learning
Bera et al. LSTM-UKF framework for an effective global land-ocean index temperature prediction

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200522

RJ01 Rejection of invention patent application after publication