## 3 Model Description
### Long Short-Term Memory  
Long short-term memory (LSTM) is suitable for processing and predicting important events with relatively long intervals and delays in time series, which is a special type of recurrent neural network (RNN) model [38]. An LSTM-NN cell consists of three gates: input gate, output gate, and forget gate. The framework of single LSTM cell is shown in Figure 5, the input gate provides the output of the previous cell to the current cell, the forget gate used to specify the information to be retained and discard some information, and the output gate provides output to the next cell, and The work principles of the LSTM neural network at time step t are as Equations (4)-(11) [39]:  
\[f(t)=\sigma\Big{(}W_{f}\cdot[h_{t-1},x_{t}]+b_{f}\Big{)} \tag{4}\]  
\[i(t)=\sigma(W_{i}\cdot[h_{t-1},x_{t}]+b_{i}) \tag{5}\]  
\[\widetilde{C}(t)=\tanh(W_{c}\cdot[h_{t-1},x_{t}]+b_{c}) \tag{6}\]  
\[C(t)=f_{t}*C_{t-1}+i_{t}*\widetilde{C}_{t} \tag{7}\]  
\[O_{t}=\sigma(W_{o}\cdot[h_{t-1},x_{t}]+b_{o}) \tag{8}\]  
\[h(t)=O_{t}*\tanh(C_{t}) \tag{9}\]  
\[sigmoid(x)=\frac{1}{(1+e^{-x})} \tag{10}\]  
\[\tanh(x)=\frac{(e^{x}-e^{-x})}{(e^{x}+e^{-x})} \tag{11}\]  
The \(\sigma\) refers to the sigmoid function, which controls information transmission between cells. When the \(\sigma\) changes from 0 to 1, the amount of information transferred between cells increases gradually. W\({}_{i}\), W\({}_{f}\), W\({}_{c}\) and W\({}_{o}\) refer to the input weight, forget gate weight, cell weight and output weight. The corresponding bi, b\({}_{f}\), b\({}_{c}\) and b\({}_{o}\) refer to the input biasing, forget biasing, cell biasing and output biasing. The t and t-1 represent the current and previous time states, respectively. The x represents the input information, and h represents output information, and C refers to the single cell status [40]. The framework of the constructed LSTM prediction model [41; 42] is shown in Figure 6, which consists of the input layer, three LSTMs layers, dense layer and the output layer. The input layer is also made up of nodes representing outdoor weather station and indoor historical environmental parameters, and nodes representing indoor temperature and the humidity of the greenhouse. The hidden layer built a three-layer recurrent neural network using LSTM cells. Figure 5: The basic LSTM network architecture for regression problems. The number of hidden layers neurons and the dropout are key hyperparameters that affect the performance of the LSTM model, which was also generated also using the orthogonal design. The effect of four factors is studied including the number of first LSTM layer neurons (\(\rm A_{b}\)), the second LSTM layer neurons (\(\rm B_{b}\)), the third LSTM layer neurons (\(\rm C_{b}\)), and dropout (\(\rm D_{b}\)). Each factor involves three different levers, as shown in Table 4. In this paper, the network architecture has also been trained to be different in the neuron and the dropout combination, and the best combination of hyperparameters were determined according to the minimum error for the model. For the LSTM model, 80% of the data were used as a training set, and 20% as a test set. Each model has been trained on the dataset of 16 combinations of training and test datasets. The Keras is a high-level neural network API that supports rapid experiments and can quickly convert your ideas into results. Based on Python 3.6, the LSTM model is developed using a tensor flow and Keras library. Moreover, with regard to the other network parameters, the following values have been set: batch size = 128, and number of epochs = 500, activation function = ReLu, Kernel_initializer = uniform, loss = MSE, validation_split = 0.2.