A Cluster-based Approach for Emotion Recognition in Software Development
Timely recognizing developers’ emotions is crucial to support their productivity and well-being. To this aim, recent research has proposed approaches for sensor-based emotion detection during programming tasks, with promising results. However, limitations exist due to individual physiological differences, which we aim to address in the current study. Specifically, we propose a novel cluster-based approach for emotion recognition in software development using non-invasive biometric sensors. Our methodology enables the training of emotion recognition models specific to groups of people with similar physiological profiles. We evaluate our approach using a dataset of self-reported emotions and biometrics of developers involved in a Java programming task. Results show that our cluster-based approach enhances the performance of emotion classification compared to baseline approaches that do not account for individual differences. For valence recognition, we achieve improvements in precision (+33%), recall (+12%), and F1-score (+18%). For arousal, the most notable improvement is observed in precision (+29%). The classifier demonstrates particular effectiveness in identifying negative emotions with high arousal, which is especially valuable for detecting potentially detrimental emotional states. While promising, our results suggest that further optimization through additional data collection and individual model training would be beneficial before practical deployment. The study includes a comprehensive evaluation of the proposed approach and provides a lab package for replication purposes.