Document Type : Original article
Introduction
Fire, as a devastating and enormous event, can potentially lead to human losses, as well as financial ramifications and permanent disabilities for victims (1,2). Fire accidents often occur accidentally and without prior notification, exposing firefighters to a high risk of job-related physical injuries (3). Therefore, firefighters should consider defining prespecified functions for timely response during firefighting (4). The timely presence of firefighters is essential for preventing fire-caused consequences (5). In metropolitan cities, delayed arrival of firefighters to the scene of the accident due to crowded traffic can lead to massive problems (2).
In fire management, minimizing physical injuries (including human losses) is of great importance, and achieving this goal requires implementing a number of measures, including reducing the time of arrival at the scene, receiving and imparting correct information from the scene, and ensuring the presence of adequate and efficient equipment and human forces (6). Thus, one of the important factors when responding to accidents is the time interval from receiving the emergency call to the arrival of responding units at the scene (i.e., the response time). Therefore, time is an important factor for first responders, especially firefighters who must arrive at the scene as soon as possible (7). In fire accidents, the response time of firefighters is defined as the interval between receiving the emergency call and their arrival at the scene, and a short response time is an important indicator of firefighters’ efficacy (5). In life-threatening situations, every second is of critical importance, and the timely presence of firefighters can draw a line between life and death (8).
The comprehensive literature search retrieved no study on the use of statistical machine learning models in predicting firefighters’ response time during a fire. The present study used machine learning models for the first time to predict firefighters’ response time. In this research, the mentioned models were employed to predict the response time of firefighters during firefighting operations.
Materials and Methods
In this study, machine learning algorithms were used to predict the response time of firefighters during the firefighting operations.
Machine learning is a subdomain of artificial intelligence and includes a combination of techniques and algorithms with the ability to predict future events (9). On the other hand, the predictive accuracy of machine learning models surpasses that of conventional statistical models (10).
Setting
The study setting was the Firefighting and Safety Organization of Ilam, Iran. In this study conducted in 2022, the parameters influencing the response time of 1,402 firefighting operations were investigated (a total of 29 parameters).
Data preprocessing
In the present study, data preprocessing was performed using sub-processing techniques. Three outliers were identified and removed with the Detect Outlier operator, resulting in a final dataset of 1,399 records. A total of 29 variables were examined, of which 12 were excluded due to high stability (Table 1). The dataset was also screened for duplicate and missing values, but none were detected. To ensure more accurate analysis and facilitate comparison among the quantitative variables, all the numerical features were normalized to a 0–1 range using the normalization function.
Model validation
Model validation was performed using the cross-validation operator with k=3 folds. The dataset was randomly partitioned into three subsets, and in each iteration, two folds were used for training and one for testing. To reduce sampling bias, the shuffled sampling method was applied prior to each split. The reported performance metrics therefore represented the average values across the three folds, and the corresponding intervals reflected the variability obtained from this cross-validation procedure.
Model optimization
Model optimization in this study was conducted using the Grid Optimization method, with hyperparameters tuned individually for each algorithm to maximize performance. The GBT model achieved optimal results with 150 trees, a maximum depth of 2, and a learning rate of 0.1. The SVM was optimized by adjusting the kernel type, cost parameter, and gamma, while the GLM was tuned through regularization strength. The DL model employed a feed-forward neural network with two hidden layers (64 and 32 neurons), ReLU activation, a learning rate of 0.01, batch size of 32, and 100 epochs. Decision Tree (DT) optimization focused on maximum depth and minimum samples per leaf, and RF tuning involved the number of trees, maximum depth, and feature selection at each split. This systematic approach ensured that all models were assessed under their most effective configurations, thereby strengthening the reliability of the comparative analysis.
Model evaluation
The predictive performance of the models was evaluated using four key indicators: Root Mean Squared Error (RMSE), Absolute Error (AE), Relative Error Lenient (REL), and Relative Error (RE). These metrics were calculated for each fold of the cross-validation process and subsequently averaged, providing a reliable and robust estimate of overall model performance (Figure 1).
Data analysis
First, the data were summarized using mean, standard deviation, median, maximum, and minimum. Grouped variables were described using frequency and percentage. STATA software version 11 (STATA 11, Stata Corp. LLC College Station, Texas, USA) was used for descriptive and exploratory data analysis, and RapidMiner software 9.10 was utilized for data mining. RapidMiner Studio is a Java-based data platform that is used for educational analysis and research in data mining and artificial intelligence fields. This platform contains statistical tools and a machine learning toolbox with several artificial intelligence predictive algorithms used for supervised and unsupervised learning. In this research, Windows 10 with Intel processor [Intel I Core I i7-5500U CPU @ 2.40 GHz, 2 core(s) with 4 logical processor(s)] was used.
Results
The metrics used for evaluating the performance of models were Vector Performance, RMSE, AE, REL and RE%. Among the mentioned models, the lowest and highest error rates based on the RMSE±SE metric belonged to the GBT and SVM models, respectively. Also, the error rate of the GBT model was lower compared to other models based on the AE±SE and REL±SE metrics. Based on the RE±SE% parameter, the error rate of the SVM model in predicting the response time was lower compared to other models; however, this model showed a poorer performance than other models in terms of the rest of the indicators. Therefore, the comparison of performance metrics between the 6 models indicated that the lowest error rate was related to the GBT model, thus this model was designated as the selected model with the lowest error in estimating the shortest response time (Table 2).
Table 1. Attribute descriptions
|
Attribute |
Label |
Data type |
Attribute |
Label |
Data type |
|
Report |
1, 2 |
Nominal |
Open field |
0, 1 |
Nominal |
|
Month |
1-12 Month |
Nominal |
Water supply |
0, 1 |
Nominal |
|
Half year |
1, 2 |
Nominal |
Foamatic * |
0, 1 |
Nominal |
|
Day |
1-7 |
Nominal |
Fire extinguisher |
0, 1 |
Nominal |
|
Hr |
1-24 |
Nominal |
Rescue equipment |
0, 1 |
Nominal |
|
Night |
0, 1 |
Nominal |
Fire engine * |
0, 1 |
Nominal |
|
Response time |
Time by min |
Numerical |
Heavy fire truck |
0, 1 |
Nominal |
|
Arrival C * |
0, 1 |
Nominal |
Fire ladder and rescue |
0, 1 |
Nominal |
|
Total time |
Time by min |
Nominal |
Fire motorcycle * |
0, 1 |
Nominal |
|
User |
1-5 |
Nominal |
Survived |
Frequency |
Numerical |
|
Residential |
1, 2 |
Nominal |
Injured * |
0, 1 |
Nominal |
|
Commercial * |
0, 1 |
Nominal |
Dead * |
0, 1 |
Nominal |
|
Office * |
0, 1 |
Nominal |
Personals * |
Frequency |
Numerical |
|
Automobile |
0, 1 |
Nominal |
Police |
0, 1 |
Nominal |
|
Electrical accidents * |
0, 1 |
Nominal |
Emergency * |
0, 1 |
Nominal |
|
Gas accidents * |
0, 1 |
Nominal |
|
|
|
|
High stability * |
|
|
|
|
|
In the present study, the RMSE metric was the most important index for evaluating the performance of the models. The comparison of the error rate of these models based on this metric (Figure 2) demonstrated that the GBT model had the lowest rate compared to other models, reflecting that it had the lowest error in predicting the response time of arrival at the scene, hence this model was finally selected as the favorable model (Figure 2).
In the GBT model, the most important variables with higher attribute weights for estimating the response time in order of the importance were Survived=0.293, hr (Time of Accident) =0.198, Fire Extinguisher=0.165, Water supply=0.159, and Fire engine=0.098. Figure 3 depicts 14 variables with the highest attribute weights and importance.
The accident response time was calculated for all six models regarding 17 variables (Automobile, Daytime, Fire extinguisher, Half-year, hr, Month, Night time, Open Field, Police, Report time, Rescue equipment, Residential, Survived, User, Water Supply, Fire Engine, and Heavy Fire Truck), showing that the GBT model delivered the lowest RMSE among other models and estimated the response time as 3.53 (95% CI: 2.15-4.91) (Table 3).
According to the final model, the most important predictors contributing to the shortening of response time were the Fire Engine and Hour and the most important factors predicting a delayed response time were Heavy fire truck, Day, Fire extinguisher, Water supply, and survived (Figure 4).
Table 2. Performance metrics for the six machine learning models
|
|
RMSE (min) |
SE |
AE (min) |
SE |
REL (min) |
SE |
RE (min) |
SE |
Total run time (min) |
|
GBT |
1.38 |
0.34 |
0.94 |
0.07 |
2.01 |
1.04 |
20.4 |
0.84 |
218 |
|
GLM |
1.44 |
0.34 |
0.96 |
0.08 |
2.20 |
1.07 |
20.9 |
1.1 |
1 |
|
DL |
1.46 |
0.32 |
0.96 |
0.06 |
2.21 |
0.98 |
20.9 |
0.99 |
1 |
|
DT |
1.46 |
0.32 |
0.95 |
0.05 |
2.16 |
1.02 |
20.5 |
0.93 |
3 |
|
RF |
1.46 |
0.33 |
0.96 |
0.06 |
2.23 |
1.05 |
21.0 |
0.95 |
68 |
|
SVM |
1.47 |
0.37 |
0.87 |
0.10 |
2.28 |
1.17 |
18.5 |
0.91 |
575 |
Root Mean Squared Error (RMSE), Absolute Error (AE), Relative Error Lenient (REL), Squared Error (RE)%.
Table 3. Prediction of arrival time by different models
|
|
Time |
RMSE |
Response time (95%CI) |
|
GBT |
3.530 |
1.38 |
2.15-4.91 |
|
GLM |
3.828 |
1.44 |
2.38-5.26 |
|
DL |
3.861 |
1.46 |
2.40-5.32 |
|
DT |
3.716 |
1.46 |
2.25-5.17 |
|
RF |
3.665 |
1.46 |
2.20-5.12 |
|
SVM |
2.845 |
1.47 |
1.37-4.31 |
Discussion
In this study, various machine learning models, including SVM, GLM, DL, DT, RF and GBT were used to predict response time in firefighting operations. The results showed that compared to other algorithms, the GBT model had the highest performance in predicting the response time in firefighting operations. A study in Malaysia used the Artificial Neural Network (ANN), DL, DT, RF, and GBT models to predict climate temperature and humidity, and the results showed that the GBT model had the best performance and the highest net accuracy among other models according to the area under the Receiver Operating characteristic Curve (ROC) (11). Another study aiming at ascertaining the factors affecting pile friction-bearing capacity using machine learning models demonstrated that compared to other models, the GBT model could be introduced as a powerful and practical algorithm in order to predict pile friction-bearing capacity in real projects (12). Likewise, the results of other studies have designated the GBT as one of the most effective machine learning models for prediction, which is pertinent to either regression (for continuous parameters) or classification (categorical parameters) applications (13). Despite the fact that the utilization of the GBT model differed between the current study and the recent experiment, evidence from both studies supports the suitability of this model and its algorithms for prediction purposes in all situations.
The results of the present study revealed that based on the RE% metric, the SVM model presented a better performance in predicting the response time in firefighting operations. The results of another study predicting the duration of emergency evacuation following a hospital fire represented that according to the area under the ROC curve, accuracy, and sensitivity, the SVM model’s performance was inferior for predicting the duration of emergency evacuation during a hospital fire (14), opposing the findings of the present study. Since in the present study, larger data were used for analysis than the recent research that benefited from relatively smaller data, and since validity assessment indicators differed between the two studies, one can link the discrepancy observed in results to these variabilities.
The data from the GBT model revealed that the time of fire occurrence and the type of fire engine could predict a shorter response time, while variables such as heavy fire truck, daytime, fire extinguisher, water supply, and survived forecasted a delayed response to the accident. Studies acknowledge that fire extinguishing by firefighters depends on several factors such as the real speed of fire expansion, the distance between the fire department and fire area, the speed of fire engines, and the number of vehicles dispatched (15). In a study on the approaches of firefighters regarding responses to medical and mental health emergency calls, the respondents advised using smaller fire engines or lighter transportation vehicles for delivering medical services (16). According to studies, the intensity of fire tends to be more severe at night, and in fact, nighttime fire accidents carry more risks for firefighters (17). Research conducted in the field of EMS has demonstrated that various factors, including traffic, weather, the topology of the region, the EMS system’s configuration, and mode of transportation influence the duration of the pre-hospital emergency. Actually, shortening the duration of pre-hospital emergency response requires expanding the number of EMS units and optimizing their conjugations so that they can better cover the service area (18). A comparison between current study and those conducted in this field shows that variables such as the time of fire occurrence and the type of fire engine are particularly important in determining the effectiveness and timeliness of firefighting operations. Therefore, it is suggested for the managers of fire and safety organizations to design and employ sophisticated fire detection and warning systems for the timely detection of accidents at night. Since heavy fire engines move slowly towards the place of fire occurrence and arrive at the place late, designing lighter fire extinguisher vehicles can markedly shorten the response time during firefighting operations.
Strengths and limitations
As one of the strengths of this study, machine learning models were used for the first time to predict the response time during firefighting operations. Thus, this study can be cited as a reference experiment for future studies. One of the limitations of the study was the high number of high-stability variables, which were excluded from the study.
Conclusion
The findings of the present study indicated that respective to other machine learning models, the GBT model offered better and more applications in predicting the response time in firefighting operations. The response time is a key performance determinant in firefighting operations, hence it is crucial to identify the factors affecting the response time to provide fire and safety managers with accurate and reliable relevant data. Moreover, policymakers and fire and safety managers can predict the response time and accordingly improve firefighting operational performance by incorporating machine learning models into preparedness programs and firefighting instructions.
Funding
This study received no financial support.
Acknowledgement
This research was approved by the Ethics Committee of Ilam University of Medical Sciences with code IR.MEDILAM.REC.1402.160. The authors express their gratitude to the staff and managers of the Fire and Safety organization of Ilam, Iran for their kind cooperation in conducting this research.
Conflict of Interest
The authors declared no conflict of interest.