# A Machine Learning Approach for the Classification of Refrigerant Gases
## 5 Evaluation
### Gas Type and Dilution Level Classification  
This Section presents the detailed performance metrics for the classification of R32 and R134a refrigerant gases across various dilution levels. This analysis evaluates the precision, recall and f1-score for each class, offering insights into the model's effectiveness and areas needing improvement. Table 5 provides a detailed breakdown of the classification results for twelve distinct classes, corresponding to different percentages of refrigerant types R32 and R134a. This matrix is crucial for visualizing the model's ability to accurately classify the gases across various dilution levels. The diagonal cells represent the number of true positives for each class, illustrating the model's strength in correctly identifying each specific scenario. Off-diagonal cells contain a number of misclassifications, where the model predicted one condition but the actual condition was different, offering insights into the specific challenges or confusions faced by the model. This detailed representation helps in understanding the precision and robustness of the classification system in handling complex, multi-class scenarios. Table 6 provides a detailed breakdown of the performance metrics for a 12-class classification problem, featuring precision, recall and f1-score for each class. The metrics elucidate the efficacy and limitations of the predictive model used in the classification of the dataset. The analysis reveals variability in performance across the classes. Lower dilution levels, specifically R32 0% and R32 5%, demonstrate moderate performance with both precision and recall at 0.5000. This suggests challenges in the model's ability to differentiate at lower concentrations, potentially due to overlapping sensor responses or insufficient distinguishing features at these levels. Conversely, mid to high dilution levels such as R32 25%, R32 70%, R134a 50%, and R134a 70% show improved performance. Notably, R32 25% achieves perfect recall, indicating the model's consistent capability to identify \begin{table}
\begin{tabular}{l c c} \hline
**Class** & **Precision** & **Recall** & **F1-Score** \\ \hline R32 & 0.9167 & 0.9167 & 0.9167 \\ R134a & 0.9167 & 0.9167 & 0.9167 \\ \hline \end{tabular}
\end{table} 
Table 4: Performance Metrics for Gas Type Classification. \begin{table}
\begin{tabular}{c c c c c c c c c c c c} \hline \hline \multirow{2}{*}{**Actual**} & \multicolumn{8}{c}{**Predicted Class**} \\ \cline{2-11}  & **R32** & **R32** & **R32** & **R32** & **R32** & **R32** & **R134a** & **R134a** & **R134a** & **R134a** & **R134a** & **R32** \\  & **0\%** & **5\%** & **10\%** &  
all true positives for this dilution level. High dilution levels for R134a also perform well, particularly R134a 70%, which exhibits high effectiveness with both precision and recall reflecting robust model accuracy at this concentration. Exceptional performance is noted for R134a 5% and R134a 10% classes, with perfect scores across all metrics--precision, recall, and f1-score. This excellence underscores the model's capability to flawlessly distinguish these conditions, marking a high point in model reliability for these specific dilutions. However, specific classes such as R32 50% exhibit significant challenges, showing zero precision and recall, which points to a complete model failure in detecting this class. This could be due to sensor limitations or deficiencies in the model's training for this particular condition. Similarly, classes like R134a 0% and R134a 25% demonstrate high precision but varied recall rates, suggesting precision in predictions when made, yet a failure to detect all actual instances, particularly noticeable at the 0% dilution level. Overall, the model achieves an accuracy of 72.92% across 48 instances, indicating a reasonable general performance. However, this also highlights the necessity for improvement, especially in classes with suboptimal detection rates.