## 3 Results and Discussion
### Real-Time Prediction of Micro-Environment  
For data acquisition, four sets of data were generated to represent different levels of macro-environmental control accuracy, from \(\pm\)10 %RH 24 h fluctuation to the most relaxing condition. They were prepared to illustrate the four levels of relaxing control within the acceptable macro-environment range, as shown in Figure 11. From the perspective of data expression, these datasets and the on-site dataset can reflect characteristics about the interaction of heat and mass transfer between macro- and micro-environments within the acceptable range. For searching the optimal architecture, multiple LSTM networks were trained through a gradual increase in the number of hidden layers and neurons. The resulting RMSE and absolute errors are detailed in Figure 12. The RMSE values range from 0.037 to 0.188 for temperature and 0.467-1.73 for RH. Correspondingly, absolute errors vary from \(\mid-0.13\mid\) to 0.64 \({}^{\circ}\)C for temperature and \(\mid-8.2\%\mid\) to 6.3% for RH. The architecture with 2 layers demonstrates relatively high accuracy in prediction, while a single-layer configuration shows relatively low accuracy in RH prediction. As the number of layers increases from 1 to 4 in the networks with an equal number of neurons per layer, accuracy typically improves. However, as the number of neurons increases in the networks with an equal number of layers, beyond a certain threshold where the number of neurons exceeds a maximum, further increasing the number of neurons per layer can lead to a decline in accuracy. Both a relatively shallow LSTM network with many neurons and a deeper network with fewer neurons demonstrate strong performance. Figure 10: Acceptable macro- and micro-environmental RH in the most relaxing condition. Figure 11: The macro- and micro-environments in four levels of control accuracy. Figure 12: RMSE and absolute errors in the test set. In detail, for the 2-layer networks, the configuration with 200 neurons in each layer stands out as the most accurate. Comparing its absolute errors with measurement errors (\(\pm\)0.5 \({}^{\circ}\)C and \(\pm\)3 %RH), it is noted that the absolute errors ranging from \(-\)0.13 to 0.15 \({}^{\circ}\)C and \(-\)2.2 to 2.2 %RH are smaller than the measurement errors. This suggests that the network can predict micro-environmental temperature and RH as accurately as on-site measurements. Based on these findings, we conclude that the optimal LSTM network architecture consists of 2 layers, with each layer comprising 200 neurons. The selected architecture was found to balance prediction accuracy with computational efficiency. Beyond this configuration, additional neurons or layers increased training time significantly without noticeable accuracy improvement. In contrast, shallower networks showed reduced RH prediction accuracy, particularly under larger fluctuation conditions. The final model achieved a fast prediction time for 24 h of data on a standard CPU, suitable for real-time deployment. Table 4 shows the performance results of the optimal LSTM network. All coefficients of determination are close to 1, while the values of MSE, RMSE, MAE and StD are near 0. In addition, Figures 13 and 14 illustrate: (1) the time-series prediction aepdently captures the fluctuation trends with accurate periods in both training and testing sets; (2) the absolute errors predominantly remain below \(\pm\)0.2 \({}^{\circ}\)C and \(\pm\)3 %RH in the training set, and \(\pm\)0.1 \({}^{\circ}\)C and \(\pm\)2 %RH in the testing set; (3) the error histograms present a distribution centered around zero with minimal deviation. These indicators indicate high accuracy in both training and testing processes. They affirm that this optimal network has robust generalization and accurate prediction performance without underfitting and overfitting problems. However, the current model is trained on a finite dataset that may not capture the full range of conditions experienced at the National Library of Scotland.