Jurnal Informatika
Vol. 13 No. 2 (2026): October

Valence-Band Mood Classification of Spotify Tracks with Gaussian Naïve Bayes: A Leakage-Aware Evaluation on Numerical Audio Features

Anas, Amalia (Unknown)
Wibowo, Agung (Unknown)
Ermawati, Erni (Unknown)
Maryani, Ina (Unknown)
Aji, Sopian (Unknown)



Article Info

Publish Date
13 Oct 2026

Abstract

Mood classification from Spotify audio descriptors is frequently reported with accuracies above 90%, yet several studies derive the mood label from valence thresholds and then supply valence to the classifier as an input feature, a form of target leakage that overstates generalization. This study quantifies that inflation and establishes a leakage-free baseline for Gaussian Naïve Bayes on numerical audio features. Following CRISP-DM, 6,000 popular tracks from six genres in the Spotify Tracks Dataset were labeled into four valence bands (Angry, Sad, Cheerful, Happy); the class distribution (17.3%, 28.6%, 32.0%, and 22.1%) and the 32% majority baseline are reported in full. Two configurations were evaluated on a stratified 80:20 split with five-fold cross-validation: Model A with all ten descriptors including valence, and Model B with the nine remaining descriptors. Model A reached 89.17% test accuracy (macro-F1 0.89), whereas Model B reached 42.33% accuracy, 44.47% balanced accuracy, and macro-F1 0.43, an inflation of 46.8 percentage points attributable to leakage alone. Model B still exceeds the majority baseline by about 10 points, with the weakest recall for Sad (0.26). Permutation importance ranks danceability first, followed by instrumentalness, duration, and energy, indicating that the remaining descriptors carry rhythm- and arousal-related information rather than pleasantness. Errors concentrate in adjacent valence bands and in the Sad/Angry pair, which share low valence and differ only in arousal, a dimension the labeling rule does not observe. The findings argue for reporting leakage-free results and class distributions in Spotify mood studies, and for two-dimensional (valence by energy) labeling..

Copyrights © 2026






Journal Info

Abbrev

ji

Publisher

Subject

Computer Science & IT

Description

Jurnal Informatika first publication in 2014 (ISSN: e. 2528-2247 p. 2355-6579) is scientific journal research in Informatics Engineering, Informatics Management, and Information Systems, published by Universitas Bina Sarana Informatika which the articles were never published online or in print. The ...