Giter Site home page Giter Site logo

music-recommendation-system's Introduction

Music Recommendation System

System Architecture Overview

Components

  1. Spotify Web API

alt text

from the feature the system only uses valence and energy. 2. With this the Valence-Arousal Plane, a well known psychological models can be built, that can display all dimensins of mood. The model is it is widely adopted because it strikes a great balance between complexity and predictive power.

Emotional-classification-of-music-by-energy-and-valence-parameters-with-exemplary-songs

  1. Vector Distance Model for recommendations:
    • alt text
    • Each track can be seen as a vector
    • The tracks can be connected through vectors as well
    • Tracks with similar vibe = connecting vecktor has lowest length
    • -> connect find all the vectors (arrows) connecting a given track with all the other tracks (t2-t1), apply sqrt(a²+b²) to find the norm and take the arrow with the lowest norm/length.
    • this can be implemented as: def distance(p1, p2): distance_x = p2[0]-p1[0] distance_y = p2[1]-p1[1] distance_vec = [distance_x, distance_y] norm = (distance_vec[0]**2 + distance_vec[1]2)(1/2) return norm or just use numpy.linalg.norm(p2-p1)

System

  1. Authorization with Spotify Client ID and Client Secret.
  2. Get all of Spotify’s 120 genre labels using <sp.recommendation_genre_seeds()> and set the number of recommendations per genre to 100
  3. Fetch a dataset of songs from spotify. The system draws 100 tracks from over 120 genres, resulting in a track database of around 12000 tracks with music from various styles.
  4. For each of these tracks, crawl metadata and audio information and store them in the <data_dict>
  5. Transform the dictionary to a pandas dataframe, drop duplicate id’s and export the dataframe to working directory: df = pd.read_csv("valence_arousal_dataset.csv")
  6. Read in the dataframe
  7. Combine Valence and Mood to a vector
  8. Use the above generated data to create a recommendation system:
    • Crawl the input track’s “valence” and “energy” values from the Spotify API
    • Compute the distances between the input track and ALL other tracks in our reference dataset.
    • Sort the reference tracks from lowest to highest distance.
    • Return the n least distant tracks.

Packages used

  1. Tekore for authorization
  2. pandas
  3. tqdm

music-recommendation-system's People

Contributors

tina-hoeflich avatar

Watchers

 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.