Music is a powerful language to express our feelings and in many cases is used as a therapy to deal with tough moments in our lives. Emotions and moods can be easily reflected in music, when we are doing sports, we tend to listen to energetic music, similarly when we are anxious or tired a nice relaxed song can help us to calm down. That’s why I try to figure out how classification models could help to determinate which is the mood of a specific track.

In this article, I will expose and explain how I could achieve this idea using a Multi-Class Neural Network for Classification and a cool Dataset provided from Spotify. So with no more talk, let’s start working!!.

*Full code, scripts, notebooks and data on my Github Repository (Click Here)

Required Tools:

  • Pandas and Numpy for data analysis.
  • **Keras and Tensorflow **to build the Deep Learning model.
  • Sklearn to validate the model.
  • **Seaborn **and **Matplotlib **to plot a nice graph.
  • Spotipy Python Library (click here for more info).
  • Spotify Credentials to access their Apis and Data acquisition (click here for more info).

Spotify Audio Features:

Spotify uses a series of different features to classify tracks. I copy/paste the information from the Spotify Webpage.

  • Acousticness: A confidence measure from 0.0 to 1.0 of whether the track is acoustic. 1.0 represents high confidence the track is acoustic.
  • Danceability: Danceability describes how suitable a track is for dancing based on a combination of musical elements including tempo, rhythm stability, beat strength, and overall regularity. A value of 0.0 is least danceable and 1.0 is most danceable.

#spotify #editors-pick #deep-learning #python

Predicting the Music Mood of a Song with Deep Learning.
11.40 GEEK