EUVIMEDEUVIMED entdecken
Open Access · CC BY-SA 4.0

A Comparative Study of Random Forest, K-Nearest Neighbors, and XGBoost Models for Weather-Aware Smart Office Building Automation

Erwin Yonata, Maya Anggun Beer, Ni Nyoman Putri Shopia, Emilia Loho, Gilang Raka Rayuda Dewa

Journal of Applied Computer Science and Technology · 28.05.2026 · 7 (1) · 9-21

DOI: 10.52158/7925qh24 ↗

Kurz gefasst

Fachartikel in der Zeitschrift Journal of Applied Computer Science and Technology, online erschienen am 28.05.2026. Verfasst von Erwin Yonata und 4 weiteren Autor:innen. Der Volltext ist frei zugänglich (Open Access, CC BY-SA 4.0).

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

The intelligent control of lighting and HVAC systems plays a critical role in reducing energy consumption in smart buildings. However, many existing automation systems rely on static scheduling strategies that fail to adapt to dynamic environmental conditions. Although machine learning has been widely applied to weather-based building automation, inconsistent feature selection, model configuration, and evaluation procedures limit the validity of comparative performance claims. This study aims to develop and evaluate a machine-learning-based weather classification framework for smart building automation. The proposed methodology follows a structured pipeline comprising data acquisition and preprocessing, model training and testing, parameter tuning, and performance evaluation. A publicly available Weather Type Classification dataset is used, consisting of numerical weather parameters, which are encoded prior to training. Feature selection is applied to identify the most influential predictors. Three machine learning models, Random Forest, K Nearest Neighbors, and XGBoost, are trained using an 80:20 stratified split, with hyperparameters optimized through grid search to ensure an optimized model. Model performance is evaluated using accuracy, precision, recall, F1 score, and a confusion matrix. Experimental results demonstrate that Random Forest achieves the highest accuracy of 97.50 percent, followed by XGBoost at 96.90 percent and K Nearest Neighbors at 95.73 percent, with balanced performance across all weather categories. The findings indicate that ensemble-based classifiers are well-suited for robust weather recognition. The classified weather outputs can be directly mapped to real-time control strategies for lighting and HVAC systems, enabling adaptive automation and improved energy efficiency in smart buildings.

Zitieren

APA

Yonata, E., Beer, M. A., Shopia, N. N. P., Loho, E., & Dewa, G. R. R. (2026). A Comparative Study of Random Forest, K-Nearest Neighbors, and XGBoost Models for Weather-Aware Smart Office Building Automation. Journal of Applied Computer Science and Technology, 7(1), 9-21. https://doi.org/10.52158/7925qh24

Vancouver

Yonata E, Beer MA, Shopia NNP, Loho E, Dewa GRR. A Comparative Study of Random Forest, K-Nearest Neighbors, and XGBoost Models for Weather-Aware Smart Office Building Automation. Journal of Applied Computer Science and Technology. 2026;7(1):9-21. doi:10.52158/7925qh24

BibTeX
@article{Yonata2026,
  author = {Yonata, Erwin and Beer, Maya Anggun and Shopia, Ni Nyoman Putri and Loho, Emilia and Dewa, Gilang Raka Rayuda},
  title = {A Comparative Study of Random Forest, K-Nearest Neighbors, and XGBoost Models for Weather-Aware Smart Office Building Automation},
  journal = {Journal of Applied Computer Science and Technology},
  year = {2026},
  volume = {7},
  number = {1},
  pages = {9--21},
  doi = {10.52158/7925qh24}
}
Kostenlos starten →