This project is a Book Recommendation System that provides users with book suggestions based on two approaches: a popularity-based (content-based) system and a collaborative filtering-based system. The goal is to recommend books that are relevant and engaging to users based on ratings data.
https://book-recommendation-system-fd2b.onrender.com
The dataset used for the purpose of this project can be accessed here.
The project utilizes three CSV files:
- books.csv: Contains information about the books.
- users.csv: Contains information about the users.
- ratings.csv: Contains user ratings for books.
- Recommends the top 50 books with the highest average rating.
- Considers only books that have received at least 250 ratings to ensure reliability.
- Recommends books based on user preferences and similarities.
- Filters:
- Only considers users who have rated at least 200 books.
- Only includes books with at least 50 ratings.
- Utilizes cosine similarity for building the collaborative filtering system.
- Explored multiple algorithms for collaborative filtering:
- SVD
- KNNBasic
- KNNWithZScore
- NMF
- Finalized the use of SVD i.e Singular Value Decomposition to generate recommendations.
- Implementation Details for SVD:
- Built a full training dataset using the
scikit-surprise
library. - Trained the SVD model on user-item interactions.
- For a given book, calculated similarity scores between its latent factors and those of all other books using cosine similarity.
- Ranked the books based on their similarity scores and retrieved the top 5 recommendations.
- Each recommendation includes the book title, author, and cover image for enhanced user experience.
- Built a full training dataset using the
- Clone this repository:
git clone https://github.com/bhumikaxyz/book-recommendation-system.git
- Navigate to the project directory:
cd book-recommendation-system
- Create a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
- Install the required dependencies:
pip install -r requirements.txt
- Run the Streamlit application:
streamlit run app.py
- Open the provided local URL in your browser to use the system.
This project is licensed under the MIT License.