Music Recommender systems in python programming

GuniaJohn 8 views 13 slides Oct 30, 2025
Slide 1
Slide 1 of 13
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13

About This Presentation

Network Traffic Analysis for Cybersecurity


Slide Content

Cosine Similarity Based Movie Recommendation System Presented By: Gedion

Agenda Introduction Background Method Result Conclusion

Introduction A recommender system [1] is an algorithm designed to predict and suggest an item to a user , in this case music. It creates a personalized music experience by recommending music tailored to the listener's taste. It also automates the process of finding new music hence saving the listeners time of searching for music. It continuously improve based on listener’s preference hence increasing user engagement and satisfaction. What is a Recommender System Music streaming sites i.e., Spotify and YouTube [2] embed music recommendation system in their platforms to recommend songs to users. It is also used in e-commerce [3] such as book sales sites to recommend a possible book for purchase based on the user’s previous purchase or the trend by other users. Real World Application

Introduction (Cont.) Types of Recommender Systems Content-Based - Based on the similarity of song attributes. It extracts keywords from liked songs to recommend similar ones. Collaborative Filtering - Based on the similarity of user preferences. Recommends songs to users with overlapping tastes. Source: [4]

Background This research requires us to develop a movie/show recommendation system capable of predicting and suggesting shows to users based on the music attributes. A movie dataset was availed in this research as 2 csv files, one being the training set and the other the test set. The dataset is made up of 2 columns; title, displaying the title of the movie and description which describes more about the movie/show. The training set has a total sample size of 6129 whereas the test set has got 10 samples. The requirement is that an algorithm be trained on the train set and then used to predict the test set for top 3 matches in each test set record.

Method Term Frequency (TF) [5] refers to the count of a term in a dataset. Inverse Document Frequency [5](IDF) is the logarithmically scaled inverse fraction of document containing the term. TF-IDF is therefore a product of TF and IDF. Inverse Indexing is the mapping of a term to documents. Functions were created to calculate both the TF, IDF and their product as well as the inverse index. Pre-processing TF-IDF And Inverted Index Pre-processing is a method by which data is prepared to ensure it meets the bare minimum structure that the algorithm can use. It is also called data cleaning. First the data loaded using pandas an all the text converted to lowercase. Punctuations and any other special characters were also eliminated.

Method (Cont.) The term count for each term were visualized by use of bar plots. Likewise, the TF-IDF matrix was visualized using a confusion matrix Cosine Similarity Visualization Cosine similarity is theoretically used in measuring angles between 2 lines. This research follows the same logic in using cosine similarity to measure the similarity between music descriptions. It applies vectors in finding the matching movies i.e.; Cosine similarity Where: A , B ​ are TF-IDF vectors ∥A∥∥B∥ are the normal or Euclidian distance of the 2 vectors.  

Implementation

Results Splitting Up together The Trip Mestrine : Killer Instinct Oceans The Names of Love Happily Divorce Bon Cop Bad Cop 2 Harley and the Davidson The Kids Are Alright The Guest The Great Indian Kitchen Bob Biswas Breeders #BlackAF Summerland Shameless Let the Right One in The Good Place The Silence Top Priyotoma Raja Rani Hulchul Kill Bill Jawani Phir Nahi Ani Top 3 Matches

Results (Cont.) Visualizations

Results The analysis has highlighted the power of music recommendation system to deliver personalized and engaging content to listeners. It has highlighted how algorithms can be leveraged to deliver business growth and optimize system performance hence staying a head of competition. Future trajectory of such a system is to be able to utilize user contextual information such as mood and activity to deliver personal contextualized content. Moreover, integration of the system for multi-modal data to better predict user preference is another future endeavor for this work.

References Singhal, Ayush, Pradeep Sinha, and Rakesh Pant. "Use of deep learning in modern recommendation system: A summary of recent works." arXiv preprint arXiv:1712.07525 (2017). Davidson, James, Benjamin Liebald , Junning Liu, Palash Nandy, Taylor Van Vleet , Ullas Gargi, Sujoy Gupta et al. "The YouTube video recommendation system." In Proceedings of the fourth ACM conference on Recommender systems, pp. 293-296. 2010. Schafer, J. Ben, Joseph Konstan , and John Riedl . "Recommender systems in e-commerce." In Proceedings of the 1st ACM conference on Electronic commerce, pp. 158-166. 1999. Ripenko , Serhii. “Music recommendation system: all you need to know.” ELIFTECH (blog), February 26, 2024. https://www.eliftech.com/insights/all-you-need-to-know-about-a-music-recommendation-system-with-a-step-by-step-guide-to-creating-it/ . Ramos, Juan. "Using tf-idf to determine word relevance in document queries." In Proceedings of the first instructional conference on machine learning, vol. 242, no. 1, pp. 29-48. 2003.

Thank You