We built a recommendation program for “music”. The user enters in two songs and the main class ‘Music_Recommender’ recommends a list of songs relative to the entered two songs.
Class ‘Music_Recommender’ calls other three classes that handles the following three filtering models :
- Collaborative Filtering – KNN Classifier
- Content Based Filtering – Lyric based Cosine Similarity
- Content Based Filtering – Music Features based Sigmoid calculation
' A Top-Level Class Music_Recommender is an all-in-one model music recommender Class. You can call different Models to get music suggested, used models: '
- Collaborative Filtering – KNN Classifier
- Content Based Filtering – Lyric based Cosine Similarity
- Content Based Filtering – Music Features based Sigmoid calculation
Initializing Function. Enter datasets provided for each filtering method. Preprocesses The Dataframe inside this function.
Function that calls Collaborative Filtering Model. Returns a list containing the recommended songs
Function that calls Content Based Filtering – Lyric based Cosine Similarity Returns a list containing the recommended songs
Function that calls Content Based Filtering – Content Based Filtering – Music Features based Sigmoid calculation Returns a list containing the recommended songs
Function that execute crawling on the website : “www.melon.com” Saves the dataframe to "melon_top100.csv"
Collaborate_Recommender is a class that handles KNN and Content based Filtering.
Initializing Function. Enter datasets provided for each filtering method.
Creates recommendation for two songs. Returns a list containing the recommended songs
Internal function that gets reverse mapper
Initiates Fuzzy Matching
CB_Lyric_Recommender is a class that handles Content based filtering that uses lyric data.
Initializing Function. Enter datasets provided for each filtering method.
Prints out the result of the recommendation
Function that gets recommendation from 1 song Returns a list containing the recommended songs
Function that gets recommendation from 2 song Returns a list containing the recommended songs
Reference : Dataset : https://www.kaggle.com/datasets/maharshipandya/-spotify-tracks-dataset http://millionsongdataset.com/
Data Crawling : https://dada-devdiary.tistory.com/34?category=994161
Content-based-filtering : https://towardsdatascience.com/the-abc-of-building-a-music-recommender-system-part-i-230e99da9cad
Collaborative-filtering : https://github.com/ugis22/music_recommender