# Cyber-Secure IoT and Machine Learning Framework for Optimal Emergency Ambulance Allocation
## 4 Results
### Model Performance Evaluation and Feature Importance Analysis
Feature importance analysis using the Random Forest model revealed that monthly dispatch volume (mon_tr_count) was the most influential predictor, followed by variables capturing short- and medium-term fluctuations in ambulance demand--such as standard deviation and cumulative counts over recent months (std_dev_current_month, recent_std_6m_cnt, total_cnt_current_month, total_cnt_last_6m). These features represent critical indicators of local workload and were confirmed to align with field survey responses from emergency personnel. Figure 6 and Table 3 present the top 20 feature importance scores. Notably, temporal consistency and variability were strong predictors, emphasizing the importance of tracking dispatch trends and identifying sudden surges. The high importance of std_dev_current_month and recent_std_6m_cnt underscores the predictive power of volatility in EMS workloads. Variables related to support demands, population, and facility density (e.g., support_ratio_current_month, total_pop, store_cn) also contributed meaningfully, supporting both operational and policy-level interpretation. These findings suggest that temporal continuity and demand variability are key determinants in ambulance demand \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Model** & **MSE** & **RMSE** & **MAE** & **MAPE** & **RMSLE** \\ \hline Random Forest & 0.050 & 0.224 & 0.115 & 0.065 & **0.070** \\ XGBoost & 0.084 & 0.290 & 0.084 & 0.040 & 0.112 \\ LightGBM & **0.048** & **0.218** & **0.114** & **0.064** & 0.079 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Comparison of predictive performance metrics across models. As part of the simulation modeling process for predicting ambulance demand and dispatch time, we estimated quantitative variable weights using regression models optimized via gradient descent algorithms. Specifically, we applied and compared three representative techniques in the penalized regression family: gradient descent-based linear regression, Ridge regression (L2-regularized), and Lasso regression (L1-regularized). These models are well-suited for high-dimensional data, with Ridge reducing model variance by shrinking all the coefficients, and Lasso further enhancing interpretability by driving irrelevant coefficients to zero [36]. As shown in Table 4, among the models tested, Lasso regression achieved the best overall performance, with MSE = 0.168, RMSE = 0.410, MAE = 0.328, MAPE = 0.232, and RMSLE = 0.174. In contrast, linear and Ridge regressions yielded higher error metrics (MSE = 0.195 and 0.182, respectively), indicating their relative limitations in handling complex feature spaces. The superior performance of Lasso highlights its ability to suppress noisy predictors and focus on the most influential variables [37]. This makes it particularly effective for generating stable, interpretable coefficients that can be applied as scenario-specific weights in simulation-based ambulance deployment strategies. Based on these findings, this study ultimately adopted the Lasso regression model as the preferred method for deriving variable weights. Two simulation frameworks were subsequently developed using the Lasso-derived coefficients. The first simulation model focuses on ambulance demand estimation. It employs six key predictors identified by Lasso regression: total population within the coverage area, the number of food establishments, the average monthly number of inter-center emergency transfers for critical patients, average dispatch duration, monthly dispatch volume, and the number of traffic accidents. These variables serve as independent inputs, while the target variable is the recommended number of ambulances to be deployed. This model enables the quantification of context-specific ambulance demand based on region-level conditions. The second simulation model is designed to estimate dispatch time, with a focus on evaluating regional response efficiency.