top of page

HIERARCHICAL

The Premise

We also implemented a Hierarchical Clustering model, which we used to cluster our song data (from Spotify API) into clusters and then recommend songs from the same cluster. The idea is that songs in the same cluster are more likely to be similar. Thus given a playlist, we will recommend it songs that are in the same cluster as most of the playlists' songs are but not already in the playlist. We used Agglomerative clustering (Bottom-up approach) instead of Divisive clustering since it is less complex and given how time consuming our calculations are, it will be less-expensive to compute while producing similar results. We formed these clusters based on duration_ms, danceability, energy, key, loudness, speechiness, acousticness, instrumentalness, liveness, valence, tempo, and time_signature.
For each playlist, we fit the model to a train set consisting of half the songs of a playlist and compared our predictions with the obscured half of that playlist (the test set).

Hierarchical Clustering: Intro

Model Performance

The number of clusters that had the highest combined NDCG and R-precision scores was 4 clusters; this gave an NDCG score of 0.083 and an R-precision score of 0.020.

Hierarchical Clustering: Text
HC_NDCG.png
Hierarchical Clustering: Image
HC_R.png
Hierarchical Clustering: Image

EXAMPLE PLAYLIST RECOMMENDATIONS

STARTING PLAYLIST

'7am', 'All The Way Up', 'Benjamins', 'Black Beatles', 'Body', 'Call On Me - Ryan Riback Extended Remix', 'Capsize', 'Caroline', 'Chill Bill', 'Closer', 'DEVASTATED', "Don't Wanna Know (feat. Kendrick Lamar)", 'Fake Love', 'Flex (Ooh, Ooh, Ooh)', 'Gassed Up', 'Girls Like (feat. Zara Larsson)', 'How I Feel', 'Hurts So Good', 'I Like Tuh', "If It Ain't Love", 'Ignition - Remix', 'Influence', 'Insomnia', 'Juju On That Beat (TZ Anthem)', 'Just Girly Things', 'Keep It Mello (feat. Omar LinX)', 'Let Me Explain', 'Let Me Hold You (Turn Me On)', 'Litty (feat. Tory Lanez)', 'Love Me', 'Man Of The Year', 'Mercy', 'Midnight City', 'New Thang', 'No Limit', 'No Role Modelz', 'No Type', 'One Night (Remix) [feat. Fetty Wap, Don Lu & King Nell$]', 'Phone Down', 'Really Really', 'Right On Time', 'Saved (feat. E-40)', 'Side To Side', 'Starving', 'Swimming Pools (Drank) - Extended Version', 'The Next Episode', 'The Show Goes On', 'This Could Be Us', 'Tiimmy Turner', 'Truffle Butter', 'Uber Everywhere', 'Ultimate', 'Wavy (feat. Joe Moses)', "We Can't Stop", 'White Iverson', 'X (feat. Future)', 'YNO', 'oui'

PREDICTED SONGS

'21 Guns', "Ain't My Fault", 'Alive', 'American Money - AWAY Remix', 'Backseat Serenade', 'Broken Arrows', 'Budapest', 'Charlie Brown', 'Cold Water (feat. Justin Bieber & MØ)', 'Cough Syrup', 'Dark Times', 'Did It On’em', 'Dirty Vibe - DJ Snake & Aazar Remix', "Don't", 'Faded', 'Flirt Right Back', 'For the First Time', 'Halo', 'Here for You', 'Holdin On', 'How To Love', 'How to Save a Life', 'I Bet', 'I Miss You', 'In the Name of Love', 'Into You', 'Introducing Me', 'Kiss The Sky (feat. Wyclef Jean)', 'Knock Knock', 'Let Me Love You', 'Linger', 'Lockjaw', 'Look Alive - Remix', 'Make Up Bag', 'Mess Is Mine', 'Millionaire (feat. Nelly)', 'Money Longer', 'Must Be Love (feat. Puff Daddy)', 'Na Na', 'Never Let Me Go', 'Roses', 'Run - Revised Album Version', 'Running Out', 'Save Rock And Roll', 'Ships In The Night', 'Shots - Broiler Remix', "Since You've Been Gone", 'Take Ü There (feat. Kiesza)', 'Team', 'Trees', 'Waves', 'Weekend', 'What Lovers Do (feat. SZA)', 'Wherever I Go', 'Whole Heart', 'Work', 'Your Girl', 'arms'

ACTUAL FULL PLAYLIST

'679 (feat. Remy Boyz)', 'A Milli', "Ain't My Fault", 'All Time Low', 'All We Know', 'Bang Bang', 'Beware', 'BlackOut', 'Broccoli (feat. Lil Yachty)', 'Bugatti', 'Campaign (feat. Future)', 'Champions', "Day 'N' Nite (nightmare)", 'Dirty Vibe - DJ Snake & Aazar Remix', "Don't Mind", 'Famous', 'Feeling Myself', 'First Of The Year (Equinox) - Equinox', 'For Free', 'Froze (feat. Lil Uzi Vert & Nicki Minaj)', 'Hot N*gga', 'I Just Wanna...', 'I Want (feat. 2 Chainz)', 'In the Name of Love', 'Jimmy Choo', 'Jordan Belfort', 'Let Me Love You', 'Light It Up (feat. Nyla & Fuse ODG) - Remix', 'Live This Nightmare - NGHTMRE Remix', 'Lockjaw', 'Look Alive - Remix', 'Money Longer', 'Moolah', 'My Shit', 'Never Be Like You', 'No Problem (feat. Lil Wayne & 2 Chainz)', 'OOOUUU', 'Oh Lord', 'Once In a While', 'Rack City', 'Red Nose', 'Say It', 'Sexual', 'SideLine Watching (Hold Up)', 'Sit Still, Look Pretty (feat. R!OT)', 'Sunday Best', 'Sunset Lover', 'Super Mario World', 'Take Ü There (feat. Kiesza)', 'The Half', 'Trust Nobody (feat. Selena Gomez & Tory Lanez)', 'Used to This', 'Wake Up', 'Wherever I Go', 'Who Gon Stop Me', 'Who Wants to Rock', 'in my miNd', 'wonderful'

Hierarchical Clustering: List
bottom of page