{"id":26317169,"url":"https://github.com/aaryan-agr/book-recommendation-system","last_synced_at":"2026-05-09T16:47:37.110Z","repository":{"id":280675827,"uuid":"942797349","full_name":"Aaryan-Agr/Book-Recommendation-System","owner":"Aaryan-Agr","description":"A Book Recommendation System that explores Content, Collaborative and Hybrid Filtering to recommend an ideal book for an user","archived":false,"fork":false,"pushed_at":"2025-03-04T22:01:02.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-07T10:05:33.820Z","etag":null,"topics":["data-science","deep-learning","feature-engineering","machine-learning","predictive-analytics","python","recommendation-system"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Aaryan-Agr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-04T17:32:35.000Z","updated_at":"2025-03-04T22:17:33.000Z","dependencies_parsed_at":"2025-06-07T10:15:38.260Z","dependency_job_id":null,"html_url":"https://github.com/Aaryan-Agr/Book-Recommendation-System","commit_stats":null,"previous_names":["aaryan-agr/melanoma-cancer-detection-system"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Aaryan-Agr/Book-Recommendation-System","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aaryan-Agr%2FBook-Recommendation-System","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aaryan-Agr%2FBook-Recommendation-System/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aaryan-Agr%2FBook-Recommendation-System/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aaryan-Agr%2FBook-Recommendation-System/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aaryan-Agr","download_url":"https://codeload.github.com/Aaryan-Agr/Book-Recommendation-System/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aaryan-Agr%2FBook-Recommendation-System/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278694122,"owners_count":26029662,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-science","deep-learning","feature-engineering","machine-learning","predictive-analytics","python","recommendation-system"],"created_at":"2025-03-15T13:18:19.170Z","updated_at":"2025-10-06T23:23:48.207Z","avatar_url":"https://github.com/Aaryan-Agr.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📚 Book Recommendation System  \n\n## 📝 Overview  \nThis project implements a **hybrid book recommendation system** that combines **content-based filtering** and **collaborative filtering** techniques. It processes book ratings and metadata to suggest books that a user might enjoy, leveraging both **machine learning models** and **data-driven insights**.  \n\n### 🔍 Problem Statement  \nWith the vast number of books available today, users often struggle to find relevant books based on their preferences. A **recommendation system** helps by analyzing book features and user interactions to generate personalized suggestions.  \n\n## 📂 Dataset  \nThe project utilizes the **Book Recommendation Dataset** from Kaggle, which consists of: **Books.csv** (metadata such as title, author, publication year, and publisher), **Ratings.csv** (user ratings for books on a scale of 1 to 10), and **Users.csv** (demographic information about users).  \n\n## 🔧 Features and Methodology  \n\n### 🧹 1. Data Cleaning \u0026 Preprocessing  \n**Handling Missing Values** by removing null values from metadata, **Feature Selection** by keeping only relevant columns such as title, author, and publication year, **Data Normalization** by converting book titles and authors to lowercase and removing spaces, **Filtering Active Users** who have rated at least **100 books**, and **Filtering Popular Books** with at least **25 ratings**.  \n\n### 📖 2. Content-Based Filtering  \n**Text Preprocessing** involves tokenization using **NLTK**, stemming, and lemmatization. **Feature Engineering** combines book title, author, and publication year into a single **metadata vector** and applies **TF-IDF Vectorization** to convert text into numerical data. **Similarity Calculation** uses **cosine similarity** to compute distances between books and identify **top N similar books** to the input book.  \n\n### 🤝 3. Collaborative Filtering  \n**User-Item Interaction Matrix** creates a pivot table where rows represent books, columns represent users, and values are ratings. **User-Based Recommendations** identify users with similar reading patterns. The **K-Nearest Neighbors (KNN) Algorithm** finds books rated similarly by other users and returns books with the highest **similarity scores**.  \n\n### 🔗 4. Hybrid Recommendation System  \n**Combines Content-Based and Collaborative Filtering** by assigning adjustable weights (`content_weight` and `collaborative_weight`), normalizing similarity scores, and generating **personalized hybrid recommendations**.  \n\n### 📊 5. Evaluation \u0026 Performance Metrics  \n**Baseline Models** compare the hybrid method against **Global Mean Predictor** (predicts average rating for all books), **User Mean Predictor** (predicts using the average rating per user), and **Item Mean Predictor** (predicts using the average rating per book). **Root Mean Squared Error (RMSE)** is used to measure accuracy across different approaches.  \n\n## 🚀 Installation \u0026 Setup  \n\n### Prerequisites  \nEnsure you have **Python 3.x** installed along with the required dependencies.  \n\n### 🔹 Step 1: Install Dependencies  \nRun the following command:  \n```bash\npip install numpy pandas nltk scikit-learn kagglehub matplotlib\n```\n## 🔹 Step 2: Download Dataset\nThe dataset is automatically fetched using `kagglehub`.\n\n## 🔹 Step 3: Run the Code\nExecute the Jupyter Notebook or Python script to generate recommendations.\n\n## 🔨 Usage\n\n### 🟢 Content-Based Filtering\nTo get top 5 similar books based on metadata, use:\n\n```python\ncontentFiltering(books, \"1984\",top_n=5)\n```\n### 🟠 Hybrid Recommendations\nTo combine both approaches for a more accurate recommendation, use:\n```python\nhybrid_recommendations(\n    user_id=277427, \n    book_title=\"1984\", \n    content_weight=0.5, \n    collaborative_weight=0.5, \n    num_recommendations=10\n)\n```\n\n## 🧪 Evaluation\nTo compute RMSE scores for different recommendation models, use:\n\n```python\ncompare_baseline(userItem, test_indices)\n```\n## 📈 Results  \n**The hybrid model improves recommendation accuracy** by leveraging both content similarity and user behavior.  \n**RMSE evaluation confirms** that the hybrid method outperforms individual approaches.  \n**User engagement is higher** due to personalized recommendations.  \n\n## 🛠️ Future Improvements  \n- **Implement deep learning models** for better predictions.  \n- **Integrate real-time user feedback** for dynamic recommendations.  \n- **Expand the dataset** with new book releases and user preferences. \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaryan-agr%2Fbook-recommendation-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faaryan-agr%2Fbook-recommendation-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaryan-agr%2Fbook-recommendation-system/lists"}