Mood Detector: Bridging Human Physiology and Machine Learning for Affective Computing
Mood Detector - On Using Machine Learning to Identify Moods and Emotions
This paper introduces Mood Detector, an IoT-integrated mobile application that classifies human emotional states (Happy, Sad, Nervous, Bored) by analyzing tri-modal physiological data—pulse, skin electro-conductivity, and temperature. Using a Support Vector Machine (SVM) classifier and an Arduino-Raspberry Pi architecture, the system achieves a validated 100% output accuracy in its testing phase and provides an automated music recommendation engine based on the detected mood.
TL;DR
The "Mood Detector" is a sophisticated IoT ecosystem that decodes human emotions by sniffing out physiological signals rather than looking at faces. By processing Pulse, Skin Conductivity (GSR), and Temperature through a Support Vector Machine (SVM), the system identifies a user's mood and instantly generates a matching YouTube music playlist. It achieves a 100% validation rate in controlled testing, proving that our bodies tell truths our faces might hide.
Background Positioning
In the landscape of "Affective Computing," most mainstream solutions (like those from Google or Intel) focus on Computer Vision—analyzing micro-expressions. This paper shifts the paradigm toward Internal Physiological State Monitoring. It stands as a robust proof-of-concept for how low-cost sensors (Arduino/Raspberry Pi) can be synthesized with supervised learning to create "Emotionally Aware" mobile applications.
Problem & Motivation: Why Physiological Sensing?
Facial recognition for emotion detection is often hindered by lighting conditions, camera angles, and the fact that humans can "fake" expressions. However, the Autonomic Nervous System (ANS) is much harder to manipulate.
The authors' research intuition stems from the fact that emotions are biological events:
- Stress/Excitement triggers a spike in skin conductance (sweat) and heart rate.
- Boredom/Sadness often correlates with lower heart rates and specific peripheral temperature shifts.
By utilizing the Thayer Model, the authors move beyond "simple happiness" and categorize moods based on energy and valence levels.
Methodology: The Hardware-Software Synergism
The architecture is a classic Distributed System design:
- Sensing Layer (Arduino Uno): Collects raw analog signals from the Heart Beat, GSR, and Temperature sensors.
- Processing Layer (Raspberry Pi): Acts as the gateway/server, managing the MySQL database and the ML inference engine.
- Intelligence Layer (SVM): The choice of Support Vector Machines is particularly strategic here. SVMs are highly effective in high-dimensional spaces (3D in this case) and are memory efficient, making them ideal for the limited compute power of a Raspberry Pi.
Figure: The Thayer Model used to map physiological coordinates to emotional quadrants.
The algorithm represents each user state as a point in a 3D coordinate system. The SVM then calculates the optimal hyper-planes that separate these points into four classes: Happy, Sad, Nervous, and Bored.
Experiments & Results: 100% Validation
The system was tested by comparing the ML-predicted mood against the user's self-reported state. Through iterative training and optimization using the sklearn library, the model reached a 100% validation success rate.
Figure: The Android UI displaying the detected mood and initiating the recommendation system.
Beyond just detection, the integration with Stereomood and YouTube demonstrates a practical application of "Closed-loop Affective Computing"—where the system doesn't just monitor the user but actively attempts to improve their state through music.
Critical Analysis & Conclusion
Takeaway
The Mood Detector proves that emotion is a data point. By using physiological indicators, we can build more objective tools for mental health, elderly care, and personalized entertainment.
Limitations
- Form Factor: Currently uses bulky Arduino/Raspberry Pi components. Transitioning to a compact PCB or "System on a Chip" (SoC) is necessary for true wearable adoption.
- Data Scarcity: While 100% accuracy was achieved in testing, SVMs require high-quality labeled data. Expanding this to "in-the-wild" scenarios (where the user is moving or exercising) would introduce significant noise into the GSR and Pulse data.
Future Work
The authors suggest expanding the recommendation engine beyond music to include books, movies, and events. From an ML perspective, the next step would be moving toward Deep Learning (such as 1D-CNNs) to handle the temporal sequences of sensor data, rather than just stagnant average values.
