# Typhoon Intensity Forecasting Based on LSTM Using the Rolling Forecast Method
## 3 Methodologies  
### Model Settings  
A recurrent neural network (RNN) is a type of DNN with a special internal structure, which can easily deal with the problems of sequence to sequence (also called time series problems), but finds it hard to deal with long-term nonlinear problems. LSTM, a type of RNN, has a special internal structure to solve long-term nonlinear problems better. There are many papers about the application and improvement of LSTM, as well as the introduction of the structure of LSTM [16; 23; 24; 25]. According to the results of the existing studies about the application of LSTM, models based on LSTM can better solve long-term prediction problems, which may be more beneficial for forecasting typhoon intensity with longer lead times, such as 96 and 120 h.  
A feed-forward neural network with one hidden layer can fit any function [26], and the prediction problems can be seen as a process to fit the universal function from the input prediction factors to the prediction values; so in the experiment, prediction models based on LSTM with an input layer, an LSTM hidden layer, and a dense output layer are proposed. According to the actual results of the experiment, the prediction results would be worse influenced by the internal hyperparameters of neural networks such as the number of hidden layers, the number of neurons in the hidden layers, the learning rate, and the activation functions. [PERSON] et al. [27] used the differential evolution method to optimize the hyperparameters of LSTM and achieved results with higher accuracy. [PERSON] et al. [28] optimized the LSTM hyperparameters using evolutionary algorithms, and the results showed that the optimized model was better than the models combined with the Sydney, Perth, Adelaide, and Tasmania method. [PERSON] et al. [29] proposed a demand forecasting method to select the best hyperparameters of multilayer LSTM networks. Compared to the time series forecasting methods based on the autoregressive integrated moving average, exponential smoothing, ANN, K-nearest neighbors, RNN, SVM, or single-layer LSTM, the multilayer LSTM network with the best hyperparameters selected using the demand forecasting method showed the best prediction results. Generally, the prediction results would be different using different prediction models, different data, and other parameters of the model. In theory, even with all the same conditions except the method to find the optimal number of neurons, the results can be also different, because the uncertainty of the prediction model. Therefore, there are still no general methods for designing models based on neural networks, but there are for optimizing them based on the results of prediction experiments. In this experiment, prediction models were enough to forecast typhoon intensity, with the linear activation function in the dense layer, the tanh activation function in the LSTM layer, the Adam optimizer, the mean squared error (MSE) loss function, 300 iteration steps, and the hidden layer neurons as four times as predictors of the models. To validate the models based on LSTM using the optimal prediction factors, a model based on an FNN is proposed. The settings of the model based on an FNN are similar to those of the models based based on LSTM; however, for the FNN model, the activation function of the hidden layer is sigmoid, and the maximum iteration step is 5000. The hyperparameters of the models based on LSTM and an FNN are shown in Table 4. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Variables**} & \multicolumn{5}{c}{**Time**} \\ \cline{2-6}  & **t** & **t-1** & **t-2** & **t-3** & **t-4** \\ \hline P & P (t) & P (t-1) & P (t-2) & P (t-3) & P (t-4) \\ WS & WS (t) & WS (t-1) & WS (t-2) & WS (t-3) & WS (t-4) \\ Lat & Lat (t) & Lat (t-1) & Lat (t-2) & Lat (t-3) & Lat (t-4) \\ Lon & Lon (t) & Lon (t-1) & Lon (t-2) & Lon (t-3) & Lon (t-4) \\ MS & MS (t) & MS (t-1) & MS (t-2) & MS (t-3) & MS (t-4) \\ \hline \hline \end{tabular}
\end{table}