# A Machine Learning Approach for the Classification of Refrigerant Gases
## 4 Dataset  
In this research, we adopted an IoT-based approach to gather data from a diverse range of refrigerant gases, such as R32, R134a. To achieve this, we deployed a custom-designed sensor array comprising multiple gas sensors, meticulously chosen for their sensitivity, selectivity, and compatibility with the target refrigerants. The sensor array was seamlessly connected to an IoT platform, enabling efficient real-time data collection, transmission, and storage.  
For the data acquisition process, we exposed the sensor array to controlled gas environments containing varying concentrations of different refrigerant gases. To ensure precision and consistency in measurements, these gas environments were carefully created in a laboratory setting using gas chambers and precisely controlled gas mixtures. Prior to each experiment, the sensors underwent calibration to guarantee accurate readings. Throughout the experiments, the sensor array continuously monitored the gas concentrations, promptly transmitting the acquired data to the IoT platform for further analysis and processing.  
For this research, we gathered a total of 240 signals/samples which was then processed by the fsresh library to extract the features by out ML algorithm. with each sample representing a distinct gas concentration and its corresponding sensor response. The compiled data has been meticulously presented in Table 1, offering an insightful summary of the sample distribution for each refrigerant gas type.  
We further divided the dataset of the two refrigerant gases with different air dilution levels. Table 2 describes the dataset comprising measurements of two refrigerant gases, R134a and R32, recorded under varying air dilution levels, specifically 0%, 5%, 10%, 25%, 50% and 70%. This table underscores the balanced nature of our data collection process, as it demonstrates an equitable distribution of samples across different gases. Such a comprehensive and balanced dataset played a crucial role in enabling the successful training and evaluation of our machine-learning algorithms, ensuring a robust and dependable discrimination of refrigerant gases.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Type of Refrigerant Gas** & **Number of Signals** \\ \hline R32 & 120 \\ R134a & 120 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Distribution of Collected Signals for Refrigerant Gases.  
The raw data from these sensors are then subjected to an automated feature extraction process using the Python package tsfresh [26]. tsfresh is pivotal in our methodological framework, facilitating the extraction of relevant features from the time series data efficiently. This tool is designed to automate the calculation of a wide array of time series characteristics, extracting over 794 distinct features by default. These features are derived based on their statistical significance, ensuring that only the most relevant attributes are retained for model training.  
Our final dataset is organized in a tabular data format, where each row represents a unique measurement instance and each column a feature. This structure is particularly suited for the application of machine learning algorithms and aligns with the requirements of our Random Forest classifier, which distinguishes between the gas types based on the learned patterns in the training data.