Analisis Komparasi Algoritma Machine Learning Untuk Klasifikasi Kualitas Udara Indoor Berbasis Sensor Low-Cost - Stefanus Eko Prasetyo; Irvan Hansen; Haeruddin Haeruddin (Forum Kerjasama Pendidikan Tinggi (FKPT), 2026)
Indoor Air Quality (IAQ) has a significant impact on occupants’ health and comfort; however, limitations of conventional monitoring systems and the high cost of commercial devices have hindered the widespread implementation of indoor air quality monitoring. Sensor-based IAQ monitoring using low-cost devices provides an affordable solution; however, the resulting data often exhibit variability and noise, making direct interpretation challenging. This study presents a comparative analysis of several machine learning algorithms for indoor air quality classification using sensor data. The dataset was collected from DHT22 and MQ-135 sensors measuring temperature, humidity, and air pollutant levels, resulting in 18,000 samples evenly distributed across three air quality classes: Good, Moderate, and Poor. The proposed methodology includes data preprocessing through median imputation and feature standardization, stratified dataset splitting with a ratio of 70% training, 15% validation, and 15% testing data, and model training using four supervised learning algorithms: Logistic Regression, K-Nearest Neighbors (KNN), Support Vector Machine (SVM), and Gaussian Naive Bayes. Model performance was evaluated using accuracy, precision, recall, and F1-score metrics. Experimental results indicate that all evaluated models achieved high classification performance, with KNN outperforming other algorithms by achieving an F1-score of 1.00 on the test dataset, while the lowest-performing model still achieved an F1-score above 0.96, indicating a relatively narrow yet consistent performance range among the evaluated algorithms. These findings demonstrate the effectiveness of machine learning approaches for indoor air quality classification using low-cost sensor data under controlled experimental conditions.