# Modeling Hourly Soil Temperature Using Deep BiLSTM Neural Network
## 3 Methodology
### Benchmark Models  
We chose six benchmark algorithms to prove the relative advantages of the proposed method, namely, three deep learning methods, i.e., LSTM, BiLSTM and deep nerual network (DNN), and three traditional machine learning methods, random forest (RF), support vector regression (SVR), and linear regression (LR). A brief introduction and the parameter selection of each algorithm are as follows.  
The LSTM network is a special type of deep neural network proposed by [PERSON] and [PERSON] [41] in 1997. Because LSTM can solve tasks with a long time-lag well, it is widely used in time-series data processing [42; 43; 44; 45; 46]. The topology of the LSTM is consistent with the subnetwork described in Section 3.2.  
The topology of BiLSTM, introduced in Section 3.1, is consistent with the subnetwork described in Section 3.2.  
DNN is a neural network with multiple hidden layers, which has strong nonlinear fitting ability and has been successfully applied in prediction and classification tasks [47; 48; 49; 50]. In order to ensure fair comparison, we set the number of layers of DNN and the number of neurons in each layer to be consistent with the subnetwork described in Section 3.2, and choose rectified linear units (RELU) [51] as the activation function.  
RF is an excellent algorithm used in machine learning. It has the advantages of a fast learning speed, insensitivity to noise, less overfitting, and can achieve good results without numerous parametric adjustments. Through a grid search of the search variable space, the number of decision trees was set to 10, and the tree depth was set to 20.  
An SVR is one of the most important algorithms in machine learning. It can deal with high-dimensional, heterogeneous, and scarcely labeled datasets extremely efficiently, and can also successfully adapt to specific applications [52]. In our experiment, the kernel function and penalty factor are set to a radial basis function (RBF) and 1, respectively, which are determined through a grid search of the variable search space.  
LR is a regression method widely used in practical applications and does not require a setting of the parameters.  
The RF, SVR, and LR were built using scikit-learn, whereas the LSTM, BiLSTM, and DNN networks, based on Theano, were developed using Keras.  
In the experiment, the data from each site were divided into two parts, with the first 80% of the data serving as the training set and the second 20% as the test set. When executing the ST amplitude prediction model, all input data need to be normalized to [\(-\)1, 1], and, when running the daily average ST prediction model, all input data need to be normalized to [0, 1]. The month, hour of the day, air temperature maximum, air temperature minimum, solar radiation, relative humidity minimum, relative humidity maximum, and vapor pressure are used as the inputs of the benchmark algorithm, and the ST temperature of different depths is the output of the model. When executing the benchmark algorithm, the data need to be normalized to [0, 1]. Because the performances of the integrated BiLSTM, BiLSTM, and LSTM are significantly affected by the initialization weight matrix, we ran these algorithms ten times on the same data and computed the mean of the results to ensure a fair comparison with traditional machine learning methods.