## 6 Conclusions  
Machine learning techniques have aided and eased the process of detecting and classifying attacks targeted toward the multi-zone HVAC system. In this paper, we trained several classifiers, namely Decision Tree, Random Forest, Gradient Boosting, Ada Boost, Light GBM, XGBoost, and CatBoost to detect different types of attacks. The features used to train the classifiers were selected using step forward feature selection. To overcome the problem of an imbalanced dataset, SMOTE and TomekLink for over and under-sampling was used to prevent potentially biased results. The highest results were obtained with the XGBoost classifier, which produced the best AUC, ACC, recall, precision, and F1 score of 0.9999, 0.9998, 0.9996, 1.000, and 0.9998, respectively. Therefore, the proposed study outperformed the previous benchmark study by achieving higher performance on various evaluation metrics while using fewer features. In the current study, XGBoost was the best performing model suffering from black-box nature, therefore, XAI was applied to make the model explainable. SHAP and LIME were used to generate the local and global explanation. Furthermore, the rules were extracted using a global surrogate model to represent the decision making in a form easily understood by human. In this paper, we only considered the attacks available in the HVAC dataset. However, there is a need to extend the work to include more types of attacks and to investigate the performance of the algorithms using other datasets. In future work, we plan to train classifiers to detect new attacks in order to develop more secure and robust systems.  
Conceptualization, I.U.K., N.A., R.A. ([PERSON]), D.A., R.A. ([PERSON]), N.A.A. and A.A.S.; methodology, I.U.K., N.A., R.A. ([PERSON]), D.A., R.A. ([PERSON]), N.A.A. and A.A.S.; software, I.U.K., N.A., R.A. ([PERSON]), D.A., R.A. ([PERSON]), N.A.A. and A.A.S.; validation, XI.U.K., N.A., R.A. ([PERSON]), D.A., R.A. ([PERSON]), N.A.A. and A.A.S.; formal analysis, I.U.K., N.A., R.A. ([PERSON]), D.A., R.A. ([PERSON]), N.A.A. and A.A.S.; investigation, I.U.K., N.A., R.A. ([PERSON]), D.A., R.A. ([PERSON]), N.A.A. and A.A.S. resources, I.U.K., N.A., R.A. ([PERSON]), D.A., R.A. ([PERSON]), N.A.A. and A.A.S.; data curation, I.U.K., N.A., R.A. ([PERSON]), D.A., R.A. ([PERSON]), and A.A.S.; writing--original draft preparation, R.A. ([PERSON]), D.A., R.A. ([PERSON]), N.A.A. and A.A.S.; writing--review and editing, I.U.K. and N.A.; visualization, I.U.K., N.A., R.A. ([PERSON]), D.A., R.A. ([PERSON]), N.A.A.A. and A.A.S.; supervision, N.A. and I.U.K.; project administration, N.A. and I.U.K.; funding acquisition, I.U.K., N.A., R.A. ([PERSON]), D.A., R.A. ([PERSON]), N.A.A. and A.A.S. All authors have read and agreed to the published version of the manuscript.  
**Funding:** This work was supported by the Saudi Aramco Cybersecurity Chair, Imam Abdulrahman Bin Faisal University, Saudi Arabia.  
**Institutional Review Board Statement:** Not applicable.  
**Informed Consent Statement:** Not applicable.  
**Data Availability Statement:** The study used an open-source dataset.  
**Acknowledgments:** We would like to thank SAUDI ARAMCO Cybersecurity Chair for funding this project.  
**Conflicts of Interest:** The authors declare no conflict of interest.