# A Machine Learning Approach for the Classification of Refrigerant Gases
## 1 Introduction
Typically, refrigerant recovery involves reprocessing through filtering, drying, distillation, and chemical treatment to meet the \"Air-Conditioning, Heating, and Refrigeration Institute\" (AHRI) Standard 700-1995 specifications [11]. Other reasons why quantitative measurements of the presence of such gases are required are leak detection during the manufacture of air conditioning components to determine if they are leak-free, testing newer systems to determine if they are operating at maximum efficiency and the correct mixing ratios [10]. Fast Fourier transform spectroscopy [12] can be used to perform the detection and quantification. However, these instruments are sensitive, cumbersome, and expensive and often a trained technician is needed to operate them under field conditions. Therefore, a mobile, easy-to-use, and less expensive detection device would be useful. Small devices using IR-sensor arrays deliver data that can feed machine-learning algorithms in order to analyze the measurement results. In this manuscript, we present a comprehensive study on the implementation of machine learning algorithms for the classification of refrigerant gases in IoT-based gas detection systems. Our approach leverages the networked configuration of gas sensors to facilitate continuous monitoring and real-time analysis of the environment. By integrating state-of-the-art machine learning models, such as Random Forests, Support Vector Machines, and Neural Networks, we demonstrate how these algorithms surpass traditional gas detection methods in accuracy and speed. Through experimental evaluations, we showcase the advantages of our machine learning approach in accurately distinguishing between critical refrigerant gases, including R32 and R134, with minimal latency. Some key findings from our experiments and methodology include:  
* High Accuracy in Gas Classification: The Random Forest classifier achieved high precision and recall rates in distinguishing between R32 and R134a gases, underscoringits effectiveness in this application. This model's robustness was further validated through confusion matrices and performance metrics such as F1-scores. * Effectiveness of Feature Extraction: The use of a very fast library for feature extraction proved pivotal in transforming raw sensor data into meaningful features, thereby enhancing the performance of the classification models. This automated process reduced the need for manual feature engineering, accelerating the development of predictive models. * Impact of Air Dilution Levels: The models also effectively handled varying air dilution levels, maintaining high accuracy across different gas concentrations. This capability is crucial for practical applications where gas concentrations can fluctuate significantly. * Dimensionality Reduction for Visualization: Techniques such as t-SNE were employed to reduce the dimensionality of the data, facilitating better visualization and understanding of the underlying patterns. These techniques highlighted the distinct clustering of gas types and their concentrations, supporting the models' classification decisions.