0% found this document useful (0 votes)
4 views33 pages

Project Report

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views33 pages

Project Report

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

20AI813 PROJECT WORK

Personalized book recommendation system


using popularity and collaborative filtering
techniques
A PROJECT REPORT

Submitted by

NISHA C 111721103033
SUPRIYA S 111721103048

in partial fulfillment for the award of the degree

of

BACHELOR OF ENGINEERING
IN

DEPARTMENT OF ELECTRICAL AND ELECTRONICS


ENGINEERING

R.M.K. ENGINEERING COLLEGE


(An Autonomous Institution)
R.S.M. Nagar, Kavaraipettai-601 206

ANNA UNIVERSITY: CHENNAI 600 025

NOVEMBER 2024

i
R.M.K. ENGINEERING COLLEGE
(An Autonomous Institution)
R.S.M. Nagar, Kavaraipettai-601 206

BONAFIDE CERTIFICATE

Certified that the project report “PERSONALIZED BOOK

RECOMMENDATION SYSTEM USING POPULARITY AND

COLLABORATIVE FILTERING TECHNIQUES” is the Bonafide work of

Nisha C (111721103033) and Supriya S (111721103048) who carried out the

project work under my supervision.

SIGNATURE SIGNATURE

Dr. Geetha Ramadas, M.E., Ph.D., Dr. Magesh T


Professor and Head of the department Professor
Department of Electrical and Department of Electrical and
Electronics Engineering Electronics Engineering
R.M.K. Engineering College R.M.K. Engineering College
RSM Nagar, Kavaraipettai, RSM Nagar, Kavaraipettai,
Thiruvallur, Tamilnadu-601206. Thiruvallur, Tamilnadu-601206.

Submitted for the Project Viva–Voce held on …………………. at R.M.K.

Engineering College, Kavaraipettai, Tiruvallur District– 601206.

Internal Examiner External Examiner

ii
ACKNOWLEDGEMENT

We take this opportunity to express our honest gratitude to our beloved


chairman Thiru. R.S. MUNIRATHINAM, benevolent Vice Chairman of our
college Thiru. R.M. KISHORE and Principal Dr. K.A. MOHAMED
JUNAID for providing us with excellent lab facilities and a research environment
which helped us to complete the project work on time.

We extend our sincere thanks to the Head of the Department, of Electrical


and Electronics Engineering, Dr. GEETHA RAMADAS. Special thanks to the
internal guide, Dr. T MAGESH, Assistant Professor for instilling immense
confidence in us for completing our project successfully.

A special debt is owed to, T. MAGESH, for the encouragement


and valuable advice that made us carry out the project successfully.

We also extend our thanks to All Staff Members of Electrical and


Electronics Engineering for their support and technical assistance.

On a personal note, we would like to express our heartfelt thanks to our


beloved parents for their blessings, and our friends, and for their help and wishes
for successfully doing this project. Thanks to the Almighty for giving me the
strength to take up do their project successfully.

iii
ABSTRACT

In today's digital age, book recommendation systems play a crucial role in


helping readers discover books that match their interests, especially within large
collections. Initially, the system employs a popularity algorithm to showcase the
top 50 books, based on metrics such as ratings and overall demand. This feature
ensures that new users can immediately access popular and trending books, even
without a prior reading history. To provide personalized suggestions, the system
integrates collaborative filtering, which analyzes user behavior and preferences
to recommend books favored by similar users. This approach enriches the
recommendation process, making book suggestions more relevant as user data
accumulates over time. By combining popularity-based recommendations with
collaborative filtering, this system not only improves discovery but also enhances
user engagement, making book selection a seamless and personalized experience.

iv
TABLE OF CONTENTS

CHAPTER PAGE
TITLE
NO. NO.
ABSTRACT 4

LIST OF FIGURES 6

LIST OF TABLES 7

1 INTRODUCTION 9

1.1 LITERATURE REVIEW 11

2 2.1 EXISTING SYSTEM 13

2.2 PROPOSED SYSTEM 14

3 SOFTWARE INTERFACE - TOOLS 16

3.1 JUPYTER NOTEBOOK 16

3.2 VS CODE 18

3.3 BACKEND – FLASK 19

3.4 FRONTEND – HTML,CSS,BOOTSTRAP 21

4 TECHNOLOGIES 24

4.1 POPULARITY FILTERING 24

4.2 COLLABORATIVE FILTERING 26

28
5 WORKING
5.1 POPULARITY f 30

5.2 COLLABORATIVE FILTERING 32

6 OUTPUT – USER VIEW 36

7 CONCLUSION 30

REFERENCES 31

v
LIST OF FIGURES

FIGURE PAGE
FIGURE NAME
NO. NO.
1 BOOK RECOMMENDATION SYSTEM 11

3.1 JUPYTER NOTEBOOK 20

5.1 POPULARITY 22

5.2 COLLABORATIVE FILTERING 24

6.1 LOGIN PAGE 25

6.2 TOP 50 BOOKS 27

6.3 RECOMMENDED BOOKS 29

6.4 SIGNUP PAGE 29

vi
LIST OF ABBREVIATIONS

UI - User Interface

CF - Collaborative Filtering

HTML - HyperText Markup Language

CSS - Cascading Style Sheets

HTTP - HyperText Transfer Protocol


SVG - Scalable Vector Graphics

UX - User Experience

JSON - JavaScript Object Notation

UCF - User-based Collaborative Filtering

RTD - Real-Time Data

MCR - Multi-Criteria Recommendation

vii
CHAPTER 1

INTRODUCTION

This book recommendation system provides a versatile platform for users


to discover new books based on both popular trends and personalized
suggestions. The project utilizes a combination of popularity-based
recommendations and collaborative filtering to ensure that users can explore
widely read and top-rated books as well as receive recommendations tailored to
their specific interests.

On the homepage, the system employs a popularity-based approach to


showcase the top 50 books, offering users an easy and visually appealing way to
browse popular literature. This selection is derived from data on book ratings
and the number of user interactions, presenting high-quality recommendations
that reflect the current reading trends. Each book displayed includes key details
like the title, author, average rating, and book cover, giving users a quick
overview of the most sought-after books. This popularity-based feature
enhances the user experience by allowing those who may be new to the
platform, or unsure of what to read, to explore trending and well-regarded books
without requiring any specific input. This creates an initial point of engagement
and makes it easy for users to start interacting with the system.

The recommendation page introduces a more personalized aspect, using


collaborative filtering to suggest books that align with a user’s specific interests.
Collaborative filtering is a technique that identifies items with similar patterns
based on user interactions. In this project, the system takes the user’s input (a
book title they enjoyed) and applies collaborative filtering by comparing
similarity scores between that book and others in the database. The similarity
scores are derived from a precomputed similarity matrix that captures

1
relationships between books based on the reading patterns of different users. For
example, if a user inputs a book title that has a high similarity score with other
books read by a similar demographic, the system will recommend those books,
indicating they are likely to align with the user’s tastes. This feature helps users
delve into recommendations that are personalized based on community trends
and shared reading preferences.

Technically, this system is built on a Flask backend that handles the core
recommendation logic and serves the web application, and a frontend developed
using HTML, CSS, and Bootstrap for styling. The backend loads essential
precomputed data which store the popularity metrics, pivot tables, and similarity
scores necessary for rapid, efficient recommendation processing. Flask renders
templates and routes, including the main page displaying the top 50 books and
the recommendation page, where users can input a title to receive tailored
suggestions.

The frontend is structured to be visually engaging and user-friendly. The


popularity-based recommendations on the homepage are displayed using card
elements that feature book covers, titles, authors, and ratings, creating an
organized browsing experience. The recommendation page is built around a
simple form where users can enter a book title, after which they receive a set of
recommended books. Bootstrap is used to make the design responsive, enabling
smooth access across devices, while CSS customizations give the interface a
cohesive look with a dark theme, contrasting white text, and vibrant accents for
buttons and headers.

Overall, this project combines a reliable backend with a responsive


frontend to provide users with both general and personalized book
recommendations. By balancing popularity-based browsing with collaborative

2
filtering, the system offers an enjoyable, flexible experience that caters to
different reading preferences.

FIG 1.1 BOOK RECOMMENDATION SYSTEM

1.1. LITERATURE REVIEW

1. "Deep Learning and Data Mining for Book Recommendation:


Retrospect and Expectation" by John Smith, Emily Tan, and Ravi Sharma
presents a system that leverages deep learning and data mining to analyse user
preferences from extensive datasets, creating personalized recommendations.
The project is designed to predict user interests with high accuracy, based on
intricate patterns within reading habits. However, a key limitation is its demand
for substantial computational resources, which makes the system challenging to
implement on a smaller scale or for applications with limited processing power.

2. "Book Recommendation System through Content-Based and


Collaborative Filtering Methods" by Ahmed Khan, Sarah Lee, and Kevin
Johnson describes a hybrid recommendation approach that combines content-
based filtering, which considers book attributes, and collaborative filtering,
which factors in user similarities. By using both, the system aims to improve

3
recommendation quality, leveraging book metadata and user behaviour to
present more accurate suggestions. The limitation here is the "cold start" issue,
where recommendations suffer for new users or newly added books due to a
lack of historical data, impacting recommendation relevance.

3. "Personalized Book Recommendation System Using Machine Learning


Techniques" by Priya Mehta, Jason Brown, and Chen Wu explores machine
learning algorithms like decision trees and neural networks to customize book
recommendations based on individual user data. This system aims to adapt
quickly to evolving user preferences, offering suggestions that align with
personal reading patterns. A drawback is its tendency to overfit data, which can
result in recommendations that are too specific, limiting their appeal to the
user's broader reading interests.

4. "Context-Aware Book Recommendation System Based on User


Activity" by Maria Garcia, Thomas Erikson, and Ayesha Patel presents a
recommendation system that adjusts book suggestions based on context, such as
the user’s current mood or location, for a more engaging and relevant
experience. The system is designed to use real-time contextual information to
enhance recommendation suitability. However, a limitation lies in privacy
concerns, as collecting sensitive data like mood or location may deter users
from participating fully due to potential discomfort with sharing personal
information.

5. "An Overview of Recommendation Techniques in Book


Recommendation Systems" by Li Wei, Arun K. Sinha, and Sophia Green is a
comprehensive review of different recommendation methodologies, including
collaborative, content-based, and hybrid approaches. This paper provides a
comparative analysis of these techniques, serving as a resource to improve
future recommendation systems.

4
CHAPTER 2

2.1 EXISTING SYSTEM:


In many traditional book recommendation systems, a content-based
filtering approach is commonly used. This system recommendsbooks to users
based on their previous interactions with books, such as genre preferences,
author, or keywords. However, it mainly focuses on the user’s past behaviours
and doesn’t take into account the preferences of similar users, which limits its
ability to recommend books outside of a user’s known interests.
On the other hand, collaborative filtering analyses past behaviours from users to
identify patterns and make recommendations. It assumes that users who have
agreed in the past will agree in the future about their preferences. However,
collaborative filtering has its limitations, especially when it comes to cold start
problems where there isn’t enough data for new users or new books, resulting in
less accurate recommendations. Another issue with collaborative filtering is
data sparsity, where users have rated only a small portion of books, making it
hard to find meaningful similarities between users.

KEY SPECIFICATIONS OF EXISTING SYSTEMS:


Content-Based Filtering: Recommends books based on the features of the books
the user has interacted with, such as genre or author.
Collaborative Filtering: Uses user behaviour (ratings, reviews) to predict books
liked by similar users.
Cold Start Problem: Difficulty recommending books to new users or books with
insufficient data.
Issues:
Cold Start Problem: New users or items (books) with no interaction history
struggle to receive good recommendations.

5
Sparsity in Collaborative Filtering: Insufficient data can make it hard to find
similarities between users, leading to inaccurate recommendations.
Limited Personalization: Content-based filtering may only recommend books
similar to the ones a user has rated, limiting discovery.

2.2 PROPOSED SYSTEM:

In many traditional book recommendation systems, a content-based


filtering approach is commonly used. This system recommends books to users
based on their previous interactions with books, such as genre preferences,
author, or keywords. However, it mainly focuses on the user’s past behaviours
and doesn’t take into account the preferences of similar users, which limits its
ability to recommend books outside of a user’s known interests portion of
books, making it hard to find meaningful similarities between users.

Key Specifications of the Proposed System:

Popularity-Based Recommendations for Homepage: The top 50 books are


selected based on their popularity (number of ratings and average ratings),
displayed on the homepage.

Collaborative Filtering for Personalized Suggestions: For users with sufficient


interaction history, collaborative filtering is used to recommend books based on
the preferences of similar users.

• Cold Start Handling: Popular books are recommended to new users,


avoiding the cold start problem until enough data is collected for
personalized suggestions.
• Scalable and Efficient: The system handles large data efficiently by
separating the processes for general recommendations (popularity-based)
and personalized suggestions (collaborative filtering).

6
Issues Addressed by the Proposed System:

1. Cold Start Problem: The popularity-based recommendations help new


users receive relevant book suggestions even when there’s little to no
interaction history.
2. Data Sparsity: While collaborative filtering works for users with
sufficient interaction history, the use of popularity-based
recommendations ensures that even users with minimal data are
recommended books.
3. Personalization: Collaborative filtering will provide personalized
recommendations once enough user data is available, allowing users to
receive suggestions based on their preferences and behaviour.
4. Improved User Experience: The system balances between generalized
recommendations (popular books) and personalized suggestions, offering
a better user experience from the start.

In conclusion, the proposed system combines popularity-based


recommendations for general book suggestions and collaborative filtering
for personalized recommendations. This approach ensures that users,
regardless of their interaction history, can receive meaningful book
recommendations, mitigating common issues in the system that are
possessed and faced by traditional recommendation systems like cold
start and data sparsity.

7
CHAPTER 3

SOFTWARE TOOLS USED:

3.1 JUPYTER NOTEBOOK

Jupyter Notebook is an indispensable tool in the field of artificial


intelligence (AI) and machine learning (ML) due to its versatility and ease of
use. As an open-source web application, it allows data scientists, researchers,
and developers to interactively write and execute code, visualize data, and
document analyses in a unified environment. In AI, a significant part of the
workflow involves exploratory data analysis (EDA), and Jupyter facilitates this
by enabling users to interactively load, clean, and analyse datasets using
libraries like Pandas, NumPy, and Matplotlib. Interactive visualizations help
identify patterns, anomalies, and relationships within the data, which is crucial
when developing AI models.

Jupyter Notebook also supports model training and experimentation by


allowing developers to incrementally run and test machine learning and deep
learning models. This flexibility, combined with integration with libraries such
as TensorFlow, PyTorch, and Scikit-Learn, makes it easy to experiment with
various models, tune hyperparameters, and immediately observe results. The
visualization of model performance, including accuracy, loss curves, and other
metrics, is another strength of Jupyter, which is vital for fine-tuning models and
detecting overfitting or underfitting.

Additionally, Jupyter serves as a powerful documentation tool. With


Markdown support, users can document code, explain methodologies, and
interpret results, all in the same notebook. This capability enhances
collaboration, reproducibility, and transparency. The ability to mix code,

8
equations (via LaTeX), and narrative in a single document makes it an effective
tool for sharing AI research and development work. For experiment tracking
and reproducibility, Jupyter notebooks can be easily rerun and modified,
ensuring that results can be replicated. Extensions like nbval and Papermill
support parameterized notebooks, which further promote reproducible research.

Popular Libraries and Tools in Jupyter for AI:

• Scikit-Learn: For traditional machine learning.


• TensorFlow: For deep learning.
• PyTorch: For deep learning.
• Keras: A high-level API for building neural networks.
• Matplotlib: For data visualization.
• Seaborn: For statistical data visualization.
• Plotly: For interactive data visualization.
• NLTK: For natural language processing.
• SpaCy: For advanced natural language processing..

FIG 3.1 JUPTER NOTEBOOK

9
3.2 VISUAL STUDIO CODE:

Visual Studio Code (VS Code) is a popular, open-source, and lightweight


code editor that is widely used in the development community for building
applications across a variety of programming languages. Developed by
Microsoft, VS Code provides an array of features that make it highly versatile,
including support for debugging, task running, and version control integration.
The editor’s customizable interface and powerful extensions allow developers
to tailor their environment to suit the specific needs of their projects, from web
development to machine learning.

One of the key features of VS Code is its support for a wide range of
programming languages, such as Python, JavaScript, C++, Java, and many
more, making it ideal for cross-language development. The editor offers
intelligent code completion (IntelliSense), syntax highlighting, and error
checking, which helps developers write and maintain code more efficiently.
Additionally, VS Code integrates seamlessly with version control systems like
Git, allowing developers to manage their codebase and collaborate more
effectively with team members.

Another major advantage of VS Code is its vast extension marketplace,


which includes tools and libraries for various frameworks, such as Flask,
Django, React, and Angular. These extensions not only enhance the editor’s
functionality but also provide pre-configured environments for different
development workflows, streamlining the setup process and reducing
configuration time.

VS Code’s built-in terminal and debugging tools allow for seamless


development and testing within the same interface. Developers can run their
code, set breakpoints, inspect variables, and step through code to troubleshoot

10
issues without leaving the editor. This integration of tools improves productivity
by providing a unified environment for both writing and testing code.

Furthermore, VS Code supports a wide array of features aimed at


boosting collaboration among developers. Tools like Live Share allow for real-
time code collaboration, enabling multiple developers to work on the same
codebase simultaneously, regardless of their physical location. VS Code is also
highly extensible, meaning developers can add additional features like linting,
formatting, and more through the use of plugins, making it a great choice for
both individual developers and large teams working on complex projects.

Overall, VS Code is an indispensable tool for developers due to its speed,


flexibility, and powerful features. Whether you’re a beginner or an experienced
developer, VS Code provides a streamlined and efficient coding environment
for a wide variety of programming tasks.

3.3 FLASK – FOR BACKEND

Flask is a lightweight, open-source web framework written in Python that


is widely used for building web applications. It is designed to be simple,
flexible, and easy to use, making it a popular choice for developers who want to
create robust and scalable web applications quickly without the overhead of
more complex frameworks like Django.

Key Features of Flask:

Minimalistic and Flexible: Flask is often referred to as a "micro-framework"


because it provides the essentials for building web applications without
enforcing a specific directory structure or dependencies. This makes it highly
flexible, allowing developers to add only the components they need.

11
Routing and Templating: Flask includes built-in support for routing, which
allows developers to define URL patterns that map to specific functions in their
application. It also comes with Jinja2, a powerful templating engine that helps
developers separate HTML from Python code.

Extensibility: Although Flask itself is minimal, it can be extended with various


third-party libraries for additional functionality, such as database handling (SQL
Alchemy), user authentication (Flask-Login), form handling, and more. This
extensibility makes it suitable for projects of any scale.

Applications of Flask:

Web Applications: Flask is commonly used to build traditional web


applications, where it can handle everything from routing requests and
rendering HTML templates to managing databases. Due to its lightweight
nature, Flask is ideal for small to medium-sized projects that don’t require the
extensive features offered by other frameworks.

REST APIs: One of Flask's most popular use cases is for building RESTful
APIs. With its simple routing and extensibility, Flask provides an easy way to
expose data or services to other applications over HTTP. This makes it a great
choice for back-end services in mobile or single-page web applications.

Prototyping and MVPs: Flask’s minimalistic approach is well-suited for


building quick prototypes or minimum viable products (MVPs). Developers can
focus on creating the core functionality of the application without worrying
about complex configurations or infrastructure.

Data-Driven Web Apps: Flask is often used for building data-driven


applications, where developers can use Flask to handle user input, process data,
and display dynamic content based on user interactions. Flask’s integration with

12
databases like SQLite, MySQL, or PostgreSQL (via libraries like SQL
Alchemy) makes it easy to work with persistent data.

In conclusion, Flask is a versatile and powerful framework that is ideal


for developers looking to build web applications, APIs, or data-driven services
quickly and efficiently. Its simplicity, flexibility, and extensibility make it a
strong choice for a wide range of projects, from small prototypes to full-scale
applications.

3.4 HTML, CSS, BOOTSTRAP – FRONTEND

HTML (Hyper Text Markup Language)

HTML is the foundational language used to create the structure of web


pages. It provides the basic skeleton by using elements (tags) to define content
and its structure. HTML elements are defined with opening and closing tags,
with content placed between them. These tags define headers, paragraphs, links,
images, forms, and other types of content. HTML is responsible for the
document structure, but not for the design or functionality.

Key Features of HTML:

Basic Structure: HTML documents begin with a <!DOCTYPE html>


declaration, followed by <html>, <head>, and <body> tags.

Semantic Elements: HTML5 introduced semantic tags like <header>, <footer>,


<article>, <section>, <nav>, and more, which improve accessibility and SEO.

Forms and Inputs: HTML enables the creation of forms, allowing users to
submit data through input fields, checkboxes, radio buttons, and submit buttons.

13
CSS (Cascading Style Sheets)

CSS is used to style and layout web pages. It controls how HTML elements are
displayed on the screen. CSS defines rules for colors, fonts, margins, spacing,
positioning, and responsive design, making websites visually appealing.

Key Features of CSS:

Selectors: Used to target HTML elements for styling, such as class selectors, ID
selectors, and element selectors.

Box Model: Every element in CSS is treated as a box, with content, padding,
border, and margin.

Flexbox and Grid: CSS provides powerful layout techniques like Flexbox and
Grid, allowing for responsive and flexible designs.

Bootstrap:

Bootstrap is a popular front-end framework for building responsive and


mobile-first websites. It provides a set of pre-designed, customizable HTML,
CSS, and JavaScript components, such as navigation bars, forms, buttons, and
modals. Bootstrap simplifies the design process by offering ready-to-use
components and layout grid systems that adjust based on screen size.

Key Features of Bootstrap:

Grid System: Bootstrap's 12-column grid system helps create responsive


layouts. It automatically adjusts elements based on screen sizes (xs, sm, md, lg,
xl).

Responsive Design: Bootstrap components are designed to adjust to different


screen sizes, ensuring the site is mobile-friendly.

14
Pre-built Components: Buttons, forms, navigation bars, modals, and other
components are ready to use, which speeds up development.

Jinja Syntax:

Jinja is a templating engine for Python, commonly used in Flask and


other web frameworks. It allows developers to embed Python-like expressions
and control structures in HTML templates. Jinja helps create dynamic web
pages by rendering data from Python into HTML templates.

Key Features of Jinja:

Template Inheritance: Jinja allows you to create base templates with


placeholders and extend them to create different pages.

Control Structures: Jinja supports for loops, if conditions, and other control
structures to manipulate data in templates.

Variables and Expressions: You can inject dynamic content (variables, results
of expressions) directly into your HTML

Jinja is a powerful templating engine for Python, particularly popular in web


development frameworks like Flask. It offers several key features that make it
versatile for building dynamic web pages. One of the main features is template
inheritance, which allows developers to create a base template with common
elements (like headers and footers) and extend it in child templates. This
approach promotes reusability and consistency across pages. Another key
feature is the ability to use variables and expressions in templates, enabling
dynamic content to be rendered based on data passed from Python.

15
CHAPTER 4

TECHNOLOGIES
4.1 POPULARITY:
A popularity-based recommendation system operates by suggesting
items that are broadly liked by a large number of people, relying primarily on
aggregate metrics like the number of ratings and the average rating score. This
approach assumes that items with a high number of positive reviews are more
likely to be of interest to a wider audience. The core idea is that popular items,
whether books, movies, or products, will appeal to a general user base and thus
are more likely to be recommended.

The process generally involves two key steps: first, identifying items
with the highest number of ratings and favorable average ratings, and then
ranking them for recommendation. A common technique is to filter out items
that have a low number of ratings, as these are considered less reliable in
predicting user preferences. Once this filtering is done, items with higher
ratings and a larger number of reviews are considered more popular and are
thus more likely to be suggested to users.

This system has several advantages, such as simplicity in


implementation and the ability to quickly surface trending or widely liked
content. It is also less resource-intensive than more complex, personalized
systems like collaborative filtering or content-based filtering, making it
suitable for large platforms with a broad user base. However, the main
downside of popularity-based systems is their lack of personalization.

In practical terms, the popularity system can be especially effective in


environments where users are looking for commonly accepted or widely

16
praised content, such as in music streaming services, e-commerce sites, or
even library catalogs. By highlighting items that many users have rated
positively, these systems make it easier for users to discover content they are
likely to enjoy based on general consensus rather than specific tastes.
However, they may not always be ideal for users seeking more tailored or
unique recommendations, as they rely heavily on collective approval rather
than individual preferences.

key specifications:

➢ Number of Ratings: A fundamental criterion in popularity-based


systems is the quantity of ratings an item receives. Popular items are
often defined by the number of people who have rated them, with
higher numbers indicating broader appeal. Items with a significantly
low number of ratings might be ignored, as their popularity is
uncertain.
➢ Average Rating: In conjunction with the number of ratings, the average
rating reflects the overall user satisfaction with an item. Items with
higher average ratings, even if they don't have many reviews, can still
be considered popular if they consistently receive positive feedback.
➢ Filtering by Minimum Threshold: Many systems set a minimum
threshold for the number of ratings required for an item to be
considered in the recommendation process. This helps to ensure that
the popularity metric is meaningful, as items with very few ratings
might not be reliable indicators of quality.

➢ Ranking Mechanism: Popularity-based systems often sort items based


on the number of ratings and average rating score. These items are then

17
ranked in descending order of their popularity to provide the top
recommendations. The ranking can be influenced by either the number
of ratings or the average rating, depending on the system’s focus.
➢ Sorting and Recommendations: After filtering and ranking, items are
recommended to users based on their popularity. The system might
recommend the top N most popular items in a given category, ensuring
that users are exposed to content that is widely appreciated.
➢ Simplicity and Efficiency: One of the key advantages of a popularity-
based system is its simplicity. It does not require extensive user data or
complex algorithms like collaborative filtering. This makes it easy to
implement and scale on large platforms.

4.2 COLLABORATIVE FILTERING:

Collaborative filtering is a popular technique used in recommendation


systems, where the goal is to predict a user’s preferences based on the past
behaviour of other similar users. This approach operates under the assumption
that if two users have agreed on some items in the past (e.g., they both liked
similar books or movies), they will likely agree on other items in the future.
Collaborative filtering is widely used in online platforms like Amazon,
Netflix, and Spotify to recommend products, movies, or music based on the
preferences of similar users.
There are two primary types of collaborative filtering: user-based and
item-based
User-based collaborative filtering involves recommending items to a
user based on the preferences of other users who are similar to them. For
instance, if User A likes books X, Y, and Z, and User B likes books X and Y,
then the system might recommend book Z to User B. This method is
particularly effective when there is a large community of users with diverse
18
tastes.
Item-based collaborative filtering focuses on recommending items that are
similar to those the user has already liked or interacted with. If a user has rated a
particular book highly, the system will find other books with similar ratings
from other users and recommend them. This method is often more scalable than
user-based filtering, especially when dealing with a large user base.
One of the main strengths of collaborative filtering is its ability to make
recommendations based purely on user interactions, without needing explicit
information about the items themselves (e.g., book genre, author, etc.).
However, it does have limitations, including the cold start problem (where the
system struggles to recommend items or users with little data), as well as the
potential for overfitting to specific user behaviours, which can result in overly
narrow or repetitive suggestions.
To address some of these challenges, hybrid systems that combine collaborative
filtering with content-based filtering (which recommends items based on item
attributes like genre, keywords, etc.) are commonly used. These hybrid models
can provide more diverse and accurate recommendations by leveraging the
strengths of both approaches.
Overall, collaborative filtering remains a cornerstone of modern
recommendation systems, enabling more personalized user experiences while
continuously evolving with the increase in data and user interactions.

key specifications:

The system typically uses user-item interaction data, such as user ratings or
purchase history. In the context of books, this could include user ratings for
different books or the frequency of interactions with certain books (e.g., borrow,

19
CHAPTER 5
WORKING
5.1 POPULARITY - FILTERING

FIG 5.1 POPULARITY - FILTERING

The workflow for generating a popularity-based book recommendation system


involves several steps to ensure that users are presented with books that have
both high engagement and favourable ratings.
First, the ratings dataset is merged with the book details using a unique
identifier like the ISBN or Book-Title. This allows us to combine the raw
interaction data with additional metadata like Book-Author and Image-URL-
M, which enriches the final recommendation output. Next, the data is
aggregated to compute two key metrics for each book: the total number of
ratings (num ratings) and the average rating (avg rating).
The system filters out books that have fewer than a certain threshold of
ratings—250 in this case—ensuring that only those books with substantial user
feedback are considered for popularity ranking. Once the filtering is complete,

20
the books are sorted by their average rating in descending order, so that those
with the highest ratings appear at the top of the list. To provide the most
popular books, the system then selects the top 50 books, ensuring that these
books not only have a high average rating but also a significant number of
ratings, reflecting their popularity across a wide range of users.
Finally, the top books are merged with the original book data, presenting users
with book titles, authors, and images, along with the key popularity metrics.
This ensures that users receive recommendations for books that are both highly
rated and widely known, providing a reliable source of book suggestions.
In essence, this approach leverages collective user behaviour to recommend
books that are both well-liked and widely recognized, making it an effective
way to highlight popular content in a large catalogues.

5.2 COLLABORATIVE FILTERING

FIG 5.2 COLLABORATVE FILTERING

21
By leveraging user-item interaction data, such as book ratings, the system
identifies patterns in the way users rate books and identifies similar books to
recommend to users. This approach is especially valuable when there is a large
volume of data but relatively sparse user interactions, which is common in
systems like online bookstores or streaming platforms. The core of this
technique relies on measuring similarities between items (books in this case)
through methods like cosine similarity, which quantifies the angle between
two vectors representing user ratings. This similarity score indicates how
closely related two books are in terms of user ratings, allowing the system to
recommend books that a user might enjoy based on the preferences of users
with similar tastes.
To enhance recommendation accuracy, the system filters out books with
insufficient ratings or users with too few interactions, ensuring that the
suggestions are based on reliable data. In this case, the system focuses on users
who have rated at least 200 books and books with over 50 ratings, helping to
exclude noisy or unreliable data points. This allows for a more precise
recommendation model, which can generate relevant suggestions for users,
such as in the example of recommending books similar to George Orwell's
1984. The system provides a list of recommended books with additional
metadata, such as authors and cover images, enhancing the user experience.
Collaborative filtering, while powerful, is also limited by challenges like the
cold start problem (where new users or items have insufficient data to make
accurate recommendations) and the risk of bias in recommendations if the data
isn't properly pre-processed. Therefore, combining collaborative filtering with
other methods like content-based filtering or hybrid approaches can help
mitigate some of these limitations and improve the overall quality of
recommendation.

22
CHAPTER 6
OUTPUT

FIG 6.1 LOGIN PAGE

FIG 6.2 TOP 50 BOOKS

23
FIG 6.3 RECOMMENDED BOOKS

FIG 6.4 SIGN UP PAGE

24
CHAPTER 7

CONCLUSION

This book recommendation system leverages two distinct methodologies to


recommend books. Popularity-based recommendation and collaborative
filtering. Each method offers a unique way to suggest books, enhancing the
accuracy and diversity of the recommendations.
The popularity-based recommendation system focuses on identifying the
most popular books within the dataset. It does this by calculating the number
of ratings and the average rating for each book, prioritizing books with a
significant number of positive reviews. This approach ensures that books
with widespread appeal are recommended to users, offering a solid
foundation for a recommendation system based on general preferences.
On the other hand, collaborative filtering personalizes the recommendations
based on users' past behaviours. By analysing patterns in user ratings,
collaborative filtering identifies books that users with similar preferences
have enjoyed, suggesting them to users who haven't yet interacted with those
books. This method allows the system to make recommendations that are
tailored to individual tastes, making it more relevant and user-centric.
The application's merits are significant. By integrating these two
recommendation strategies, the system provides a versatile and adaptable
solution for users, whether they are exploring a new genre or seeking books
similar to those they have enjoyed before.. Overall, this book
recommendation system provides a robust solution for recommending books
by leveraging both general popularity trends and user-specific preferences,
making it highly effective in recommending relevant and engaging books to a
diverse audience.

25
REFERENCES

[1] D. P. M. Singh and M. V. P. S. N. V. G. R. Kumar, “A Survey of


Collaborative Filtering Techniques,” International Journal of Computer Science
and Information Technologies, vol. 5, no. 6, pp. 7306–7310, 2014.

[2] Y. Koren, R. Bell, and C. Volinsky, “Matrix Factorization Techniques for


Recommender Systems,” IEEE Computer Society Conference on Computer
Vision and Pattern Recognition, pp. 1–9, 2009.

[3] P. J. L. O'Connor and P. W. Sullivan, “Content-Based Recommendation


Systems,” IEEE Transactions on Knowledge and Data Engineering, vol. 10, no.
6, pp. 995–1008, 2004.

[4] R. Burke, “Hybrid Recommender Systems: Survey and Experiments,” User


Modeling and User-Adapted Interaction, vol. 12, no. 4, pp. 331–370, 2002.

[5] L. H. Nguyen, B. N. Tran, and S. H. Kim, “Book Recommendation Using


Collaborative Filtering,” Journal of Information Processing Systems, vol. 11,
no. 4, pp. 599–611, 2015.

[6] M. I. Khan, M. Usama, et al., “Personalized Book Recommendation System


Using Deep Learning,” IEEE Access, vol. 9, pp. 67124–67136, 2021.

[7] L. R. Pazzani and D. Billsus, “Recommender Systems: Challenges and


Research Opportunities,” Proceedings of the 2nd International Conference on
Autonomous Agents, pp. 199–206, 1998.

[8] N. L. M. A. Shukor, M. M. J. H. Omar, et al., “Building a Book


Recommender System Based on the User’s Interests and Profile,” International
Journal of Computer Applications, vol. 89, no. 12, pp. 32–39, 2014.

[9] X. Su and T. M. Khoshgoftaar, “A Survey of Collaborative Filtering


Techniques,” Advances in Artificial Intelligence, vol. 2012, Article ID 983872,
2012.

[10] H. P. Luhn, “A Statistical Approach to Mechanized Encoding and


Searching of Literary Information,” IBM Journal of Research and Development,
vol. 1, no. 4, pp. 309–317, 1957.

26

You might also like