building a movie recommendation system using collaborative filtering techniques.
APACHE-2.0 License
This repository contains Python code for building a movie recommendation system using collaborative filtering techniques. Below is a breakdown of the files and functionalities included:
Clone this repository:
git clone https://github.com/sadegh15khedry/MovieRecommendationSystem.git
cd Movie-Recommendation-System-Using-Collaborative-Filtering
Install the required libraries using the environment.yml file using conda:
conda env create -f environment.yml
Download the movieLens datasets (movies.csv
, tags.csv
, ratings.csv
) and update the path to them in the code.
Run the recommendation_system.ipynb
notebook to generate movie recommendations.
movies.csv
, tags.csv
, ratings.csv
) using pandas.tag_df
, rating_df
, movie_df
) for further analysis.rating_df
and movie_df
on movieId
to create a combined DataFrame (df
).agg_df
).df
with agg_df
to filter out less popular movies (df_gt100
).user_movie_matrix
) using pivot_table
, where rows represent users, columns represent movies, and values represent ratings.user_movie_matrix
(matrix_norm
) by subtracting the mean rating of each user.user_similarity
and movie_similarity
) based on matrix_norm
to find similar users and movies.picked_userId
) and set up variables (number_of_simlar_users
, user_similarity_threshold
).similar_users
) based on a similarity threshold.picked_user_watched
) and similar users (similar_users_movies
).item_score
) based on weighted sums of ratings from similar users.ranked_item_score
) based on their scores.picked_userId
) based on collaborative filtering.This project is licensed under the Apache-2.0 License - see the LICENSE.md file for details.