top of page

CONTENT FILTERING

The Premise

For our content filtering model, we implemented a recommendation system using cosine distances calculated based on song features, primarily the audio features from the Spotify API. We implemented this model because we speculate that if songs share similar audio features (and therefore share a short cosine distance), they must be similar songs.

​

As in our Collaborative Filtering model, we use cosine similarity, which measures the orientation of two n-dimensional sample vectors irrespective to their magnitude. It is calculated by the dot product of two numeric vectors, and it is normalized by the product of the vector lengths. The output is in the range 0 to 1, with 1 being the highest similarity. However, the Content Filtering model is different in that we are comparing the similarity of audio features between songs rather than similarity of playlists based on songs included.

​

Using this model, we are able to create two music recommender systems, similar to Spotify’s products: 1.) a radio generator (generates a playlist based on 1 song), and 2.) a playlist generator (generates n playlists based on 1 playlist).

​

To test the model (through calculating average R-precision and NDCG), we filter our data into playlists with a minimum 100 songs so that the model can use at least 50 songs for training when we do a 50-50 train-test split. The average playlist in this dataset contains 52 songs and thus we want to recommend 50 songs as a playlist as well. The model will produce about 50 recommendations and be tested on playlists with 50 songs.

Content Filtering: Intro

Model Performance

This model gave an NDCG score of 0.269 and an R-precision score of 0.0436.

Content Filtering: Text

EXAMPLE PLAYLIST RECOMMENDATIONS

STARTING PLAYLIST

'2112 - Live on Clockwork Angels Tour', 'A Moment of Violence', 'All I Need Is One', 'Along Comes Mary', 'Brain Not A Chain', 'Cannonball', 'Cardboard Castles', 'Dear Sergio:', 'Dividing By Zero', 'First It Giveth', 'Gravity', 'Half-Truism', 'Hand Over Hand', 'Hangover', "Here's to Life", 'Hokum All Ye Faithful', 'I Love You Like An Alcoholic', "I'd Love To Change The World", 'If and When We Rise Again', 'Knocking on Wood', 'Let Us Get Murdered', 'Limelight', 'Mr. Bones', 'Never Had Nothin', 'Never Let It Die', 'Rant (Odar Mix)', 'Sarajevo', 'Sarajevo', 'Song For The Dead', 'Subdivisions', 'Talking to Myself', 'Tears To Diamonds', 'The Gigolo Magician', "The Kids Aren't Alright", 'The Man With The Skeleton Arms', 'The Tell-Tale <3 (feat. Mega Ran)', 'The Three of Us', 'The Twilight Zone', 'The Vampyre of Time And Memory', 'They Provide the Paint for the Picture-Perfect Masterpiece That You Will Paint on the Insides of Your Eyelids', 'This Lullaby', 'Tiny Glowing Screens Parts 1 & 2', 'Tiny Glowing Screens, Pt. 3', 'Tribute', 'Ugly Faces', 'We Are the Few', 'We Close Our Eyes', 'We Will Fall Together', 'Weapon of God', 'Would You Be Impressed?', "You're Gonna Go Far, Kid", 'Your Day Will Come'

PREDICTED SONGS

'25 To Life', 'All Around The World (feat. Desiigner)', 'Ass Like That', 'Bastogne', 'Behind These Hazel Eyes', 'Chasing Pavements', 'City On Down - Live', 'Crazy On You', 'Crooked Smile', 'Death To Death', 'Do You...', "Don't Wanna Breathe", "Don't You Want Me - 2002 - Remaster", 'Dream Lover', 'Dying To Believe', 'El Amor Coloca', 'Eyes Be Closed', 'FACE', 'Fever Art', 'Flatliner (feat. Dierks Bentley)', 'Get Ready Boy', "Here's to Life", 'High Again', 'I Love Your Smile', "It's A Heartache", "It's On", "Keep Pushin'", 'Kissy Kissy', 'Losing My Religion', 'Must Be Love (feat. Puff Daddy)', 'Naturally', 'OMG', 'Ordinary Girl', "Please Don't Leave Me", 'Pretty Girl Rock', 'Prom Queen', 'Radio-Inactive', 'Readymade', 'Royals', 'Running Home to You', 'Ryda (feat. Dej Loaf)', 'Skeleton Boy', 'Subdivisions', 'Superstition', 'Swagger Jagger', 'Take Ya Tights Off', 'The Fall', 'The Phoenix', 'Tight Rope', 'Together', 'Wasted', 'Whitewoods'

ACTUAL FULL PLAYLIST

'A Moment of Silence', 'A.E.O.N.', 'All the Dead Kids', 'Ambition', 'Baltimore Blues No. 1', 'Bastogne', 'Cannonball', 'Cock On A Rose', 'Criminal', 'Everybody Wants to Rule the World', 'Everything Went Numb', 'Forty Days', 'Gee Willikers', 'Gonna Leave You', 'Hell', "Here's to Life", 'Hokum All Ye Faithful', 'Hurt', "I'm Dope", 'In Conclusion', 'It Takes Alliteration of Millions to Hold Us Back (feat. Brian Steveson)', 'Lightning Bolt', 'Midnight Heart', 'Misunderstanding', 'People Ii: The Reckoning', 'Power Plant', 'Roadie', 'Rock Your Socks', 'S.I.Y.R.', 'Sloppy Seconds', 'Something For Nothing', 'Stan', 'Stick to Your Guns', 'Strangers', 'Subdivisions', 'Subdivisions - Live On Clockwork Angels Tour', 'Take on Me', "That'll Be the Day", 'The Brothers Ape', 'The Call Of Ktulu - Remastered', 'The Congress Of The Obsidian Eels', 'The Littlest Things', 'The Receiving End of It All', 'The Temples Of Syrinx - Live', 'They Provide the Paint for the Picture-Perfect Masterpiece That You Will Paint on the Insides of Your Eyelids', 'Tiny Glowing Screens Part 1', 'Toe to Toe', 'Tom Sawyer', 'Vampyre Of Time And Memory (Live Acoustic)', 'Watch It Crash', 'What a Wicked Gang Are We', 'With Any Sort of Certainty'

Content Filtering: List
bottom of page