CN110909953A - Parking position prediction method based on ANN-LSTM - Google Patents

Parking position prediction method based on ANN-LSTM Download PDF

Info

Publication number
CN110909953A
CN110909953A CN201911220715.7A CN201911220715A CN110909953A CN 110909953 A CN110909953 A CN 110909953A CN 201911220715 A CN201911220715 A CN 201911220715A CN 110909953 A CN110909953 A CN 110909953A
Authority
CN
China
Prior art keywords
ann
model
lstm
prediction
lstm 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
CN201911220715.7A
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.)
Zhejiang University of Science and Technology ZUST
Original Assignee
Zhejiang University of Science and Technology ZUST
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 Zhejiang University of Science and Technology ZUST filed Critical Zhejiang University of Science and Technology ZUST
Priority to CN201911220715.7A priority Critical patent/CN110909953A/en
Publication of CN110909953A publication Critical patent/CN110909953A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/049Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/26Government or public services

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Strategic Management (AREA)
  • Evolutionary Computation (AREA)
  • Computational Linguistics (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Biophysics (AREA)
  • Mathematical Physics (AREA)
  • Biomedical Technology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Human Resources & Organizations (AREA)
  • Tourism & Hospitality (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Educational Administration (AREA)
  • Primary Health Care (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Feedback Control In General (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a berth prediction method based on ANN-LSTM, which comprises the following steps: a. adding multiple layers of ANN in a full connection mode in front of the LSTM model, and adding a random discarding layer in the LSTM model to complete the construction of the ANN-LSTM model; b. taking the historical number of parking positions of a target parking lot, carrying out normalization processing on the historical number of parking positions to form a data set, taking 60-90% of data in the data set as a training set, and taking 10-40% of data in the data set as a test set; c. inputting the training set into an ANN-LSTM model for training; the trained ANN-LSTM model is used for predicting the vehicle berth of the target parking lot, and the test set verifies the prediction accuracy of the ANN-LSTM model.

Description

Parking position prediction method based on ANN-LSTM
Technical Field
The invention relates to the technical field of parking lot berth prediction, in particular to a berth prediction method based on ANN-LSTM.
Background
With the general improvement of the consumption level of people in China, the number of motor vehicles kept by urban and rural residents in China is remarkably increased, the parking problem is gradually highlighted in the daily life and work of people, and is particularly obvious in the central area of a city. In order to relieve the contradiction between supply and demand of motor vehicles at berth, a plurality of motor vehicle berth prediction methods applying artificial intelligence analyze the problem, and further judge the supply and demand conditions of the berth near the motor vehicles by means of accurate berth prediction, thereby providing reliable berth demand for drivers and relieving the problem of parking in cities and countryside.
The traditional parking space prediction method is mainly a single network prediction technology or a BP neural network prediction method, can effectively predict parking spaces in a short time by processing parking space data of a parking lot, but has insufficient data volatility processing capacity, and the obtained prediction data has poor stability. For example, the invention with the publication number of CN108648449A discloses a parking space prediction method based on a combination of kalman filtering and NAR neural network, according to the predicted data, the accuracy of two prediction models of kalman filtering and NAR neural network is compared, and the times with high accuracy are used as the weight for performing combined prediction of the two models, so as to obtain the predicted value of the combined model. However, in many parking lots, it is difficult to provide a large amount of parking position data for the combined model to perform weight selection for model fusion, so that the practical value of the model is greatly reduced, and the method is not suitable for the early stage of parking position prediction.
Disclosure of Invention
The invention aims to provide a berthage prediction method based on ANN-LSTM. The invention can achieve the purpose of predicting the parking position condition of the parking lot, and the prediction accuracy of the parking position condition is high.
The technical scheme of the invention is as follows: a berthage prediction method based on ANN-LSTM comprises the following steps:
a. adding multiple layers of ANN in a full connection mode in front of the LSTM model, and adding a random discarding layer in the LSTM model to complete the construction of the ANN-LSTM model;
b. taking the historical number of parking positions of a target parking lot, carrying out normalization processing on the historical number of parking positions to form a data set, taking 60-90% of data in the data set as a training set, and taking 10-40% of data in the data set as a test set;
c. inputting the training set into an ANN-LSTM model for training; and predicting the vehicle berth of the target parking lot by using the trained ANN-LSTM model so as to verify the prediction accuracy of the ANN-LSTM model by using a test set.
In the ANN-LSTM-based parking space prediction method, in step a, the parking space history number is the parking space number of the target parking lot in a certain time period, the parking space history number is normalized to be compressed to a real number between 0 and 1, and a formula of the normalization process is as follows:
x=d/dmax
wherein d is the original data before the normalization processing of the training set, dmaxAnd x is training set data obtained after normalization, wherein the x is the sum of the number of parking lots.
In the aforementioned berthage prediction method based on the ANN-LSTM, in step a, parameter adjustment of the model is performed after the ANN-LSTM model is constructed, where the parameter adjustment includes adjustment of a weight parameter and model hyper-parameter adjustment; the weight parameter of the ANN-LSTM model is adjusted by adopting a BPTT algorithm; the super-parameter adjustment of the ANN-LSTM model adopts a grid method to optimize parameters, and the super-parameters comprise a random discarding layer probability n, the number k of ANN layers and the number m of wavelet neural network layer nodes in the ANN; and listing all the hyper-parameter combinations according to a certain step length, calculating the prediction precision of the ANN-LSTM model under all the combination modes, and selecting a group of data with the highest precision as the final result of parameter optimization.
In the ANN-LSTM-based berthage prediction method, all hyper-parameters are listed in a certain step length to form training set data XtrTraining set data XtrOutput Y from ANN-LSTM modeltrThe relationship is as follows:
minε(Xtr,Ytr)
Figure BDA0002300775170000031
wherein stepm、stepn、stepkRespectively representing the search step lengths of m, n and k, forming a three-dimensional search space by the values of the three hyper-parameters, and optimizing by a grid search method;
setting kmaxIs 10, n is [1,1 ]],stepnSet to 0.1, m is set to [10,50 ]],stepmSet to 10; the searching process is m, n to k from inside to outside;
setting the step length as a larger value, traversing the value ranges of 3 parameters, training and predicting by using an ANN-LSTM model, storing the precision of a prediction result and corresponding parameters, and selecting the maximum precision and corresponding parameters to obtain the approximate range of the optimal value; and then further reducing the step length to 1, repeating the operation, accurately positioning the position of the optimal value, and determining the optimal value as the value of the model hyper-parameter.
In the step c, the trained ANN-LSTM model is used for prediction, the prediction error of the ANN-LSTM model is calculated according to the prediction result, an error sequence is obtained, the error sequence is used for training the extreme learning machine model, the deterministic component with certain value in the error sequence is extracted and introduced into the prediction of the ANN-LSTM model, and the prediction accuracy of the ANN-LSTM model is improved.
The ANN-LSTM-based berthage prediction method comprises the following specific steps of carrying out prediction by using a trained ANN-LSTM model, calculating a prediction error of the ANN-LSTM model according to a prediction result to obtain an error sequence, training an extreme learning machine model by using the error sequence, extracting a certain valuable deterministic component in the error sequence, and introducing the component into the prediction of the ANN-LSTM model:
s1: inputting historical parking position data, dividing the data into a training set and a test set after preprocessing, wherein the input of the training set is xtrThe output of the training set is ytrThe input of the test set is xteThe output of the test set is yte(ii) a Training the training set by using an ANN-LSTM model, and storing weight parameters after the trained ANN-LSTM model is obtained, and recording the weight parameters as a neural network model A;
s2 inputting x of training settrInputting the neural network model A and outputting a predicted value yaPredicting value yaAnd the output y of the training settrThe sequence of errors in between is er1,
er1=ya-yte
s3: after denoising processing is carried out on er1, inputting a limit learning machine model, training the limit learning machine model, storing weight parameters and recording as a neural network model B;
s4: input x of test setteInputting the neural network model A and outputting a predicted value ytPredicting value ytAnd output y of the test setteThe sequence of errors in between is er2,
er2=yt-yte
s5: after determining a segmentation scale through phase space reconstruction, an error sequence er2 is input into a trained neural network model B to obtain an output value er3 as an actual error compensation value;
s6: compensating the output prediction value y in the step S4 using the error compensation value er3tTo obtain the final output y of the ANN-LSTM model,
y=yt-er3,
the method is used for improving the prediction accuracy of the ANN-LSTM model through the error compensation.
In the aforementioned berthage prediction method based on ANN-LSTM, the error sequence training extreme learning machine model is a single-hidden-layer feedforward neural network, assuming that there are N random samples (X)i,ti) The hidden layer has l nodes, the output o of each nodejCan be expressed as
Figure BDA0002300775170000051
Wherein g (x) is an activation function, WiTo input the weights, βjAs output weights, bjIs the bias of the jth hidden layer unit, Wi·XjRepresents WiAnd XjThe inner product of (d).
The goal of the learning of the single hidden layer feedforward neural network is to minimize the output error, which is expressed as
Figure BDA0002300775170000052
The above formula is expressed in matrix form as:
Hβ=T,
where H is the hidden layer node output, β is the output weight, and T is the desired output;
Figure BDA0002300775170000061
the training process of the single hidden layer feedforward neural network is to obtain
Figure BDA0002300775170000062
The representation method is as follows:
Figure BDA0002300775170000063
in the extreme learning algorithm, once the weight W is inputiAnd bias of hidden layer bjRandomly determined, the output matrix H of the hidden layer is uniquely determined, training the single hidden layer feedforward neural network is converted into solving a linear system H β T, and the output weight can be determined.
In the aforementioned parking lot berth prediction method based on ANN-LSTM, in step c, after the vehicle berth prediction of the target parking lot is performed by using the trained ANN-LSTM model, the output prediction value is subjected to inverse normalization processing to be used as accurate parking lot berth prediction data, and the inverse normalization method is as follows:
d=d·dmax
wherein d is the predicted value of inverse normalization, dmaxThe total number of parking spaces of the parking lot.
Compared with the prior art, the invention adopts the ANN-LSTM model built by combining the Artificial Neural Network (ANN) and the Long Short-Term Memory network (LSTM) to predict the parking berth number, adds a plurality of neural network layers adopting a full connection form before data is input into the LSTM, preliminarily extracts the characteristics of the input data and transmits the characteristics to the LSTM model, and adds a random discarding layer (Dropout) in the LSTM model to prevent the model from being trained and fitted; according to the invention, the parking position historical number of the target parking lot is subjected to normalization processing to form a data set so as to reduce noise influence in the subsequent training process; and performing autonomous training learning on the ANN-LSTM model by using a training set divided by the data set, predicting the parking position condition of the target parking lot by using the trained ANN-LSTM model, and finally verifying the prediction accuracy of the ANN-LSTM model by using a test set. Therefore, the prediction accuracy and robustness of the parking lot berth prediction method can be greatly improved; the invention has strong practicability and stable and accurate prediction data, and can fully provide the berth supply and demand condition of the target parking lot for users. In addition, the method carries out parameter adjustment on the ANN-LSTM model after the ANN-LSTM model is built, and further improves the prediction accuracy of the ANN-LSTM model by optimizing and confirming the numerical values of the weight parameters and the model hyper-parameters. The invention also compensates the prediction result of the model through error compensation, and takes the output value after error compensation as the prediction result of the model, thereby further improving the accuracy of parking lot berth prediction.
Drawings
FIG. 1 is a graph in which the predicted values and the actual values are fitted to each other in example 1;
FIG. 2 is a graph in which the predicted values and the actual values are fitted to each other in example 2;
FIG. 3 is a graph in which the predicted value and the actual value are fit together;
FIG. 4 is a graph of ANN-LSTM prediction error;
FIG. 5 is an error sequence chart;
FIG. 6 is a graph of model prediction error after error compensation.
Detailed Description
The invention is further illustrated by the following figures and examples, which are not to be construed as limiting the invention.
Example 1: a berthage prediction method based on ANN-LSTM comprises the following steps:
a. adding multiple layers of ANN (Artificial Neural Network) in a full connection form in front of the LSTM model, and adding a random discarding layer in the LSTM (Long Short-term memory Network) model to complete the construction of the ANN-LSTM model;
b. acquiring historical parking space number of a target parking lot, acquiring historical parking space data of the target parking lot through a web crawler, wherein 12583 time points are included by taking a second as a unit, the parking space number of each time point is used as historical parking space data, 80% of the historical data is used as a training set, and 20% of the historical data is used as a testing set; and carrying out normalization processing on the training set and the test set to form a data set, and compressing the data set into a real number between 0 and 1, wherein the formula of the normalization processing is as follows:
x=d/dmax
wherein d is the set of training setsRaw data before normalization, dmaxThe number sum of parking lots is obtained, and x is training set data obtained after normalization;
c. inputting the training set into an ANN-LSTM model for training; the trained ANN-LSTM model is used for predicting the vehicle berth of a target parking lot, and inverse normalization processing is carried out through a prediction output value to be used as accurate parking lot berth prediction data, wherein the inverse normalization method comprises the following steps:
d=d·dmax
wherein d is the predicted value of inverse normalization, dmaxThe total number of parking spaces of the parking lot.
And finally verifying the prediction accuracy of the parking lot berth prediction method by using the test set.
Example 2: a berthage prediction method based on ANN-LSTM comprises the following steps:
a. adding multiple layers of ANN in a full connection mode in front of the LSTM model, and adding a random discarding layer in the LSTM model to complete the construction of the ANN-LSTM model; after an ANN-LSTM model is built, parameter adjustment of the model is carried out, wherein the parameter adjustment comprises adjustment of weight parameters and model hyper-parameter adjustment; the weight parameter adjustment of the ANN-LSTM model is performed by adopting a BPTT algorithm, and the BPTT (backward propagation time) algorithm is a back propagation algorithm of an RNN (recurrent neural network) and is a common algorithm which can be mastered by a person skilled in the art in the field of prediction, so that the principle of the invention is not specifically described; the super-parameter adjustment of the ANN-LSTM model adopts a grid method to optimize parameters, and the super-parameters comprise a random discarding layer probability n, the number k of layers of the ANN and the number m of nodes of a wavelet neural network in the ANN; and listing all the hyper-parameter combinations according to a certain step length, calculating the prediction precision of the ANN-LSTM model under all the combination modes, and selecting a group of data with the highest precision as the final result of parameter optimization.
All the hyperparameters are listed in a certain step length and combined to form training set data XtrTraining set data XtrOutput Y from ANN-LSTM modeltrThe relationship is as follows:
minε(Xtr,Ytr)
Figure BDA0002300775170000091
wherein stepm、stepn、stepkRespectively representing the search step lengths of m, n and k, forming a three-dimensional search space by the values of the three hyper-parameters, and optimizing by a grid search method;
setting kmaxIs 10, n is [1,1 ]],stepnSet to 0.1, m is set to [10,50 ]],stepmSet to 10; the searching process is m, n to k from inside to outside;
setting the step length as a larger value, traversing the value ranges of 3 parameters, training and predicting by using an ANN-LSTM model, storing the precision of a prediction result and corresponding parameters, and selecting the maximum precision and corresponding parameters to obtain the approximate range of the optimal value; and then further reducing the step length to 1, repeating the operation, accurately positioning the position of the optimal value, and determining the optimal value as the value of the model hyper-parameter.
b. Acquiring historical parking space number of a target parking lot, acquiring historical parking space data of the target parking lot through a web crawler, wherein 12583 time points are included by taking a second as a unit, the parking space number of each time point is used as historical parking space data, 80% of the historical data is used as a training set, and 20% of the historical data is used as a testing set; and carrying out normalization processing on the training set and the test set to form a data set, and compressing the data set into a real number between 0 and 1, wherein the formula of the normalization processing is as follows:
x=d/dmax
wherein d is the original data before the normalization processing of the training set, dmaxThe number sum of parking lots is obtained, and x is training set data obtained after normalization;
c. inputting the training set into an ANN-LSTM model for training; the trained ANN-LSTM model is used for predicting the vehicle berth of a target parking lot, and inverse normalization processing is carried out through a prediction output value to be used as accurate parking lot berth prediction data, wherein the inverse normalization method comprises the following steps:
d=d·dmax
wherein d is the predicted value of inverse normalization, dmaxThe total number of parking spaces of the parking lot.
And finally verifying the prediction accuracy of the parking lot berth prediction method by using the test set.
Example 3: a berthage prediction method based on ANN-LSTM comprises the following steps:
a. adding multiple layers of ANN in a full connection mode in front of the LSTM model, and adding a random discarding layer in the LSTM model to complete the construction of the ANN-LSTM model; after an ANN-LSTM model is built, parameter adjustment of the model is carried out, wherein the parameter adjustment comprises adjustment of weight parameters and model hyper-parameter adjustment; the weight parameter of the ANN-LSTM model is adjusted by adopting a BPTT algorithm; the super-parameter adjustment of the ANN-LSTM model adopts a grid method to optimize parameters, and the super-parameters comprise a random discarding layer probability n, the number k of layers of the ANN and the number m of nodes of a wavelet neural network in the ANN; and listing all the hyper-parameter combinations according to a certain step length, calculating the prediction precision of the ANN-LSTM model under all the combination modes, and selecting a group of data with the highest precision as the final result of parameter optimization.
All the hyperparameters are listed in a certain step length and combined to form training set data XtrTraining set data XtrOutput Y from ANN-LSTM modeltrThe relationship is as follows:
min ε(Xtr,Ytr)
Figure BDA0002300775170000111
wherein stepm、stepn、stepkRespectively representing the search step lengths of m, n and k, forming a three-dimensional search space by the values of the three hyper-parameters, and optimizing by a grid search method;
setting kmaxIs 10, n is [1,1 ]],stepnSet to 0.1, m is set to [10,50 ]],stepmSet to 10; the searching process is m, n to k from inside to outside;
setting the step length as a larger value, traversing the value ranges of 3 parameters, training and predicting by using an ANN-LSTM model, storing the precision of a prediction result and corresponding parameters, and selecting the maximum precision and corresponding parameters to obtain the approximate range of the optimal value; and then further reducing the step length to 1, repeating the operation, accurately positioning the position of the optimal value, and determining the optimal value as the value of the model hyper-parameter.
b. Acquiring historical parking space number of a target parking lot, acquiring historical parking space data of the target parking lot through a web crawler, wherein 12583 time points are included by taking a second as a unit, the parking space number of each time point is used as historical parking space data, 80% of the historical data is used as a training set, and 20% of the historical data is used as a testing set; and carrying out normalization processing on the training set and the test set to form a data set, and compressing the data set into a real number between 0 and 1, wherein the formula of the normalization processing is as follows:
x=d/dmax
wherein d is the original data before the normalization processing of the training set, dmaxThe number sum of parking lots is obtained, and x is training set data obtained after normalization;
c. inputting the training set into an ANN-LSTM model for training; the method comprises the following steps of utilizing a trained ANN-LSTM model to predict vehicle berths of a target parking lot, calculating a prediction error of the ANN-LSTM model according to a prediction result, obtaining an error sequence, then using the error sequence to train an extreme learning machine model, extracting a deterministic component with a certain value in the error sequence, and introducing the component into prediction of the ANN-LSTM model, wherein the method specifically comprises the following steps:
s1: inputting historical parking position data, dividing the data into a training set and a test set after preprocessing, wherein the input of the training set is xtrThe output of the training set is ytrThe input of the test set is xteThe output of the test set is yte(ii) a Training the training set by using an ANN-LSTM model, and storing weight parameters after the trained ANN-LSTM model is obtained, and recording the weight parameters as a neural network model A;
s2 inputting x of training settrInputting the neural network model A and outputting a predicted value yaPredicting value yaAnd the output y of the training settrThe sequence of errors in between is er1,
er1=ya-yte
s3: after denoising the er1, inputting the denoised model into a limit learning machine model, wherein the error sequence training limit learning machine model is a single-hidden-layer feedforward neural network, and N random samples (X) are assumedi,ti) The hidden layer has l nodes, the output o of each nodejCan be expressed as
Figure BDA0002300775170000131
Wherein g (x) is an activation function, WiTo input the weights, βjAs output weights, bjIs the bias of the jth hidden layer unit, Wi·XjRepresents WiAnd XjThe inner product of (d).
The goal of the learning of the single hidden layer feedforward neural network is to minimize the output error, which is expressed as
Figure BDA0002300775170000132
The above formula is expressed in matrix form as:
Hβ=T,
where H is the hidden layer node output, β is the output weight, and T is the desired output;
Figure BDA0002300775170000133
the training process of the single hidden layer feedforward neural network is to obtain
Figure BDA0002300775170000134
The representation method is as follows:
Figure BDA0002300775170000135
in the extreme learning algorithm, once the weight W is inputiAnd bias of hidden layer bjRandomly determining an output matrix H of the hidden layer, uniquely determining the output matrix H of the hidden layer, training the single hidden layer feedforward neural network to solve a linear system H β -T, and determining the output weight;
training an extreme learning machine model, storing weight parameters and recording as a neural network model B;
s4: input x of test setteInputting the neural network model A and outputting a predicted value ytPredicting value ytAnd output y of the test setteThe sequence of errors in between is er2,
er2=yt-yte
s5: after determining a segmentation scale through phase space reconstruction, an error sequence er2 is input into a trained neural network model B to obtain an output value er3 as an actual error compensation value;
s6: compensating the output prediction value y in the step S4 using the error compensation value er3tTo obtain the final output y of the ANN-LSTM model,
y=yt-er3,
and obtaining the final predicted output value of the ANN-LSTM model through the error compensation.
And performing inverse normalization processing through the prediction output value to be used as accurate parking lot berth prediction data, wherein the inverse normalization method comprises the following steps:
z*=z*(zmax-zmin)+zmin
wherein z is the predicted output value of the parking lot berth prediction method, zmaxIs the maximum value in the set of parking space history numbers, zminIs the minimum value in the set of parking space history numbers, z*And the target parking lot berth prediction data is obtained after inverse normalization processing.
And finally verifying the prediction accuracy of the parking lot berth prediction method by using the test set.
Comparative example 1: parking lot berth prediction by using a Wavelet Neural Network (WNN) model of a single hidden layer.
Comparative example 2: and (3) parking lot berth prediction by using a Long Short-Term Memory network (LSTM) model.
Applicants compared the ANN-LSTM models of example 1, example 2 and example 3 and the predicted results of comparative example 1 and comparative example 2, comparing the Mean Absolute Percent Error (MAPE) at the same prediction interval, and the structures are shown in Table 1:
Figure BDA0002300775170000151
TABLE 1
From the result error specific values in table 1, it can be found that when the predicted time interval is 1, the network model prediction result errors of the WNN model in comparative example 1, the LSTM model in comparative example 2 and the ANN-LSTM model in embodiment 1 of the present invention are not large, and the prediction accuracy can reach 90%, wherein the accuracy of the LSTM model and the ANN-LSTM model is slightly high, and the interval of 1 represents the number of parking spaces predicted after 3 minutes, so that the practical value is low, and the prediction accuracy at a long time interval needs to be compared.
The predicted performance of both comparative examples 1 and 2 began to decline as the time interval increased from 30 minutes to 60 minutes. The WNN model has the largest prediction error, which shows that the descending amplitude of the prediction accuracy of the wavelet neural network model can be increased along with the increase of the prediction interval. Meanwhile, the accuracy of the LSTM is slightly reduced along with the increase of the prediction degradation, but the prediction accuracy of the ANN-LSTM model in the embodiment 1 is still over 90%, which shows that the ANN-LSTM model in the embodiment 1 has better adaptability, can be extracted from special training sets more comprehensively, and has a more predictable time interval. The invention adds the ANN sharing the weight in front of the LSTM model, effectively combines the advantages of the ANN and the LSTM model, not only increases the depth of the model and the connection mode between network layers, but also inherits the advantage of the time sequence of the LSTM, and improves the prediction performance of the whole network model. Therefore, the prediction effect of the ANN-LSTM model is better than that of the original LSTM model. The prediction error of the example 2 is smaller than that of the example 1, because the parameter adjustment of the model is performed after the ANN-LSTM model used in the example 2 is constructed, and the prediction accuracy of the ANN-LSTM model is further improved by optimizing and confirming the values of the weight parameter and the model hyper-parameter. Further, the prediction error in embodiment 3 is smaller than that in embodiment 2, because the prediction result of the model is compensated by error compensation in embodiment 3, and the output value after error compensation is used as the prediction result of the model, the accuracy of the parking lot berth prediction can be further improved.
The applicant also counts the prediction results of the ANN-LSTM models in embodiments 1, 2 and 3, and selects the prediction result with a prediction interval of 30 minutes, as shown in fig. 1-3, fig. 1 is a graph of a curve fit between the predicted value and the actual value in embodiment 1, fig. 2 is a graph of a curve fit between the predicted value and the actual value in embodiment 2, fig. 3 is a graph of a curve fit between the predicted value and the actual value in embodiment 3, and the dotted line circle in fig. 1, the dotted line circle in fig. 2 and the same curve position in fig. 3 are selected, so that it is obvious that the prediction result of the invention has a good fitting effect and a high overall fitting degree, but the circled part in embodiments 1 and 2 also has a problem of slight deviation of prediction accuracy, that is, the prediction accuracy needs to be improved in a period when the number of poise changes greatly.
In order to solve the problem that the prediction accuracy needs to be improved in the time period when the parking number quantity changes greatly in the embodiment 1 and the embodiment 2, the applicant optimizes the ANN-LSTM model by an error compensation method, obtains an ANN-LSTM prediction result error curve graph shown in fig. 4 by performing curve statistics on errors after the training of the ANN-LSTM model, then obtains an error sequence graph shown in fig. 5, obtains a model prediction result error curve shown in fig. 6 after error compensation by extracting certain valuable deterministic components in the error sequence and introducing the deterministic components into the prediction result of the ANN-LSTM model, and solves the problems that the parking number data predicted by the model has large prediction deviation and low prediction accuracy locally by combining an error compensation method with the ANN-LSTM model. Fig. 3 is a parking position prediction curve diagram for performing short-time parking position data prediction by introducing an error compensation method on the basis of performing parking position data prediction by using an ANN-LSTM model, so that it can be seen from fig. 3 that the fitting effect of the curve is better and the deviation at the local peak of the curve is effectively reduced, indicating that the prediction model has better prediction accuracy and stability in the aspect of parking position data prediction.
In conclusion, the prediction accuracy and robustness of the parking lot berth prediction method can be greatly improved; the invention has strong practicability and stable and accurate prediction data, and can fully provide the berth supply and demand condition of the target parking lot for users.

Claims (8)

1. A berthage prediction method based on ANN-LSTM is characterized in that: the method comprises the following steps:
a. adding multiple layers of ANN in a full connection mode in front of the LSTM model, and adding a random discarding layer in the LSTM model to complete the construction of the ANN-LSTM model;
b. taking the historical number of parking positions of a target parking lot, carrying out normalization processing on the historical number of parking positions to form a data set, taking 60-90% of data in the data set as a training set, and taking 10-40% of data in the data set as a test set;
c. inputting the training set into an ANN-LSTM model for training; and predicting the vehicle berth of the target parking lot by using the trained ANN-LSTM model so as to verify the prediction accuracy of the ANN-LSTM model by using a test set.
2. The ANN-LSTM based berthage prediction method of claim 1, wherein: the parking space historical number in the step a is the parking space number of the target parking lot in a certain time period, normalization processing is carried out on the parking space historical number, the parking space historical number is compressed into a real number between 0 and 1, and the formula of the normalization processing is as follows:
x=d/dmax
wherein d is the original data before the normalization processing of the training set, dmaxAnd x is training set data obtained after normalization, wherein the x is the sum of the number of parking lots.
3. The ANN-LSTM based berthage prediction method of claim 1, wherein: in the step a, parameter adjustment of the ANN-LSTM model is carried out after the ANN-LSTM model is built, wherein the parameter adjustment comprises adjustment of weight parameters and model hyper-parameter adjustment; the weight parameter of the ANN-LSTM model is adjusted by adopting a BPTT algorithm; the super-parameter adjustment of the ANN-LSTM model adopts a grid method to optimize parameters, and the super-parameters comprise a random discarding layer probability n, the number k of layers of the ANN and the number m of nodes of a wavelet neural network in the ANN; and listing all the hyper-parameter combinations according to a certain step length, calculating the prediction precision of the ANN-LSTM model under all the combination modes, and selecting a group of data with the highest precision as the final result of parameter optimization.
4. The ANN-LSTM based berthage prediction method of claim 3, further comprising: all the hyperparameters are listed in a certain step length and combined to form training set data XtrTraining set data XtrOutput Y from ANN-LSTM modeltrThe relationship is as follows:
minε(Xtr,Ytr)
Figure FDA0002300775160000021
wherein stepm、stepn、stepkRespectively representing the search step lengths of m, n and k, forming a three-dimensional search space by the values of the three hyper-parameters, and optimizing by a grid search method;
setting kmaxIs 10, n is [1,1 ]],stepnSet to 0.1, m is set to [10,50 ]],stepmSet to 10; the searching process is m, n to k from inside to outside;
setting the step length as a larger value, traversing the value ranges of 3 parameters, training and predicting by using an ANN-LSTM model, storing the precision of a prediction result and corresponding parameters, and selecting the maximum precision and corresponding parameters to obtain the approximate range of the optimal value; and then further reducing the step length to 1, repeating the operation, accurately positioning the position of the optimal value, and determining the optimal value as the value of the model hyper-parameter.
5. The ANN-LSTM based berthage prediction method of claim 1, wherein: and c, predicting by using the trained ANN-LSTM model, calculating a prediction error of the ANN-LSTM model according to a prediction result to obtain an error sequence, training the extreme learning machine model by using the error sequence, extracting a certain valuable deterministic component in the error sequence, and introducing the component into the prediction of the ANN-LSTM model to improve the prediction accuracy of the ANN-LSTM model.
6. The ANN-LSTM based berthage prediction method of claim 5, further comprising: the method comprises the following specific steps of applying a trained ANN-LSTM model to predict, calculating a prediction error of the ANN-LSTM model according to a prediction result to obtain an error sequence, training an extreme learning machine model by using the error sequence, extracting a deterministic component with a certain value in the error sequence, and introducing the deterministic component into the prediction of the ANN-LSTM model:
s1: inputting historical parking position data, dividing the data into a training set and a test set after preprocessing, wherein the input of the training set is xtrThe output of the training set is ytrThe input of the test set is xteThe output of the test set is yte(ii) a Training the training set by using an ANN-LSTM model, and storing weight parameters after the trained ANN-LSTM model is obtained, and recording the weight parameters as a neural network model A;
s2 inputting x of training settrInputting the neural network model A and outputting a predicted value yaPredicting value yaAnd the output y of the training settrThe sequence of errors in between is er1,
er1=ya-yte
s3: after denoising processing is carried out on er1, inputting a limit learning machine model, training the limit learning machine model, storing weight parameters and recording as a neural network model B;
s4: input x of test setteInputting the neural network model A and outputting a predicted value ytPredicting value ytAnd output y of the test setteThe sequence of errors in between is er2,
er2=yt-yte
s5: after determining a segmentation scale through phase space reconstruction, an error sequence er2 is input into a trained neural network model B to obtain an output value er3 as an actual error compensation value;
s6: compensating the output prediction value y in the step S4 using the error compensation value er3tTo obtain the final output y of the ANN-LSTM model,
y=yt-er3,
the method is used for improving the prediction accuracy of the ANN-LSTM model through the error compensation.
7. The ANN-LSTM-based berthing prediction method of claim 6, wherein: the error sequence training extreme learning machine model is a single hidden layer feedforward neural network, and N random samples (X) are assumedi,ti) The hidden layer has l nodes, the output o of each nodejCan be expressed as
Figure FDA0002300775160000041
Wherein g (x) is an activation function, WiTo input the weights, βjAs output weights, bjIs the bias of the jth hidden layer unit, Wi·XjRepresents WiAnd XjThe inner product of (d).
The goal of the learning of the single hidden layer feedforward neural network is to minimize the output error, which is expressed as
Figure FDA0002300775160000042
The above formula is expressed in matrix form as:
Hβ=T,
where H is the hidden layer node output, β is the output weight, and T is the desired output;
Figure FDA0002300775160000051
the training process of the single hidden layer feedforward neural network is to obtain
Figure FDA0002300775160000052
The representation method is as follows:
Figure FDA0002300775160000053
in the extreme learning algorithm, once the weight W is inputiAnd bias of hidden layer bjRandomly determined, the output matrix H of the hidden layer is uniquely determined, training the single hidden layer feedforward neural network is converted into solving a linear system H β T, and the output weight can be determined.
8. The ANN-LSTM based berthage prediction method of claim 1, wherein: in the step c, after the trained ANN-LSTM model is used for predicting the vehicle berthage of the target parking lot, the output predicted value is subjected to inverse normalization processing to be used as accurate parking lot berthage prediction data, and the inverse normalization method comprises the following steps:
d=d·dmax
wherein d is the predicted value of inverse normalization, dmaxThe total number of parking spaces of the parking lot.
CN201911220715.7A 2019-12-03 2019-12-03 Parking position prediction method based on ANN-LSTM Pending CN110909953A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911220715.7A CN110909953A (en) 2019-12-03 2019-12-03 Parking position prediction method based on ANN-LSTM

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911220715.7A CN110909953A (en) 2019-12-03 2019-12-03 Parking position prediction method based on ANN-LSTM

Publications (1)

Publication Number Publication Date
CN110909953A true CN110909953A (en) 2020-03-24

Family

ID=69821921

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911220715.7A Pending CN110909953A (en) 2019-12-03 2019-12-03 Parking position prediction method based on ANN-LSTM

Country Status (1)

Country Link
CN (1) CN110909953A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111915059A (en) * 2020-06-29 2020-11-10 西安理工大学 Method for predicting occupancy of Seq2Seq berth based on attention mechanism
CN112137585A (en) * 2020-09-24 2020-12-29 刘玉宝 Method and system for testing transplanted tendon in cruciate ligament reconstruction
CN114368768A (en) * 2020-10-15 2022-04-19 中铝国际工程股份有限公司 Aluminum hydroxide crystal seed granularity refinement explosion prediction model and method based on LSTM
CN114596726A (en) * 2021-10-27 2022-06-07 西安理工大学 Parking position prediction method based on interpretable space-time attention mechanism
CN116050725A (en) * 2022-11-08 2023-05-02 华北电力大学 Block chain consensus mechanism construction method for comprehensive energy system operation scheduling

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111915059A (en) * 2020-06-29 2020-11-10 西安理工大学 Method for predicting occupancy of Seq2Seq berth based on attention mechanism
CN111915059B (en) * 2020-06-29 2023-06-30 西安理工大学 Attention mechanism-based Seq2Seq berth occupancy prediction method
CN112137585A (en) * 2020-09-24 2020-12-29 刘玉宝 Method and system for testing transplanted tendon in cruciate ligament reconstruction
CN114368768A (en) * 2020-10-15 2022-04-19 中铝国际工程股份有限公司 Aluminum hydroxide crystal seed granularity refinement explosion prediction model and method based on LSTM
CN114368768B (en) * 2020-10-15 2023-10-24 中铝国际工程股份有限公司 LSTM-based aluminum hydroxide seed crystal granularity refinement burst prediction model and method
CN114596726A (en) * 2021-10-27 2022-06-07 西安理工大学 Parking position prediction method based on interpretable space-time attention mechanism
CN114596726B (en) * 2021-10-27 2024-01-19 西安华企众信科技发展有限公司 Parking berth prediction method based on interpretable space-time attention mechanism
CN116050725A (en) * 2022-11-08 2023-05-02 华北电力大学 Block chain consensus mechanism construction method for comprehensive energy system operation scheduling

Similar Documents

Publication Publication Date Title
CN110909953A (en) Parking position prediction method based on ANN-LSTM
CN109492808B (en) Method for predicting remaining parking spaces of indoor parking lot
CN110414719B (en) Traffic flow prediction method based on multivariate gray model time sequence
CN111860982A (en) Wind power plant short-term wind power prediction method based on VMD-FCM-GRU
CN106677763B (en) Dynamic integrated modeling-based oil well working fluid level prediction method
CN106022954B (en) Multiple BP neural network load prediction method based on grey correlation degree
CN110942194A (en) Wind power prediction error interval evaluation method based on TCN
CN104239489A (en) Method for predicting water level by similarity search and improved BP neural network
CN112966871B (en) Traffic jam prediction method and system based on convolution long-short-term memory neural network
CN104657777B (en) Electric wire for automobile extrusion process parameter optimization method based on chaos wavelet neural network
CN106447119A (en) Short-term traffic flow prediction method and system based on convolutional neural network
CN108399744A (en) Short-time Traffic Flow Forecasting Methods based on grey wavelet neural network
CN115169232B (en) Daily peak load prediction method, computer equipment and readable storage medium
CN108417032A (en) A kind of downtown area curb parking demand analysis prediction technique
US20210125200A1 (en) Method and system for predicting medium-long term water demand of water supply network
CN111310990A (en) Improved gray combination model-based track quality prediction method and system
CN112949904B (en) Wind power plant short-term power prediction method based on feature selection and multi-level deep transfer learning
CN105184398A (en) Power maximum load small-sample prediction method
CN110619442A (en) Vehicle berth prediction method based on reinforcement learning
CN110222908A (en) A kind of short-term electricity demand forecasting method based on data-driven
CN110766190A (en) Power distribution network load prediction method
CN112434891A (en) Method for predicting solar irradiance time sequence based on WCNN-ALSTM
Cui et al. Improved genetic algorithm to optimize the Wi-Fi indoor positioning based on artificial neural network
CN110826244A (en) Conjugate gradient cellular automata method for simulating influence of rail transit on urban growth
CN114510778A (en) Track irregularity prediction method based on hybrid intelligent optimization LSTM

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: 20200324

RJ01 Rejection of invention patent application after publication