## 3 Methodology
### Machine Learning Model Development
#### 3.4.4 Neural Architecture Selection and Comparison  
Theoretical Considerations  
The unique characteristics of sanitary facility usage patterns require an architecture capable of capturing long-term dependencies in daily and weekly patterns, managing variable-length sequences, handling irregular peak events, and processing multiple input features while maintaining temporal relationships.  
LSTM's forget gate mechanism proves particularly advantageous in this context. The mechanism allows the network to selectively retain information about regular usage patterns while discarding noise, maintain memory of both recent and historical patterns, adapt to changing baseline conditions over time, and handle the complex interplay between different temporal scales.  
While GRU offers a simpler architecture with fewer parameters, it lacks the dedicated memory cell that makes LSTM especially effective at capturing the multiple temporal scales present in restroom usage patterns. Simple RNNs, while computationally efficient, struggle with the vanishing gradient problem when processing the long sequences typical in our application.  
Experimental Comparison  
To validate our architectural choice, we conducted experiments using a subset of our data (3 months of usage data from two floors). We evaluated five different architectures using the same training data and evaluation metrics, as shown in Table 2.  
Figure 8: Hyperparameter tuning—parallel coordinates plot and optimization progress.  
Our experiments highlighted LSTM's superior performance across multiple metrics. With a MAPE of 7.21% and R\({}^{2}\) of 0.938, LSTM demonstrated the highest prediction accuracy among all tested architectures. While GRU achieved comparable memory efficiency (4.0 GB) and faster training time (2.1 h), its prediction accuracy fell short with a MAPE of 7.89% and R\({}^{2}\) of 0.919.  
The Transformer architecture, despite its theoretical advantages in capturing global dependencies, required significantly more computational resources (8.9 GB memory, 5.7 h training) while achieving lower accuracy (MAPE 7.86%, R\({}^{2}\) 0.921). The hybrid CNN-LSTM approach showed promising results (MAPE 7.54%, R\({}^{2}\) 0.927) but demanded substantially more computational overhead (6.1 GB memory, 3.8 h training) than pure LSTM. The attention-based RNN demonstrated the lowest accuracy (MAPE 8.12%, R\({}^{2}\) 0.914) while requiring moderate computational resources.  
These results reflect the inherent trade-offs between prediction accuracy, computational efficiency, and model complexity. LSTM's balance of performance metrics, particularly its superior accuracy with moderate resource requirements, supports its selection as the most suitable architecture for our application.  
[PERSON]'s No Free Lunch Theorem Consideration  
Following [PERSON]'s no free lunch theorem [27], we acknowledge that no single architecture is universally superior for all problems. However, our specific problem domain exhibits characteristics that align particularly well with LSTM's strengths.  
The problem involves multiple time scales, from daily patterns spanning 3-h to 24-h dependencies, weekly patterns covering 5-day to 7-day dependencies, and monthly patterns extending to 20-day to 31-day dependencies. LSTM's explicit memory cell is especially suited for managing these multiple scales simultaneously.  
Variable dependencies span across short-term immediate occupancy effects, medium-term time-of-day patterns, and long-term seasonal variations. The forget gate mechanism provides optimal balance in managing these dependencies. Furthermore, LSTM's gating mechanisms provide superior filtering of relevant patterns when handling regular background noise in usage patterns, irregular events and anomalies, and systematic variations.