🔗 https://findify.herokuapp.com/ (Sometimes it takes 5 seconds for the page to load, this is because the server is starting up)
Findify helps you find new songs to listen to based on previously liked music. It uses Flask as a backend to do computations involving Locality Sensitive Hashing. Data was fetched using Spotify's Song Analysis API. The app was deployed using Heroku.
Here is a sample of what the Song Analysis API gives:
acousticness | artists | danceability | duration_ms | energy | explicit | id | instrumentalness | key | liveness | loudness | mode | name | popularity | release_date | speechiness | tempo | valence | year |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0.0026100000000000003 | ['Drake'] | 0.8909999999999999 | 267067 | 0.625 | 0 | 0wwPcA6wtMf6HUMpIRdeP7 | 0.000176 | 2 | 0.0504 | -7.8610000000000015 | 1 | Hotline Bling | 77 | 2016-05-06 | 0.0558 | 134.967 | 0.5479999999999999 | 2016 |
For each instance of song presented, a user is given two choices, either to like the song or to dislike it.
- If a user dislikes a song
- A randomly selected song that they've never seen before is presented to them.
- If a user likes a song
- A score based on the current song is generated based on the data given through the Song Analysis data. This score is then hashed using MinHashing. This technique is used to quickly estimating how similar two sets are. It employs the Jaccard similarity coefficient in its calculations:
- Once a score is calculated, we use query a dictionary of MinHashes to find the closest related score based on Locality Sensitive Hashing. The following figure gives a good representation of LSH:
- On most instances the query would return several similar songs, so a song that hasn't been heard before is randomly chosen from the returned list of similar songs.