Real-time extreme learning machine Short-time Traffic Flow Forecasting Methods based on fusion
Technical field
The invention mainly relates to the intelligent transport system fields such as machine learning, forecasting traffic flow, are based especially on fusion
Real-time extreme learning machine Short-time Traffic Flow Forecasting Methods.
Background technique
It improves with the development of the global economy with social cityization, the development of transportation becomes more and more important.As
The important material base of progress of human society, transportation are the lifeblood of the entire national economic development.However in recent years, road
Vehicle, which gradually increases, causes traffic circulation efficiency to go from bad to worse, traffic jam, traffic exhaust gas exhaust emission, many and diverse effect of traffic operating
Phenomena such as rate is low, traffic accident frequently occurs, and brings puzzlement to social activitieies such as people's trips.In order to slow down traffic problems,
A series of advanced management control systems such as intelligent transportation system (ITS) are developed rapidly and are used widely, to a certain extent
Solve the problems, such as part road traffic.Forecasting traffic flow is for supporting the requirement forecasting function of traffic control system to play important work
With.Traffic flow data (can also say traffic parameter) can directly reflect the traffic behavior of macroscopic view, be the basic data of traffic service,
Meanwhile traffic flow data is also the data most easily acquired in traffic, can be detected by induction coil, microwave detection, video
A variety of methods such as detection, global positioning system (Global Position System, abbreviation GPS), Social Media equipment obtain,
Including information such as traffic flow, traffic speed, traffic accounting, journey times.Forecasting traffic flow is substantially to these traffic flow bases
Traffic flow forecasting can be divided into two classes according to predetermined period length by the prediction of this parameter:Short-term forecast and medium- and long-term forecasting.
Traffic flow data distribution shows two peak values, two low ebb features, and similar Gaussian Profile carries out peak value prediction, and improves short
When forecasting traffic flow real-time and high-precision can not only inform driver's traffic information in time, moreover it is possible to the mobile base of design and implementation
Infrastructure.Short-time traffic flow forecast requires real-time, and prediction difficulty is larger, has benefited from vehicle-mounted constantly improve with road sensing facilities
And the support of ITS and traffic control system, prediction of short-term traffic volume technology also continue to develop.
The most forecasting traffic flow mode of early stage Short-time Traffic Flow Forecasting Methods is false in simple steady equilibrium traffic flow data
It sets and is predicted, it is relatively more for the restrictive condition of data set, for example equal interval sampling, interval length are moderate, history number
Suitable, sample data noiseless etc. according to sample size, but in real traffic scene, because of equipment failure itself or external factor
(such as bad weather, road are abnormal) interference, traffic flow data are easy to happen missing, mutation in collection and transmission;On
Next, period festivals or holidays traffic flow, which is easy to increase sharply, reaches peak value etc., these situations all can lead to traffic flow data and non-stationary occur
The considerations of heterogeneities such as non-linear, heterogeneous Value Data here are unevenly distributed uniform complexity, add equipment cost factor,
The equipment such as many data monitoring, acquisition, processing, transmission can not cover whole networks of communication lines, even more increase traffic flow data
Heterogeneity, all this to factor all increase difficulty, real-time, accuracy, the stabilization of prediction to forecasting traffic flow model modeling
Property is to be improved.
In order to reinforce the scalability and robustness of Short-time Traffic Flow Forecasting Methods, keep it unstable different in traffic flow data
It remains to reach certain prediction real-time and required precision under matter situation, extends the applicability of existing prediction model, carry out different in real time
The Study on Forecasting Method of matter timing traffic flow is necessary.
Summary of the invention
The invention proposes a kind of real-time extreme learning machine Short-time Traffic Flow Forecasting Methods based on fusion, to improve in short-term
The precision of prediction and reliability of traffic flow data are suitable for arithmetic for real-time traffic flow and predict.
Mentality of designing of the invention is that the real-time extreme learning machine based on fusion predicts short-term traffic flow, short-term traffic flow
Data are presented periodically with real-time, accuracy, reliability characteristic, randomly select real-time traffic flow data, Sequence Learning is thought
Want to be applied to ELM algorithm and proposes real time sequence ELM algorithm.Real time sequence ELM algorithm is on the basis of original EL M algorithm
On, the new algorithm of one kind proposed using on-line study mode, in the algorithm, data can one by one or one piece one piece
Ground is added in network, and will abandon and not use after the completion of original data study.
The technical scheme adopted by the invention is as follows:A kind of real-time extreme learning machine short-time traffic flow forecast side based on fusion
Method includes the following steps:
Detector on S1, random selected road, acquires short-term traffic flow data according to the preset time cycle;
S2, pretreatment and the traffic flow data for normalizing acquisition judge that locating traffic scene is steady situation also right and wrong
Steady situation;
S3, if it is non-stationary traffic scene, initialize short-term traffic flow forecasting model;
S4, the real time sequence study part for establishing short-term traffic flow forecasting model;
Prediction module in S5, completion short-term traffic flow forecasting model;
S6, prediction result is subjected to anti-normalization processing and is assessed.
S7, if it is steady scene, then can directly be predicted according to S4 to S6 step.
Further, short-term traffic flow forecasting model is initialized in step S3 to include the following steps:
S31, initial data set areIt is randomly assigned the input parameter of prediction model, including input node
Weight vector wi, threshold value bi between hidden node, and randomly select the input weight ai and threshold value bi of hidden node, wherein i=1,
2,…,L;
S32, hidden layer output matrix H is calculated0:
S33, initial output weight β is calculated(0), to ensure learning performance that extreme learning machine can maintain like, it is assumed that H
Order beHaveAnd it is proved β=H+T and H+=(HTH)-1HT, then have:
Wherein P0=(H0 TH0)-1, M0=H0 TH0=P0 -1;
Wherein β, H and T refer respectively to set { β(0), β(1), β(2)..., β(n)}、{H0, H1, H2..., Hn }, { T0, T1,
T2..., Tn };
The sequence of blocks of data k=0 that S34, setting reach.
Further, the real time sequence study part that short-term traffic flow forecasting model is established in step S4 includes following step
Suddenly:
S41, the hidden layer output matrix H for calculating new addition datak+1:
S42, order
AndOutput weight can then be calculated:
S43, it is acquired according to formula
S44, setting reach sequence of blocks of data k=k+1, indicate that sliding window moves forward a position, i.e. sliding window
Size is 1, return step S41.
Further, the prediction module completed in step S5 in short-term traffic flow forecasting model includes the following steps:
S51, whenever having new data block k+1 arrival, each real time sequence learning machine training β(k+1)To calculate fk+2, wherein
fk+2The traffic flow numerical value that the expression k+2 moment is predicted;
S52, by fk+2Test set is put into predict traffic flow of lower a moment numerical value;
As long as S53, there are also new data blocks to reach, it is returned to step S51;
S54, according to formulaWeighted average is calculated, realizes Weighted Fusion mechanism;
Wherein, if single limit learning network number in real time is L, each network has the hidden layer node of identical quantity and swashs
Encourage function.
Further, the evaluation index of the step S6 is:
Assuming that observation actual traffic data on flows sequence be fi perhaps Yp (t) predicting traffic flow magnitude result be ti or
Yr(t)
(1) absolute percent error
(2) mean absolute percentage error
(3) root-mean-square error
(4) average relative error
Average relative error reflection is departure degree of the traffic flow forecasting value relative to true value, is worth smaller expression
Prediction effect is better;
(5) mean absolute error
What average relative error reflected is the order of magnitude of error between traffic flow forecasting value and true value, and value is got over
Small expression prediction effect is better;
(6) mean square error
The index not only reflects the size of traffic flow forecasting error, but also reflects the discrete distribution feelings of error
Condition.Its value is smaller, indicates that error variance degree is smaller, prediction effect is better;
(7) degree of fitting
Whether degree of fitting reflects traffic flow forecasting curve in terms of the geometrical characteristic of the magnitude of traffic flow bent with actual observation
The variation tendency of line is fitted.Its value is bigger, illustrates the predicted value of the magnitude of traffic flow closer to actual observed value, prediction effect is better.
Compared with the prior art, the advantages of the present invention are as follows:
Based on simplified Single hidden layer feedforward neural networks structure, historical data can be quickly trained in the traffic flow peak period
And can incrementally more newly arrived data, save learning time while guaranteeing certain precision of prediction.In addition, using fusion machine
System ensure that the stability and robustness of short-time traffic flow forecast.The present invention carries out weight in shortage of data and fluctuation violent period
Structure, when training stage, are consumed short, and the root-mean-square error of prediction result, standard error percentage are in confidence region.
Detailed description of the invention
Fig. 1 is short-time traffic flow forecast flow chart of the present invention;
Fig. 2 is the real-time extreme learning machine prediction algorithm implementation flow chart of the present invention based on fusion;
Fig. 3 is that sensing point US101N is in peak period 5 in example scenario one of the present invention:00AM-10:Nothing during 00AM
Actual traffic stream and predicting traffic flow value comparison diagram in the case of missing data;
Fig. 4 is that sensing point US101N is in peak period 5 in example scenario one of the present invention:00PM-10:Nothing during 00PM
Actual traffic stream and predicting traffic flow value comparison diagram in the case of missing data;
Fig. 5 is that sensing point US101N is in two peak periods without missing data cases in example scenario one of the present invention
Under APE value comparison diagram;
Fig. 6 is that sensing point SR120E is in peak period 5 in example scenario two of the present invention:00AM-10:It is deposited during 00AM
Actual traffic stream and predicting traffic flow value comparison diagram in missing data;
Fig. 7 is that sensing point SR120E is in peak period 5 in example scenario two of the present invention:00PM-10:It is deposited during 00PM
Actual traffic stream and predicting traffic flow value comparison diagram in missing data;
Fig. 8 is that sensing point SR120E is in two peak periods there are missing data feelings in example scenario two of the present invention
APE value comparison diagram under condition.
Specific embodiment
Below in conjunction with Figure of description and specific preferred embodiment, the invention will be further described, but not therefore and
It limits the scope of the invention.
Shown in reference picture 1, Fig. 2, the real time sequence extreme learning machine Short-time Traffic Flow Forecasting Methods based on fusion mainly wrap
Include following steps:
Step 1, acquisition short-term traffic flow data.The present invention has randomly selected four high speeds of California, USA by PeMS system
The sensing point of highway obtains traffic flow historical data and carries out forecast analysis.And it randomly selects 2014-11-24 to arrive
Traffic flow data during 2014-12-1, the data include the traffic flow data of conventional operational day and festivals or holidays, can be represented flat
Steady and non-stationary period scene.Wherein, preceding 7 days data are as training set, and the data of last day are as test set.Using
These data predict the intraday traffic flow peak period 5 respectively:00-10:00AM and 5:00-10:Data during 00PM are complete
With the traffic flow variation in the case of two kinds of shortage of data.The data of acquisition are divided into two parts by the invention:Scene one, using adopting
The data set of collection, after being learnt, the partial data of traffic flow peak period in prediction one day;Scene two, for traffic flow
In the case where shortage of data, data reconstruction prediction is carried out using improved real-time extreme learning machine frame, syncretizing mechanism is added simultaneously
Verifying, makes prediction result more steady under the premise of guaranteeing certain precision of prediction.
Step 2, the short-term traffic flow data for importing acquisition.If it succeeds, continuing the judgement of traffic scene, if failure
It then exits, imports data again.
Step 3, the short-term traffic flow data of pretreatment acquisition.As the basis of short-time traffic flow forecast, the quality of data pair
The validity of short-time forecasting model plays an important role.Judge whether traffic flow data is abnormal, is judged:Vehicle is in road
The traveling of road meets certain rule, therefore collected traffic flow data must belong to one of following two situation:(1) if vehicle flowrate
flow>0, speed speed>0 and occupation rate occupancy>0;(2) if flow=0, speed=0.It is unsatisfactory for the above item
Any one traffic flow data is then considered as obvious abnormal data in part.Place is normalized to data again after pretreatment
Reason, normalization are to reduce time loss to accelerate to predict calculating speed.
Step 4, initialization short-term traffic flow forecasting model.Initial data set isIt is randomly assigned to predict
The input parameter of model including weight vector wi, the threshold value bi between input node and hidden node, and randomly selects the defeated of hidden node
Enter weight ai and threshold value bi, wherein i=1,2 ..., L;
Step 5 establishes real time sequence study mechanism.In the algorithm, using sliding window, according to having trained, new reached
The time-space relationship of traffic flow data, dynamic slide, original data after the completion of study will with the movement of sliding window and
It is abandoned and does not use, and newly arrived data can be added in network one by one or one by one.With+1 step of kth
Added data block constantly reaches, wherein Nk+1The number for indicating+1 step of kth addition data calculates the hidden layer of new addition data
Output matrix Hk+1:
It enables againCalculate output weight:
It is k=k+1, return step 4 that the sequence of blocks of data reached, which is arranged,.
Adaptive drop mechanism is added in step 6.For the data of trained mistake, it to newly added data influence not
Greatly, distribute different weights according to the successive and data feature of distance objective time itself, adaptively abandon part, then with newly
Training sample is predicted together, guarantees the accuracy of prediction while embodying data heterogeneity.
Weighted average syncretizing mechanism is added in step 7.Being weighted and averaged syncretizing mechanism is to consider multiple mutually isostructural real-time sequences
Multiple results by multiple predictions are weighted and averaged by the influence of column learning machine according to the following formula:
Step 8, experimental result carry out renormalization, then are assessed and analyzed.In order to intuitively embody the peak period in short-term
The predicted value and actual observed value of traffic flow data, the present invention are chosen respectively at sensing point US101N and sensing point SR120EN two
The observation data and prediction data in two traffic flow peak periods of on December 1st, 2014, compare different prediction algorithms, draw
Image following Fig. 3 to Fig. 8.Wherein, black dotted lines represent actual observed value, remaining respectively represents multi-layered perception neural networks prediction
Traffic flow, the predicted value of wavelet neural network, the traffic flow of extreme learning machine prediction, fusion real-time extreme learning machine prediction
Traffic flow.In scene one, forecasting traffic flow value and actual comparison at sensing point US101N, the predicting interval are 5 minutes, fusion
The predicted value most closing to reality observation trend of real-time extreme learning machine.And multi-layered perception neural networks are fluctuated in traffic flow data
Fluctuation when larger is it is also obvious that prediction error is larger.It is by the predicted value that ERS-ELM is calculated as can be seen from Figure 3
Closest to true traffic flow trend, even if 6:10-7:In this section of fluctuation of 00AM bigger period, so most
APE error is the smallest.Extreme learning machine is second-best algorithm, but 6:00-7:Error amount during 05AM is still very big.
6:00-7:During 30AM, the predicted value that wavelet neural network obtains is to deviate actual value farthest.And 5:00-10:The 00PM phase
Between traffic flow data fluctuation be serrated, to prediction bring very big difficulty.Fig. 4 illustrates calculated by ERS-ELM
Predicted value is closest to actual traffic flow trend, and the predicted value that other three algorithms obtain all is not so good as ERS-ELM.Equally,
APE value is also the smallest.
In scene two there is the traffic flow data of damage in traffic flow peak period.Each run algorithm, the algorithm require to lead to
The traffic flow trend curve of reconstruct is crossed to predict the data of damage.From experimental result as can be seen that the algorithm proposed can be faster
Ground learns historical data, and data that by sliding window and incrementally addition upper a moment is predicted obtain the number that lower a moment is predicted
According to, and precision of prediction is relatively good.In figure as can be seen that 5:20-6:05AM, 6:55-7:10PM, 8:45-9:00PM these three
There is damage in the period, in order to preferably compare the error between actual traffic fluxion value and the traffic flow numerical value of prediction, herein
Whole curves is depicted, the traffic flow data part lacked including being damaged.It is sectioned out in figure using block diagram.From figure
As can be seen that four kinds of prediction techniques can match well in the period of Trend Stationary, but in the damage stage, ERS-ELM is
A kind of algorithm that matching traffic flow trend matches best.For example, in Fig. 7,6:55-7:10PM, 8:45-9:The 00PM time
Section, only ERS-ELM has predicted a corner trend, and other three kinds of algorithms all only simply follow existing trend.
The estimated performance of ELM is only second to ERS-ELM algorithm, and wavelet neural network and multi-layered perception neural networks do not adapt to fluctuate
Point.
We can also show that, to draw a conclusion, traffic flow trend is steady, and precision of prediction is higher.But data set is not
Influence the single factor of estimated performance.Under non-stationary scene, for example there are the data of damage, algorithm needs effective study to go through
Relationship between history data simultaneously analyzes data variation trend.ERS-ELM can soon learn historical data well, and pass through
The sliding window of variable-size keeps high precision of prediction.
The data that the embodiment of the present invention uses come from open Performance Appraisal System platform PeMS 14.0.
Above-mentioned only presently preferred embodiments of the present invention, is not intended to limit the present invention in any form.Although of the invention
It has been disclosed in a preferred embodiment above, however, it is not intended to limit the invention.Anyone skilled in the art is not taking off
In the case where from technical solution of the present invention range, all technical solution of the present invention is made perhaps using the technology contents of the disclosure above
Mostly possible changes and modifications or equivalent example modified to equivalent change.Therefore, all without departing from technical solution of the present invention
Content, technical spirit any simple modifications, equivalents, and modifications made to the above embodiment, should all fall according to the present invention
In the range of technical solution of the present invention protection.