## 3 Methodology
### Performance Evaluation Metrics  
Several metrics were used to thoroughly assess model performance and compare it with queueing-based models (M/M/c) as well as standards from international building codes:  
1. Mean squared error (MSE) - Evaluates the average of squared deviations between predictions and actual values. \[MSE=\frac{1}{n}\sum_{i=1}^{n}(y_{i}-\hat{y}_{i})^{2}\] (2) where \(y_{i}\) denotes the true value and \(\hat{y}_{i}\) denotes the predicted value.
2. Root mean squared error (RMSE) - The square root of MSE offers a direct measure of prediction accuracy in original units. \[RMSE=\sqrt{\frac{1}{n}\sum_{i=1}^{n}(y_{i}-\hat{y}_{i})^{2}}\] (3) where RMSE is simply the square root of the MSE, providing a direct measure of prediction accuracy.
3. Mean absolute error (MAE) - The average of absolute differences between predictions and observations. \[MAE=\frac{1}{n}\sum_{i=1}^{n}\lvert y_{i}-\hat{y}_{i}\rvert\] (4)
4. Mean absolute percentage error (MAPE) - Reflects relative accuracy by expressing errors as a percentage of observed values. \[MAPE=\frac{100}{n}\sum_{i=1}^{n}\left\lvert\frac{y_{i}-\hat{y}_{i}}{y_{i}}\right\rvert\] (5)
5. **R**-squared **(R2)** - Indicates how much variance in the target variable is explained by the model. \[R^{2}=1-\frac{\sum_{i=1}^{n}(y_{i}-\hat{y}_{i})^{2}}{\sum_{i=1}^{n}(y_{i}- \overline{y})^{2}}\] (6)
6. Queue length accuracy (QLA) - Compares predicted queue lengths (Q_pred) with actual queue lengths (Q_actual). \[QLA=1-\frac{\left\lvert Q_{pred}-Q_{actual}\right\rvert}{Q_{actual}}\] (7)
7. Waiting time accuracy (WTA) - Measures the precision of predicted waiting times (W_pred vs. W_actual). \[WTA=1-\frac{\left\lvert W_{pred}-W_{actual}\right\rvert}{W_{actual}}\] (8) where \(W_{\text{pred}}\) is the predicted waiting time and \(W_{\text{actual}}\) is the actual waiting time.
8. Fixture utilization accuracy (FUA)* Compares predicted fixture utilization rates (U_pred) to actual rates (U_actual). \[FUA=1-\frac{\left|U_{pred}-U_{actual}\right|}{U_{actual}}\] (9) where \(U_{\text{pred}}\) is the predicted fixture utilization rate and \(U_{\text{actual}}\) is the actual utilization rate. This metric assesses how well our model predicts the utilization of sanitary fixtures.
* Assesses the model's ability to anticipate the highest usage periods accurately. \[PDA=1-\frac{\left|P_{pred}-P_{actual}\right|}{P_{actual}}\] (10) where \(P_{\text{pred}}\) is the predicted peak demand and \(P_{\text{actual}}\) is the actual peak demand.
* Evaluates how closely predicted fixture counts for each gender match reality (F_pred_gender vs. F_actual_gender). \[GSA_{gender}=\frac{1}{m}\sum_{i=1}^{m}\left(1-\frac{\left|F_{pred\_gender}-F_{ actual\_gender}\right|}{F_{actual\_gender}}\right)\] (11) where \(F_{\text{pred\_gender}}\) and \(F_{\text{actual\_gender}}\) are the predicted and actual number of fixtures for a specific gender, and m is the number of fixture types.  
These metrics were calculated for both validation and test datasets. Paired t-tests were used to verify significant differences between the LSTM-based approach, queueing theory, and standards-based methods. A follow-up sensitivity analysis isolated changes in key inputs (e.g., gender ratio, occupancy rate) to gauge their impact on predictions.  
Finally, the model's external validity was tested by applying it to fresh data from the Singtel Serangoon TEPL building that were not included in the training phase. This step helps confirm the generalizability of the approach, ensuring it can adapt to realistic operational contexts.  
By evaluating these metrics and validating results against multiple scenarios, the study offers a comprehensive view of the model's performance relative to traditional approaches, highlighting its strengths and outlining areas that could still be enhanced.