A Comparative Analysis of K-Nearest Neighbors and Logistic Regression for Classifying the Effectiveness of the Do Not Disturb Feature in Supporting Student Focus and Productivity
Keywords:
Do Not Disturb, K-Nearest Neighbors, Logistic Regression, machine learning, student productivityAbstract
Smartphone notifications can interrupt students’ concentration during academic activities, making the effectiveness of the Do Not Disturb (DND) feature relevant to focus and productivity. This study compares K-Nearest Neighbors (KNN) and Logistic Regression to classify perceived DND effectiveness using eleven predictors related to digital device use, study focus, DND usage, and perceived productivity. Data were collected through an online questionnaire involving 150 students at Universitas Pembangunan Nasional “Veteran” Jawa Timur. The target variable was grouped into effective and ineffective categories. The dataset was divided into training and testing sets using a stratified 70:30 split, and five-fold cross-validation was applied during model development. KNN achieved a cross-validation accuracy of 89.52% with k = 17, while Logistic Regression obtained 82.86%. On the 45-observation test set, Logistic Regression achieved an accuracy of 84.44%, precision of 88.24%, recall of 90.91%, F1-score of 89.55%, and ROC-AUC of 0.8990. KNN achieved 80.00% accuracy, 81.58% precision, 93.94% recall, 87.32% F1-score, and 0.9318 ROC-AUC. Thus, Logistic Regression performed better in accuracy, precision, and F1-score, whereas KNN had higher recall for the effective class and a higher ROC-AUC. Logistic Regression coefficients also showed that perceived DND assistance in maintaining focus was positively associated with the predicted effective category. Overall, Logistic Regression provided more balanced classification performance on the test set, although neither algorithm outperformed the other across all metrics. These findings concern students’ reported perceptions and do not establish a causal effect of DND on focus or productivity.



