## 2 Methodology
### ANN Modeling
#### 2.3.2 Architecture of the ANN  
The real-time prediction of the micro-environment should consider the data relationship sequence-to-sequence, inputting 24 h macro-environmental temperature and RH to predict the corresponding micro-environmental ones. Long short-term memory (LSTM) network, a type of ANN, was designed to solve this problem [38] (Figure 4). The architecture consisted of a forget gate, input gate, and output gate to achieve appropriate-term memory. The mathematical expressions about the forget gate, input gate, output gate, and hidden layer are given by Equation (11) [39]. \[\left\{ \begin{aligned} & f_{t}=\sigma\Big{(}W_{fh}h_{t-1}+W_{fx}x_{t}+b_{f} \Big{)}\\ & i_{t}=\sigma(W_{ih}h_{t-1}+W_{ix}x_{t}+b_{i})\\ &\widetilde{c}_{t}=\tanh\Big{(}\widetilde{W_{c}}h_{t-1}+W_{c }\widetilde{x}_{t}+b_{\widetilde{c}}\Big{)}\\ & c_{t}=f_{t}\cdot c_{t-1}+i_{t}\cdot\widetilde{c}_{t}\\ & o_{t}=\sigma(W_{oh}h_{t-1}+W_{ox}x_{t}+b_{o})\\ & h_{t}=o_{t}\cdot\tanh(c_{t})\\ & y_{t}=h_{t}\end{aligned} \right. \tag{11}\]  
where \(f_{t}\) is the forget factor to decide on which information should be kept and which to forget. \(\sigma\) and \(tanh\) are sigmoid (the value is between 0 and 1) and hyperbolic tangent (the value is between \(-1\) and 1) activation functions, respectively. \(h_{t}\), \(i_{t}\), \(\widetilde{c}_{t}\), \(c_{t}\) and \(o_{t}\) denote the recurrent information, input factor, candidate cell state, cell state and output factor. \(W_{f}\), \(W_{i}\), \(W_{c}\) and \(W_{o}\) are the weights, and \(b_{f}\), \(b_{i}\), \(b_{c}\), and \(b_{o}\) are the bias. \(c_{t}\) denotes the cell state of the neural network. The operator \(\cdot^{\prime}\) denotes the pointwise multiplication of two vectors. \(x_{t}\) and \(y_{t}\) are the input and output. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Level** & \
\begin{tabular}{c} **24 h Fluctuation (Band)** \\ **in Macro-Environment** \\ \end{tabular} &
\begin{tabular}{c} **24 h Fluctuation (Band)** \\ **in Micro-Environment** \\ \end{tabular} & **Amplification Factor** \\ \hline
1 & \(\pm 10\) (42.2–56.1) \%RH & \(\pm 7.1\) (45.5–55) \%RH & 10 \\
2 & \(\pm 12\) (39.6–57.4) \%RH & \(\pm 7.9\) (44.7–55.4) \%RH & 11.6 \\
3 & \(\pm 14\) (37–59.4) \%RH & \(\pm 8.1\) (43.8–56.8) \%RH & 13.4 \\
4 & \(\pm 16\) (33–65) \%RH & \(\pm 9.1\) (43–57.3) \%RH & 15 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Four datasets in the relaxing control. The LSTM network uniquely captured sequence-to-sequence relationships between macro- and micro-environments, demanding deep learning for intelligent decision-making during training. Its architecture included specialized layers to leverage the intelligence of its three gate-operated memory units. Dropout was a regularization technique to prevent overfitting issues in the neural network. Setting a dropout layer between the hidden layers and the last hidden layer--the fully connected layer (also called the dense layer)--could effectively prevent this issue in RNN training [40,41]. Fully connected layers allowed the network to capture the dependence between various features by using non-linear transformations to the input data [42]. Because there was dependence between temperature and RH with a highly non-linear relationship, a fully connected layer could contribute to effective data mapping here. The regression layer was selected as the output layout because the data mapping between macro- and micro-environments was a many-to-many regression problem. Therefore, the basic architecture of our LSTM should include a sequence input layer, LSTM layer(s), dropout layer(s), fully connected layer, and regression output layer (Figure 5). The optimal number of LSTM layers and associated neurons was determined by a trial-and-error method (Figure 6). We relied on past research on LSTM training to determine the maximum number of LSTM layers and neurons (5 and 250) for searching for the optimal architecture [43,44].