## 3 Methodology
### LSTM Model Design  
Traditional network neurons process data in parallel, and the input of the previous moment cannot affect the output of the next moment. The recurrent neural network (RNN) is a network structure with short-term memory for processing sequence data [46; 47; 48; 49]. At the same time, the RNN framework can be used for sequence-to-sequence or sequence-tone learning [50; 51].  
LSTM is an improvement of RNN which can effectively alleviate the above problems [52]. LSTM introduces a gating mechanism to control the path of information transmission, including input gate, forgetting gate, and output gate [30]. The scheme of single-layer LSTM deployed in time sequence is shown in Figure 8. LSTM provides a direct channel from left to right for data flow, which can effectively avoid gradient disappearance and explosion. An LSTM cell is constructed with three gates, input gate \(i_{t}\), forget gate \(f_{t}\), and output gate \(o_{t}\), and a memory cell \(c_{t}\) is used to store the current state of the LSTM block. The formulation of LSTM is presented in Equations (3)-(7).  
\[f_{t}=\sigma(W_{f}x_{t}+Uf_{h-1}+b_{f}) \tag{3}\]  
\[i_{t}=\sigma(W_{i}x_{t}+U_{i}h_{t-1}+b_{i}) \tag{4}\]  
\[o_{t}=\sigma(W_{o}x_{t}+U_{o}h_{t-1}+b_{o}) \tag{5}\]  
Figure 7: Features accord with Gaussian distribution. (**(a)**. Temprature (b)**. Pressure (c)**. Humidity (d)**. Wind-speed).  
\[c_{t}=f_{t}\cdot c_{t-1}+i_{t}\cdot tanh(W_{c}x_{t}+U_{c}h_{t-1}+b_{c}) \tag{6}\]  
\[h_{t}=o_{t}\cdot tanh(c_{t}) \tag{7}\]  
where \(x_{t}\) and \(h_{t}\) are the input and output vector of the current time point, respectively; \(W\), \(U\), and \(b\) are the weight and bias parameters of the block, and \(\sigma\) is the sigmoid function.  
The overall structure of LSTM model design with weather influence feature is shown in Figure 8. Through considering weather factors, we compared the simple LSTM model and improved LSTM model. In fact, the parking behavior caused by travel behavior is often affected by weather factors. Therefore, the prediction of parking lot vacancies is determined by weather conditions [30], parking patterns, and previous parking records, as feature attributes. The weather vector is integrated with \(f_{t}\), \(i_{t}\), and \(o_{t}\). That is to say, the unit state (\(c_{t}\)) and hidden state (\(h_{t}\)) are not only affected by \(h_{t-1}\) and \(c_{t-1}\), but also affected by weather (\(w_{t}\)). The LSTM algorithm has the advantage itself to extract the dependence of the time series to improve the prediction accuracy of the short-term parking occupancy rate, as following Equations (8)-(10).  
\[f_{t}=\sigma(W_{f}x_{t}+U_{f}h_{t-1}+V_{f}w_{t}+b_{f}) \tag{8}\]  
\[i_{t}=\sigma(W_{i}x_{t}+U_{i}h_{t-1}+V_{i}w_{t}+b_{i}) \tag{9}\]  
\[o_{t}=\sigma(W_{o}x_{t}+U_{o}h_{t-1}+V_{o}w_{t}+b_{o}) \tag{10}\]  
where \(V\) is the weight and bias parameters of the block for weather feature.  
The experimental steps are as follows: (1) Data were extracted from eight parking lots around the business district. (2) The parking data of roadside parking occupancy were preprocessed, including missing value processing and noise processing, and then normalize all data. (3) The weights for each layer were initialized, and the preprocessed data were inputted into the LSTM model for training. (4) The characteristic data obtained from the training were predicted, including the parking occupancy rate for the intervals of 10 min, 20 min, and 30 min. (5) MAE and RMSE were calculated, the prediction of the parking occupancy rate was inputted.