https://github.com/zeuscoderbe/recommender-system
Content-based Filtering, Neighborhood-based Collaborative Filtering
https://github.com/zeuscoderbe/recommender-system
collaborative-filtering content-based-recommendation hybrid-recommender-system knn-regression machine-learning
Last synced: about 2 months ago
JSON representation
Content-based Filtering, Neighborhood-based Collaborative Filtering
- Host: GitHub
- URL: https://github.com/zeuscoderbe/recommender-system
- Owner: ZeusCoderBE
- Created: 2024-03-28T13:31:16.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-05T03:45:10.000Z (12 months ago)
- Last Synced: 2025-02-05T08:51:28.556Z (4 months ago)
- Topics: collaborative-filtering, content-based-recommendation, hybrid-recommender-system, knn-regression, machine-learning
- Language: Jupyter Notebook
- Homepage:
- Size: 2.83 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Recommendation System
## Introduction
### Environment Setup
1. Install Python libraries: `numpy`, `scikit-learn`,`pandas`.
2. Use data from the https://www.kaggle.com/datasets/prajitdatta/movielens-100k-dataset.### Data
The data used includes user information (age, gender, occupation),movies(Title,Genre) and their ratings for movies. This data is split into training(ua.base) and test(ua.test) sets.
### The main idea of the two algorithms Content Filtering and Collaborative Filtering
- Content Filtering :Suggest items based on the user's profile or based on the content/attributes of items similar to items the user has selected in the past.
- Collaborative Filtering: Suggest items based on similarity between users and/or items. It can be understood that this is a way to suggest a user based on users with similar behavior.

### I implemented two recommendation algorithms: Content Filtering and Collaborative Filtering.
1. Content Filtering:
- I created a vector representation for each movie using TF- IDF (item profiles).
- I trained a ridge regression model for each user to learn the weights(user profiles).
- I used item profiles and user profiles to predict and recommend movie ratings.
2. Collaborative Filtering:
- I utilized two approaches: item-item and user-user.
- I calculated cosine similarity between items or users.
- I implemented a KNN model by selecting K similar users/items to predict rating scores.
3. Hybrid between collaborative filtering and content filtering- After predicting the rating in the test set, I combined the predicted rating in the two algorithm
- I reevaluated using the RMSE measure
### Libraries and Technologies
- **Programming Language:** Python
- **Main Libraries:** NumPy, scikit-learn,pandas
- **Model:** Ridge Regression, TF-IDF Transformer,KNN User-User,KNN Item-Item### Performance Evaluation
- Utilize Root Mean Squared Error (RMSE) to assess the accuracy of the model on the test set.