Upgrade to Pro — share decks privately, control downloads, hide ads and more …

MusicMood - Machine Learning in Automatic Music...

MusicMood - Machine Learning in Automatic Music Mood Prediction Based on Song Lyrics

This project is about building a music recommendation system for users who want to listen to happysongs. Such a system can not only be used to brighten up one's mood on a rainy weekend; especially in hospitals, other medical clinics, or public locations such as restaurants, the MusicMood classifier could be used to spread positive mood among people.

Sebastian Raschka

December 10, 2014
Tweet

More Decks by Sebastian Raschka

Other Decks in Technology

Transcript

  1. MusicMood Machine Learning in Automatic Music Mood Prediction Based on

    Song Lyrics Sebastian Raschka December 10, 2014
  2. Music Mood Prediction • We like to listen to music

    [1][2] • Digital music libraries are growing • Recommendation system for happy music (clinics, restaurants ...) & genre selection [1] Thomas Schaefer, Peter Sedlmeier, Christine Sta ̈dtler, and David Huron. The psychological functions of music listening. Frontiers in psychology, 4, 2013. [2] Daniel Vaestfjaell. Emotion induction through music: A review of the musical mood induction procedure. Musicae Scientiae, 5(1 suppl):173–211, 2002. 

  3. Predictive Modeling Unsupervised learning Supervised learning Regression Classification Clustering Reinforcement

    learning Ranking Hidden Markov models DBSCAN on a toy dataset Naive Bayes on Iris (after LDA)
  4. Feature Extraction Feature Selection Dimensionality Reduction Normalization Raw Data Collection

    Pre-processing Sampling Test Dataset Training Dataset Training Learning Algorithms Post-Processing Cross Validation Final Classification/ Regression Model New Data Pre-processing Refinement Prediction Split Supervised Learning Sebastian Raschka 2014 Missing Data Prediction-error Metrics Model Selection Hyperparameter optimization This work is licensed under a Creative Commons Attribution 4.0 International License. Supervised Learning - A Quick Overview
  5. Lyrics available? Lyrics in English? Sampling 200 songs for validation

    1000 songs for training http://lyrics.wikia.com/Lyrics_Wiki Python NLTK
  6. Mood Labels Downloading mood labels from Last.fm Manual labeling based

    on lyrics and listening • Dark topic (killing, war, complaints about politics, ...) • Artist in sorrow (lost love, ...) sad if ...
  7. Naive Bayes - Why? • Small sample size, can outperform

    the more powerful alternatives [1] • "Eager learner" (on-line learning vs. batch learning) • Fast for classification and re-training • Success in Spam Filtering [2] • High accuracy for predicting positive and negative classes in a sentiment analysis of Twitter data [3] [1] Pedro Domingos and Michael Pazzani. On the optimality of the simple bayesian classifier under zero-one loss. Machine learning, 29(2-3):103–130, 1997. [2] Mehran Sahami, Susan Dumais, David Heckerman, and Eric Horvitz. A bayesian approach to filtering junk e-mail. In Learning for Text Categorization: Papers from the 1998 workshop, volume 62, pages 98–105, 1998. [3] Alec Go, Richa Bhayani, and Lei Huang. Twitter sentiment classification using distant supervision. CS224N Project Report, Stanford, pages 1–12, 2009. 

  8. • TP = true positive (happy predicted as happy) •

    FP = false positive (sad predicted as happy) • FN = false negative (happy predicted as sad) Grid Search and 10-fold Cross Validation to Optimize F1
  9. Future Plans • Growing a list of mood labels (majority

    rule). • Performance comparisons of different machine learning algorithms. • Genre prediction and selection based on sound.