Building a Content-based Recommender using a Cosine-Similarity Algorithm

Movie Recommendation Algorithms

Data Collection and Cleaning

Listing 1. Importing data from Google Drive
Listing 2. Data Exploration

Content-based Filtering Recommender

Listing 3. Combining keywords and credits to the main metadata
Table-1. The Metadata Table after combining keywords and credits
Listing 4. Converting data type from strings to its original objects
Listing 4. Extracting relevant features from metadata
Table-2. The Metadata Table after extracting relevant information
Listing 5. Cleaning data for the vectorization process
Listing 6. Creating a word soup
Table 3. The Metadata Table after adding the soup column
Listing 7. Getting the user’s input functions
Listing 8. The final recommendation function with cosine similarity scores





Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store