- A preview of this full-text is provided by Springer Nature.
- Learn more
Preview content only
Content available from Personal and Ubiquitous Computing
This content is subject to copyright. Terms and conditions apply.
https://doi.org/10.1007/s00779-020-01393-4
ORIGINAL PAPER
Emotional classification of music using neural networks
with the MediaEval dataset
Yesid Ospitia Medina1,2 ·Jos´
eRam´
on Beltr´
an3·Sandra Baldassarri3
Received: 7 December 2019 / Accepted: 7 March 2020
©Springer-Verlag London Ltd., part of Springer Nature 2020
Abstract
The proven ability of music to transmit emotions provokes the increasing interest in the development of new algorithms for
music emotion recognition (MER). In this work, we present an automatic system of emotional classification of music by
implementing a neural network. This work is based on a previous implementation of a dimensional emotional prediction
system in which a multilayer perceptron (MLP) was trained with the freely available MediaEval database. Although these
previous results are good in terms of the metrics of the prediction values, they are not good enough to obtain a classification
by quadrant based on the valence and arousal values predicted by the neural network, mainly due to the imbalance between
classes in the dataset. To achieve better classification values, a pre-processing phase was implemented to stratify and balance
the dataset. Three different classifiers have been compared: linear support vector machine (SVM), random forest, and MLP.
The best results are obtained with the MLP. An averaged F-measure of 50% is obtained in a four-quadrant classification
schema. Two binary classification approaches are also presented: one vs. rest (OvR) approach in four-quadrants and binary
classifier in valence and arousal. The OvR approach has an average F-measure of 69%, and the second one obtained F-
measure of 73% and 69% in valence and arousal respectively. Finally, a dynamic classification analysis with different time
windows was performed using the temporal annotation data of the MediaEval database. The results obtained show that the
classification F-measures in four quadrants are practically constant, regardless of the duration of the time window. Also,
this work reflects some limitations related to the characteristics of the dataset, including size, class balance, quality of the
annotations, and the sound features available.
Keywords Music emotion recognition (MER) ·Emotion classification ·Prediction ·Music features ·Multilayer perceptron
1 Introduction
In the last years, the music industry has been experi-
encing many important changes as a result of new user
requirements and the wide range of possibilities offered
Yesid Ospitia-Medina
yesid.ospitiam@info.unlp.edu.ar
Jos´
eRam
´
on Beltr´
an
jrbelbla@unizar.es
Sandra Baldassarri
sandra@unizar.es
1Universidad Nacional de La Plata, La Plata, Argentina
2Universidad Icesi, Cali, Colombia
3Universidad de Zaragoza, 50004 Zaragoza, Spain
by emerging devices and technologies [12]. These tech-
nologies allow users to access huge databases of musical
pieces through different kind of applications. The facility of
creation, accessing, and distributing music, as well as the
effectiveness of search engines on musical repositories are
current challenges of music industry, with different stake-
holders, such as composers, producers, and emerging artists,
waiting for innovative solutions [41]. The main features
of digital music consumption platforms, such as Spotify,
Youtube music, or Deezer, are closely related to the way
they present their contents and allow access to them. In
many cases, recommender system strategies are applied in
order to help listeners explore large music repositories in
order to suggest songs according to their requirements and
preferences. However, knowing users’ taste it is not enough
to recommend a suitable song for a person in a particular
moment. Moreover, it must be taken into account that music
is considered an art that can produce emotional responses
or induce listeners’ emotions [8,36]. This close connection
/ Published online: 15 April 2020
Personal and Ubiquitous Computing (2022) 26:1237–1249
Content courtesy of Springer Nature, terms of use apply. Rights reserved.