Machine Learning Based Fire Detection: A Comprehensive Review and Evaluation of Classification Models

— Fires, regardless of their origin being natural events or human-induced, provide substantial economic and environmental hazards. Therefore, the development of efficient fire detection systems is of utmost importance. This study provides a comprehensive examination of the extant body of literature about studies on fire detection utilizing machine learning techniques. Significantly, the studies employed three distinct categories of datasets: pictures, data derived from Wireless Sensor Networks (WSNs), or a hybrid amalgamation of both. Our work mainly aims to categorize fire-related data utilizing four distinct classification models: Support Vector Machines (SVMs), Decision Trees, Logistic Regression, and Multi-Layer Perceptron (MLP). The model with the highest accuracy and ROC curve performance was identified through experimental analysis. The results of our study indicate that the MLP model exhibits the highest overall accuracy, achieving a score of 0.997. In this study, we analyze the learning curves to showcase the positive training dynamics of our model. Additionally, we explore the scalability of our model to ensure its suitability in real-world situations. In general, our research underscores the possibility of employing machine learning methodologies for fire detection, specifically emphasizing the effectiveness of the Multilayer Perceptron (MLP) model. This study contributes to the existing literature by offering valuable insights into the performance of several categorization models and conducting a comprehensive investigation of the Multilayer Perceptron (MLP) architecture. The results of our study have the potential to contribute to the advancement of fire detection systems, leading to enhanced accuracy and efficiency. This, in turn, may mitigate the adverse impacts of fires on both society and the environment.


I. INTRODUCTION
Fires, whether caused by natural occurrences or human activity, have serious consequences for the economy and the health of living organisms.The potential for fires to rapidly escalate and spread poses a significant threat, often leaving people with few options for escape.The intensifying heat produced by fires increases the danger, resulting in the tragic loss of life.Furthermore, rapid fire spread exacerbates economic losses.Notably, forest fires pose a serious threat to ecosystems, with the potential to cause significant harm to the flora and fauna that live in forests.Recognizing these negative consequences emphasizes the critical importance of detecting fires quickly and accurately, allowing for timely intervention [1]- [3]. Figure 1 shows how fires can start in a variety of places and for a variety of reasons.As a result, the primary responsibility is to take preventive measures to reduce the occurrence of fires.Particular care should be taken in using and maintaining electrical appliances, ensuring their safe operation in both residential and workplace settings.A variety of fire detection methods have been developed over time.These methods make use of various sensors capable of detecting fire-related phenomena.Several systems have been developed that integrate these sensors to detect and report fires as soon as possible [4].
Figure 2 illustrates fire detection systems' various sensors and sensing methods.Notably, technological advancements have facilitated the integration of these fire sensors into smart systems.In the event of a fire, these systems send notifications to servers or mobile devices in real-time, ensuring a prompt response.As documented in [5], wireless sensor networks (WSNs) have been used to connect fire sensors to servers and mobile devices.Additionally, the literature contains several studies exploring Internet of Things (IoT) applications for fire detection, such as [6].
However, the limited range of fire sensors limits their effectiveness in outdoor environments.Furthermore, fire damage can impair the functionality of these sensors in indoor environments.False alarms are also common in sensor-based systems, as the authors of [7], [8] point out.Furthermore, such systems may fail to detect small or distant fires and provide insufficient information about the magnitude and precise location of the fire.The cost of deploying many sensors to cover large areas is a major financial consideration.Furthermore, when an alarm is received, these techniques frequently require human intervention to confirm the presence of fire.To address these challenges, vision sensors have emerged as a viable solution for fire detection.Equipped with cameras, these sensors can scan wider areas, offering rapid and precise information regarding the fire's location and size.Vision sensor-based systems operate autonomously, eliminating the need for human intervention in fire detection [8].Furthermore, these systems readily integrate with technologies such as Machine Learning, Deep Learning, and Artificial Intelligence, augmenting their performance and capabilities [9].
Considering the issues and the potential offered by vision sensors, this research paper aims to investigate the application of machine learning techniques in fire detection using sensor data.Specifically, we focus on a sensor dataset collected by Blattmann [10].We hope to find the most accurate and robust model for fire detection by comparing four classification models: Support Vector Machines (SVMs), Decision Trees, Logistic Regression, and Multi-Layer Perceptron (MLP).Furthermore, we investigated the MLP model in depth, investigating its architecture and performance characteristics, such as scalability and learning curves.The findings of this study contribute to the advancement of fire detection systems, allowing for timely and accurate interventions to reduce the negative effects of fires on society and the environment.
The contributions of this research paper can be summarized as follows:  Thorough review: We thoroughly review the existing literature on machine learning-based fire detection studies, focusing on the types of datasets used and the various classification models used.Our literature review explores various studies on machine learning-based fire detection and prediction.These studies employ different data sources, including images, videos, and IoT sensor data, to detect and classify fires.For instance, the authors in [11] and [12] examine fire sensing technologies, considering factors such as flame, ambient heat, smoke, and gas levels.They propose a system that measures real-time temperatures of electrical cables using IoT techniques and transmits fire images and alarm information to emergency services.Another study [5] combines sensor and image data, utilizing machine learning and deep learning algorithms to develop a fire prediction model and fire detection neural networks.The authors achieve high-accuracy results and emphasize the potential for reducing false alarms through further training.In [6], an IoT-based fire alarm system is proposed, integrating multiple sensors to detect fire conditions.The authors employ the K-Nearest Neighbors (K-NN) and decision tree machine learning methods to evaluate sensor data and achieve reliable fire detection.Aideo-based fire detection system that preserves privacy is presented in [7] algorithms.These studies highlight using different data sources and machine-learning techniques to improve fire detection accuracy and system performance.Furthermore, researchers have explored smoke detection techniques, recognizing the challenges in outdoor IoT environments [13], [14].For example, Khan et al. [15] propose a deep convolutional neural network (CNN) method for smoke detection in surveillance videos, while a subsequent study [16]- [18] develops a lightweight CNN suitable for edge devices with limited resources.These studies demonstrate advancements in detecting smoke and addressing challenges related to environmental conditions.Moreover, other research works focus on forest fire detection using wireless sensor networks [19], [20] and real-time video-based fire and smoke detection algorithms [21].These studies showcase diverse approaches to fire detection, ranging from sensor networks to computer vision-based methods, contributing to developing smart and efficient fire detection systems.

II. MATERIALS AND METHOD
In contrast to previous research, we intended to get outcomes using a significantly lighter version.Candidates for this study include SVM, Decision Tree, Logistic Regression, and Multi-Layer Perceptron classifiers.

A. Linear Regression (LR)
Various machine learning algorithms have been investigated in the pursuit of developing effective fire detection systems.Logistic regression, a type of supervised learning algorithm commonly used for classification tasks, is one such algorithm.The logistic function, a mathematical function that predicts the likelihood of an event occurring, inspired the name logistic regression.As a linear model, logistic regression makes predictions by considering a linear combination of the input features.The preceding sections emphasized the significance of accurate fire detection in mitigating the negative effects of fires.While logistic regression is primarily intended for classification tasks, it can also be used to address fire detection issues.It is possible to leverage the simplicity and efficiency of logistic regression models for fire detection applications by training them on appropriate datasets [22].
To incorporate logistic regression into fire detection systems, the problem should first be formulated as a binary classification task to accurately determine the presence or absence of fire.Sensor readings, environmental parameters, and relevant contextual information can all be included as input features.The logistic regression model can be trained efficiently using optimization algorithms such as gradient descent by using a well-prepared dataset.
The linear model can help to identify fire incidents more accurately and quickly by incorporating logistic regression into fire detection systems.The model's ability to predict the likelihood of fire occurrence based on input features allows proactive measures to be implemented quickly, reducing the risks associated with fire spread and potential damage.However, it is important to note that logistic regression is only one of several classification models investigated in this research paper.As previously stated, other models such as Support Vector Machines, Decision Trees, and Multi-Layer Perceptron, are included in the comparative analysis.The most accurate and robust model for fire detection can be determined using this analysis.

B. Multilayer Perceptron (MLP)
Multilayer Perceptron (MLP) is a widely utilized neural network architecture that is well-suited for supervised learning tasks, including classification and regression.Its effectiveness lies in its ability to model complex, non-linear relationships within the data, making it an ideal choice for tasks that require capturing intricate patterns and making accurate predictions [23].Neurons in a Perceptron must use an activation function such as ReLU or sigmoid.However, neurons in a Multilayer Perceptron may use any activation function.The activation function equation is written as follows [22].
The activation unit is formed when an activation function φ is applied to the z value.Gradient descent cannot be used to learn weights unless it is differentiable.The activation function is often a sigmoid (logistic) function.
Because of their ability to learn and recognize patterns associated with fire-related data, MLPs offer a promising approach in the context of fire detection.By training an MLP on a large dataset of labeled examples, an optimization algorithm, such as stochastic gradient descent, can be used to adjust the network's internal weights.This weight adjustment aims to reduce the difference between the MLP's predicted and true output, thereby improving the network's predictive accuracy.
Linking back to the previous content, our research paper conducts a comparative analysis of different classification models, including MLP, to determine the most accurate and robust model for fire detection.In this analysis, we evaluate the performance of MLP on a sensor dataset collected by S. Blattmann.Through the training process, the MLP learns to identify and understand the patterns within the data that correspond to fire incidents.By adjusting the weights of its connections based on the errors made during training, the MLP gradually improves its ability to accurately classify firerelated data.
Furthermore, our research paper goes beyond assessing MLP performance by conducting an in-depth examination of its architecture and characteristics.We investigate the MLP model's scalability to ensure its suitability for real-world deployment in large-scale fire detection scenarios.In addition, we investigate the MLP's learning curves, providing insights into its training dynamics and convergence properties.

C. Support Vector Machine (SVM)
SVM is a powerful machine-learning algorithm that can be used for a variety of classification tasks, including fire detection.SVMs are used as one of the classification models in our research paper to analyze their performance in detecting fires using sensor data.SVMs are well-known for their ability to find an optimal hyperplane in a highdimensional space that best separates different classes.This separation process, also known as training the SVM, enables it to distinguish between various classes based on their features.Once trained, the SVM can be used to predict the class of new, previously unseen data [24], [25] SVMs' ability to handle complex and non-linear datasets is one of their most significant advantages.This is especially useful in fire detection scenarios where the relationships between different fire-related features are not always linear.SVMs can detect intricate patterns in data and accurately classify instances as fire or non-fire.Furthermore, SVMs perform well when the dataset's number of features (dimensions) exceeds the number of samples.Sensor data in fire detection is frequently composed of numerous features gathered from various sensors.SVMs take advantage of the kernel trick to project data into a higher-dimensional space [26].This transformation facilitates the identification of an optimal hyperplane in the new feature space, even when detection solutions.

D. Decision Tree
A decision tree is a useful machine-learning model that can be used to detect fires.As previously stated, our research entails a comparison of four classification models, including Decision Trees.Decision trees are supervised learning algorithms that use decision rules derived from feature values to partition data [27].This procedure creates a tree-like structure, with internal nodes representing the algorithm's decisions and leaf nodes indicating the final classification or prediction.Decision trees are known for their ease of use and interpretability, making them especially useful in situations where understanding the decision-making process is critical.Furthermore, decision trees provide quick training and prediction times, which can be useful in real-time fire detection applications.We intend to evaluate the accuracy and performance of Decision Trees alongside other classification models, such as Support Vector Machines, Logistic Regression, and Multi-Layer Perceptron, in order to identify the most effective approach for fire detection.

III. RESULTS AND DISCUSSION
For our research, we have chosen to utilize IoT sensor data gathered by S. Blattmann in a series of real-life experiments conducted under diverse conditions.This dataset comprises 12 feature columns and 1 label column, providing valuable information for fire detection.The dataset encompasses a total of 62,630 readings, which were divided into training and testing sets with an 80:20 ratio.The training set, consisting of 50,104 entries, was used to train our models, while the remaining 12,526 entries were reserved for evaluating the model's performance.A sample of the dataset the original data may not be linearly separable [28], [29].
In our research, we incorporate SVMs as one of the classification models and compare their performance with other models such as Decision Trees, Logistic Regression, and Multi-Layer Perceptron (MLP).By evaluating the accuracy and performance of SVMs on the sensor dataset collected by S. Blattmann [10], we aim to determine the most effective model for fire detection.The inclusion of SVMs in our analysis demonstrates our commitment to exploring various machine-learning techniques to enhance fire detection systems.SVMs' ability to handle complex, non-linear data and their versatility in high-dimensional feature spaces make them valuable tools in the pursuit of accurate and efficient fire entries is presented in Table I showcasing the structure and characteristics of the data.A comprehensive evaluation was conducted to select the optimal model for the given dataset based on the analysis of Receiver Operating Characteristic (ROC) curves and accuracies.Figure 3 depicts the ROC curves and corresponding accuracies for the models.This evaluation is a critical step in determining the most suitable model for the dataset.Fig. 3 depicts the ROC curves and corresponding accuracies for the models.
Among the classification models employed in our study, Figure 4 provides a visual representation of the optimal fit between the Multi-Layer Perceptron (MLP) model and the dataset's data volume.In our experiment, the MLP model was the Multi-Layer Perceptron (MLP) demonstrated exceptional performance, achieving near-perfect behavior.The Support Vector Machine (SVM) with a Radial Basis Function (RBF) kernel also exhibited nearly flawless behavior.Consequently, we proceeded with further analysis using the MLP classifier due to its superior accuracy.In the subsequent phase, our investigation focused on examining the learning curves associated with the MLP model implemented using the "sklearn.neural network".MLP Classifier" module, with 4 hidden layers, each containing 10 neurons.The activation function "relu" was chosen due to its suitability for efficient training.The performance of the model was evaluated through 10-fold cross-validation, yielding an impressive accuracy of 0.997.The standard deviation of the results was found to be 0.0016, indicating a high level of consistency.To further assess the model's scalability, we present the scalability curves, which provide insights into its performance characteristics as the dataset size increases.The results depicted in Figure 5 illustrate the fitting time pattern, which exhibits an initial exponential increase, followed by a linear trend beyond 30,000 samples.In contrast, the score time demonstrates a desirable linear relationship.The results of our study demonstrate the effectiveness of machine learning models in fire detection.We compared four different classification models: Support Vector Machines (SVMs), Decision Tree, Logistic Regression, and Multi-Layer Perceptron (MLP).Among these models, MLP yielded the highest accuracy of 0.997 and exhibited a favorable ROC curve.This indicates that MLP is a robust classifier for fire detection, capable of accurately classifying fire-related data points.The model's scalability and learning curves also met our desired expectations, suggesting its suitability for handling larger datasets and adapting to new data patterns.
The literature review revealed various approaches to fire detection, including the use of images, wireless sensor network (WSN) data, or a combination of both.Some studies utilized vision sensors equipped with cameras, allowing for a wider area of coverage and more precise information on the location and size of fires.These vision-based systems offer greater autonomy and eliminate the need for human intervention in detecting fires.Additionally, the integration of machine learning, deep learning, and artificial intelligence technologies further enhances the performance of these systems.Several studies explored the integration of IoT and sensorbased technologies in fire detection systems [30].For example, researchers integrated multiple sensors, such as CO2, smog, CO, and temperature sensors, into an IoT-based fire alarm system.By applying machine learning methods like K-Nearest Neighbors (K-NN) and decision trees, they achieved high accuracy in classifying fire and non-fire conditions [31].Another study proposed a video-based fire detection system that protected the privacy of the environment by transmitting extracted features rather than the actual video.Combined with convolutional neural networks (CNNs), this approach outperformed other methods and offered reliable fire detection while preserving privacy.
The literature also addressed the difficulties associated with outdoor fire detection.Smoke detection was difficult in outdoor IoT environments due to hazy and unpredictable conditions.Researchers investigated deep CNN-based methods and lightweight CNN architectures to improve smoke detection performance.These advancements aimed to overcome the limitations of traditional techniques and achieve greater accuracy in a variety of environments, including foggy conditions.
Overall, our findings and the literature review emphasize the importance of fire detection systems in mitigating the negative consequences of fires.The combination of machine learning models, vision sensors, Internet of Things technologies, and sensor networks has aided in developing intelligent and efficient fire detection systems.The findings show the potential for accurate and timely fire detection, allowing for quick intervention and minimizing the economic and environmental damage caused by fires.

IV. CONCLUSION
In conclusion, our research aimed to develop a machinelearning program for fire detection using a web-obtained IoT sensor dataset.We comprehensively evaluated four candidate classifiers, namely, Decision Tree, Support Vector Machines (SVM Logistic Regression, and Multi-Layer Perceptron (MLP), to determine the most appropriate algorithm.Based on the evaluation of their ROC curves, the MLP classifier was selected for further development due to its superior performance.The MLP model we developed consisted of four hidden layers, each with ten neurons activated by the'relu' function.Through 10-fold cross-validation, we attained a remarkable accuracy score of 0.997%, indicating that the model is capable of classifying fire-related data points with precision.To evaluate the learning behavior of our model, learning curves were generated.These curves demonstrated that as the number of samples increased, the model's performance plateaued at approximately 50,000 samples, which corresponds well with the size of the dataset.This result suggests that our model accurately captured the underlying data patterns.In addition, we assessed the scalability of our model by analyzing its fit and score times.After surpassing a certain threshold, the fit time transitioned from an exponential growth pattern to a linear one.This demonstrates that our model can efficiently manage larger datasets.In contrast, the score time demonstrated a linear relationship, consistent with our real-time fire detection specifications.
Using an IoT sensor data set, our research successfully developed a machine-learning program for fire detection.The MLP classifier proved to be the most efficient algorithm, achieving high accuracy and exhibiting acceptable learning behavior and scalability.Our findings contribute to the advancement of fire detection technologies and suggest promising real-world applications for preventing and mitigating fire incidents.Additional research could concentrate on refining the model's performance, investigating additional features or data sources, and assessing its efficacy in a variety of fire detection scenarios.There is a need for additional research and development in this area to explore innovative approaches and enhance the scalability and adaptability of fire detection systems in a variety of environments.

Fig. 1
Fig. 1 Potential of fire locations and reasons

Fig. 3
Fig. 3 Depicts the ROC curves and corresponding accuracies for the models.

Fire Sensing Flame Sensing: Nonvisual Visual Miscellaneous sensing: Ultrasonic
, utilizing cloud-based feature extraction and classification MicrowaveSmoking Sensing:Nonvisual Visual