Git Product home page Git Product logo

lyric_clustering's Introduction

Lyric Clustering with Multiple Genres

Essentially this project is me messing around before moving to the text generation

The main bulk of this repo is dedicated to clustering songs into genres based on their lyrics. Although I could collect a dataset of lyrics from all Spotify genres, I focused mainly on clustering hip-hop and country songs because they seem to be different enough genres. At first, I generated the bag of words vectors using simply word occurance in a song after filtering out stop words, creating a long binary vector. Ultimately, the results were alright. The model was really good at seporating out a chunk of rap lyrics, but about half of the rap lyrics were sorted with the country.

3D graph of clusters after doing PCA on the song vectors

To improve the results, I tried to generate the BOW vectors using normalized frequency counts as opposed to simply word occurance in a song.In preprocessing, I chopped the bottom 25% and top 5% least/most frequent words off of the BOW vocab vector to produce better results, but in the end this method didn't work as well as the previous one. I did, however, dump out these frequency counts to an Excel file and got some cool graphs.

  • Vocab_vec.py/vocab_vec_freq.py for creating the vectors
  • norm.py for normalizing/scaling the data when using the frequency counts
  • clusters_last_stand.py for clustering the BOW vectors
  • lyric_variance.py for analyzing the error of the clusters

lyric_clustering's People

Contributors

thesiti92 avatar mcrouse6 avatar jfdunn avatar

Stargazers

jammy avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.