Skip to content

A Python-based hybrid book recommendation system that combines content-based and collaborative filtering techniques. Utilizes the Book-Crossing dataset for personalized recommendations.

Notifications You must be signed in to change notification settings

unaizaahmedk/book-recommendation-system-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Book Recommendation System

This project implements a hybrid Book Recommendation System using the Book-Crossing dataset. It suggests books to users based on their ratings and preferences by combining content-based and collaborative filtering techniques.


Features

  • Content-Based Filtering using book metadata (title, author, publisher)
  • User-Based Collaborative Filtering based on similar users' preferences
  • Item-Based Collaborative Filtering for users with only one rating
  • Global Top Picks fallback for users with no ratings

Dataset


How It Works

  1. Data Loading: Downloads and loads CSV files using kagglehub and pandas.
  2. Preprocessing:
    • Fills missing values and removes zero ratings.
    • Merges Books, Ratings, and Users data.
  3. Feature Engineering:
    • Combines Title, Author, and Publisher.
    • Applies TfidfVectorizer and normalizes vectors.
  4. Recommendation Logic (recommend_books(user_id, ...)):
    • Chooses the appropriate method based on how many books the user has rated.

Recommendation Methods

1. Content-Based Filtering

  • Creates a metadata profile using TF-IDF and computes similarity using cosine distance.
  • Recommends books similar to those rated highly by the user (≥ 8).

2. User-Based Collaborative Filtering

  • Builds a user-item matrix and finds users with similar rating behavior.
  • Suggests books liked by those similar users.

3. Item-Based Collaborative Filtering

  • Triggered when the user has rated exactly one book.
  • Finds other users who liked the same book and recommends books they also enjoyed.

4. Global Top Picks

  • Used for new users with no prior ratings.
  • Recommends the highest-rated books overall.

Contributors

About

A Python-based hybrid book recommendation system that combines content-based and collaborative filtering techniques. Utilizes the Book-Crossing dataset for personalized recommendations.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published