# Predicting the Duration of Forest Fires Using Machine Learning Methods
## 2 Materials and Methods
### The Used Datasets  
In this research work, open data were used, which are available from the Hellenic Fire Service at the link [[https://www.fireservice.gr/en_US/synola-dedomenon](https://www.fireservice.gr/en_US/synola-dedomenon)]([https://www.fireservice.gr/en_US/synola-dedomenon](https://www.fireservice.gr/en_US/synola-dedomenon)) (accessed on 2 October 2024). The data were obtained for the years 2014-2023 and data preprocessing techniques were applied before inputting the data into machine learning models. The data used for this paper concern the strengthening of the European transparency legislation 2013/37/EE. Therefore, the data are neither type nor location biased, and concern all fires in the Greek (Hellenic) area. The information provided from the Hellenic Fire Service is easily accessible, updated, accurate, allows analysis, and includes all participating parties.  
The initial datasets contained both numerical and alphanumeric information. For example, they included data on the area where the forest fire occurred, as well as information about the fire station that participated in the suppression efforts. Therefore, the first step in data preprocessing was the digitization of the columns containing alphanumeric data, specifically those with numerical information. This involved replacing categorical data with discrete integer values, enabling their use by machine learning algorithms, that require numerical input. The next crucial step in data preprocessing involved handling missing values. Specifically, records that contained missing values in important features, such as climatic data or other relevant variables, were removed from the dataset. This typically occurred when a value was unavailable at the time of recording, which could lead to biased or unreliable results. Additionally, records with a fire duration of zero were excluded, as they were considered unrealistic and inappropriate for analysis. To define the output category, the duration of the forest fire was converted from hours or other time units into minutes, providing greater precision in classification. Subsequently, three distinct categories were created based on the logarithmic value of the fire duration in minutes. This logarithmic transformation allowed for better management of the large variations in fire duration, ensuring that both shorter and longer fires were appropriately considered without overemphasizing extremely large values. The three resulting categories were used as target values for the execution of experiments, enabling the classification of forest fires based on their duration. In the present work, and for the Greek data on forest fires, the following fire classification was used:  
1. Up to 6 h is considered to be a fire of short duration;
2. Up to 2 days is a forest fire of medium duration;
3. A duration of 2 days or more is considered a long-duration fire.  
In this way, the data were adequately prepared to be analyzed using machine learning methods, ultimately achieving greater accuracy in predicting the duration of forest fires. The preprocessing steps are graphically illustrated in Figure 3.  
Having performed the previously mentioned preprocessing steps, the final datasets contain 25 features and the following information about the forest fires:  
1. Fire department.
2. Province.
3. Season.
4. Burnt area: Forest area, grove, grasslands, reeds/swamps, agricultural lands, cover crop, and garbage dumps.
5. Personnel: Firefighters, volunteers, army, etc.
6. Vehicles: Firefighting, tanks, etc.
7. Aerial means: Helicopters and other aircraft.  
A schematic representation of the used dataset is given in Figure 4.