Professional Documents
Culture Documents
Crtreport - Contents 2
Crtreport - Contents 2
This project aims to predict online fake reviews using the Yelp dataset and the
Gaussian Naive Bayes algorithm. Online reviews are increasingly important for
businesses, but fake reviews can negatively impact their reputation. This project
will provide a solution to this problem by accurately detecting fake reviews. The
Yelp dataset contains user reviews, ratings, and metadata for businesses in various
cities. The dataset will be preprocessed by removing stop words, stemming the
words, and converting them to lowercase. Features will be extracted from the
reviews, such as the frequency of each word or the presence of specific phrases.
The dataset will be split into training and testing sets, and the Gaussian Naive
Bayes algorithm will be used to fit the model on the training set. The performance
of the model will be evaluated on the testing set using metrics such as accuracy,
precision, recall, and F1-score. The results of this project will help businesses
identify fake reviews and take appropriate actions to prevent them from negatively
impacting their reputation. The project can be extended by using other algorithms
or datasets to improve the accuracy of fake review detection.
1
CHAPTER 1
INTRODUCTION
1.1 General
This project aims to predict online fake reviews using the Yelp dataset and the
Gaussian Naive Bayes algorithm. Online reviews are increasingly important for
businesses, but fake reviews can negatively impact their reputation. This project
will provide a solution to this problem by accurately detecting fake reviews. The
Yelp dataset contains user reviews, ratings, and metadata for businesses in various
cities. The dataset will be preprocessed by removing stop words, stemming the
words, and converting them to lowercase. Features will be extracted from the
reviews, such as the frequency of each word or the presence of specific phrases.
The dataset will be split into training and testing sets, and the Gaussian Naive
Bayes algorithm will be used to fit the model on the training set. The performance
of the model will be evaluated on the testing set using metrics such as accuracy,
precision, recall, and F1-score. The results of this project will help businesses
identify fake reviews and take appropriate actions to prevent them from negatively
impacting their reputation. The project can be extended by using other algorithms
or datasets to improve the accuracy of fake review detection.
Everyone can freely express his/her views and opinions anonymously and without
the fear of consequences. Social media and online posting have made it even easier
to post confidently and openly. These opinions have both pros and cons while
providing the right feedback to reach the right person which can help fix the issue
and sometimes a con when these get manipulated These opinions are regarded as
valuable. This allows people with malicious intentions to easily make the system to
1
give people the impression of genuineness and post opinions to promote their own
product or to discredit the competitor products and services, without revealing
identity of themselves or the organization they work for. Such people are called
opinion spammers and these activities can be termed as opinion spamming
One of the biggest applications of opinion mining is in the online and e-commerce
reviews of consumer products, feedback and services. As these opinions are so
helpful for both the user as well as the seller the e-commerce web sites suggest
their customers to leave a feedback and review about their product or service they
purchased. These reviews provide valuable information that is used by potential
customers to know the opinions of previous or current users before they decide to
purchase that product from that seller. Similarly, the seller or service providers use
this information to identify any defects or problems users face with their products
and to understand the competitive information to know the difference about their
similar competitors’ products.
The problem this project aims to solve is the detection of fake online reviews.
Online reviews are an essential source of information for businesses and customers.
However, the increasing number of fake reviews posted online poses a significant
challenge for businesses to maintain their reputation and for customers to make
informed decisions. Fake reviews are often misleading and can manipulate
customers' perceptions of businesses. This project seeks to develop a solution to
this problem by accurately detecting fake reviews using the Yelp dataset and the
Gaussian Naive Bayes algorithm.
1
1.3 Objective:
The objective of this project is to develop a solution for the detection of fake online
reviews using the Yelp dataset and the Gaussian Naive Bayes algorithm. The
specific objectives include:
1.3.1 Preprocessing the Yelp dataset by removing stop words, stemming the
words, and converting them to lowercase.
1.3.2 Extracting features from the reviews, such as the frequency of each word or
the presence of specific phrases.
1.3.4 Fitting the Gaussian Naive Bayes algorithm on the training set.
1.3.5 Evaluating the performance of the model on the testing set using metrics
such as accuracy, precision, recall, and F1-score.
1.3.6 Developing a reliable and accurate fake review detection model to assist
businesses in maintaining their reputation and enabling customers to make better-
informed decisions.
1.3.8 Extending the project by using other algorithms or datasets to improve the
accuracy of fake review detection.
1.4 Motivation
1
The motivation behind this project is to address the increasing problem of fake
reviews posted online, which can deceive customers and damage a business's
reputation. With the proliferation of e-commerce and online platforms, online
reviews have become an essential source of information for customers, influencing
their purchase decisions. However, fake reviews posted by businesses or
individuals can mislead customers and manipulate their perceptions of a business's
products or services. Detecting fake reviews is challenging as they are often
written to mimic genuine reviews and can be difficult to differentiate from
authentic reviews. Therefore, developing a reliable and accurate solution for fake
review detection is crucial for maintaining the integrity of online reviews.
The Yelp dataset provides a rich source of information for this project, containing
user reviews, ratings, and metadata for businesses in various cities. The Gaussian
Naive Bayes algorithm is an effective algorithm for text classification tasks,
making it an ideal choice for detecting fake reviews. The results of this project will
benefit both businesses and customers. Businesses can identify fake reviews and
take appropriate actions to prevent them from negatively impacting their reputation.
Customers can have more trustworthy and reliable reviews, enabling them to make
better informed decisions. Overall, the motivation for this project is to provide a
solution to the problem of fake online reviews and maintain the integrity of online
reviews for the benefit of businesses and customers alike.
1.5 Scope
The scope of this project is to develop a fake review detection model using the
Yelp dataset and the Gaussian Naive Bayes algorithm. The scope includes:
1.5.1 Preprocessing the Yelp dataset by removing stop words, stemming the words,
and converting them to lowercase.
1
1.5.2 Extracting features from the reviews, such as the frequency of each word or
the presence of specific phrases.
1.5.4 Fitting the Gaussian Naive Bayes algorithm on the training set.
1.5.5 Evaluating the performance of the model on the testing set using metrics such
as accuracy, precision, recall, and F1-score.
1.5.7 Extending the project by using other algorithms or datasets to improve the
accuracy of fake review detection.
The project will focus on developing a fake review detection model using the Yelp
dataset and the Gaussian Naive Bayes algorithm. The project will not address other
types of online fraud, such as identity theft or phishing. Additionally, the project
will not investigate the legal implications of posting fake reviews or provide legal
advice to businesses or individuals. The project aims to provide a general solution
for fake review detection, and the performance of the model may vary depending
on the dataset and the algorithm used. Therefore, the project's scope includes
exploring the possibility of extending the project by using other algorithms or
datasets to improve the accuracy of fake review detection. Overall, the scope of
this project is to develop a reliable and accurate fake review detection model and
provide insights and recommendations for businesses to prevent fake reviews from
negatively impacting their reputation.
1
CHAPTER -2
LITERATURE REVIEW
Year:2022
Abstract:In the recent year we have been experiencing a huge surge on internet,
due to many people have started using internet. Nowadays there are many paid and
fake reviews flooding the e-commerce websites like Amazon, Flipkart and many
other e-commerce websites. In which many customers make decisions based on
these fake reviews or comments provided by others who had similar experiences.
In today's competitive environment, anyone may write anything, which has
resulted in an increase in the number of bogus reviews. So, to overcome this
problem of fake reviews we will propose a machine learning model. The model
will be trained with 40000 datasets to predict the fake reviews. Machine learning is
the one of the trending techniques to predicts the output based on the experience.
Furthermore, we can test the model using testing data which is also a part of the
data set. We are using Passive Aggressive Classifier and we have achieved an
accuracy of 83.53%.
1
2.2 Fake Review Detection Of E-Commerce Electronic
Products Using Machine Learning Techniques
Year:2021
Abstract:The rapid growth of internet access has given rise to a digital era. The
availability of internet access has pushed almost 70% of the population to switch to
internet for their daily needs and accessories. Mainly, E-commerce platforms are
being used at a much higher rate than ever before. People who buy from these e-
commerce platforms make decisions on whether to buy a product or not solely
based on the ratings and reviews of a product that are provided by these platforms.
Due to the simple nature of this review system, sellers and even individuals tend to
exploit it by writing dishonest reviews with an intention of either boosting its
ratings or simply to sabotage it. These fake reviews are aimed at deceiving
customers and convince them to buy/deter a certain product. Due to the lack of a
robust system to identify real and fake reviews, these spams manage to show up on
top. To avoid this problem and provide a more efficient way to filter and provide a
more efficient way to reviews. This work focus on designing machine learning
model for fake review detection and compare the performance of three different
algorithms. As a result of this research work random forest algorithm outperform
1
than other two algorithms. Web based User Interface(UI) designed to remove fake
review and display trusted review based on the ranking.
Year:2022
Abstract:In recent times prior to making a purchase, the vast majority read reviews
about that product, and their decision is largely driven by the reviews. Deceitful
online sellers often gather fake or spam reviews for their products or services,
thereby reducing the effectiveness of online reviews. The review data is often
imbalanced such that the fake reviews greatly outnumber the genuine reviews. An
imbalance leads to a bias, as the model tends to mostly predict the majority class.
To attain a high-quality classification outcome, the issue of imbalanced data should
be resolved before applying the classification algorithms. This paper studies the
performance of supervised machine learning classifiers pertaining to fake review
detection. The approach put forward in this paper aims to improve the prediction
accuracy of popular supervised learning classifiers Random - Forest, LightGBM,
XGBoost, Naive Bayes, and Decision Tree on an imbalanced review dataset For
boosting the accuracy of these classifiers, the Synthetic Minority Oversampling
1
Technique is used for addressing the class imbalance problem. The performance of
the classifiers has been studied by changing the oversampling parameters. The
application of SMOTE showed a significant improvement in the classifier’s
prediction accuracy.
Year:2022
1
the semi-supervised algorithm are superior to those produced by the K-neighbors
approach.
Year:2019
1
Year:2022
Year:2021
Abstract:Online reviews are one of the most important aspects in a buyer's choice
to buy a new product or use a service. As a result, it serves as a helpful source of
data for determining public opinion regarding these products and services. It also
provides companies with an indication of what kind of changes they need to make
in their products to improve further. Thus, reviews also give competitors and
product-based organizations a possible option to create fake reviews in order to
advertise or degrade a product based on their interest. Hence, it is vital that the
correct reviews are reached to the customers, and for this, the detection of fake
ones is to be done effectively. In order to reduce the time for fake review detection,
automated techniques are being used in the current scenario. Another concern is
how to differentiate between the original and fake reviews. This paper discusses
the various factors that can help in the identification of the same. They are broadly
classified into two types: behavioral and feature-based. Also, the challenges that
are still there in fake the review identification methods are depicted, and the open
research areas where further work can be carried out are also being highlighted.
The factors mentioned in the paper can prove useful for improvising the
performance of any fake review detection system once applied to any real data set.
Year:2022
1
Authors:Andre Sihombing; A.C.M. Fong
Year:2019
Year:2019
1
spam from the prediction of the labeled training data. The best results were
obtained with a scenario without stemming, merging of review centric features and
bigram, SMOTE borderline1 oversampling and Polynomial SVM kernel that has
accuracy 86.33%.
CHAPTER 3
SYSTEM ARCHITECTURE
Currently, there are several existing systems for detecting fake reviews online.
These systems use various methods and algorithms to analyze the reviews and
identify potential fake reviews. Some of the existing systems are:
1
2. Fakespot: Fakespot is a web tool that uses a machine learning algorithm to
analyze reviews on Amazon, Yelp, and other platforms. The tool analyzes the
language, sentiment, and reviewer history to identify potential fake reviews.
While these existing systems provide valuable solutions for detecting fake reviews,
they have limitations. Some of the limitations include:
1. The systems may not be effective in detecting all types of fake reviews.
3. The systems may not be able to keep up with the evolving tactics of fake
reviewers.
1
4. The systems may require a significant amount of data and resources to be
effective.
Therefore, there is still a need for further research and development in the field of
fake review detection to improve the accuracy and reliability of the systems.
The proposed system for detecting fake reviews is based on the Gaussian Naive
Bayes algorithm and uses the Yelp dataset as a source of reviews. The system
consists of the following steps:
3.2.3 Splitting : Splitting the dataset into training and testing sets.
3.2.4 Fitting : Fitting the Gaussian Naive Bayes algorithm on the training set.
The proposed system is designed to provide a reliable and accurate solution for
detecting fake reviews in the Yelp dataset. The system uses the Gaussian Naive
Bayes algorithm, which is a simple yet effective algorithm for text classification
tasks. The algorithm is based on the Bayes theorem and assumes that the features
1
are independent, making it a good choice for text data. The system uses the Yelp
dataset as a source of reviews, which provides a rich source of data for fake review
detection. The dataset contains user reviews, ratings, and metadata for businesses
in various cities.
3.3 Advantages
The proposed system for detecting fake reviews using the Yelp dataset and
Gaussian Naive Bayes algorithm offers several advantages, including:
1. High accuracy: The Gaussian Naive Bayes algorithm has been shown to be
highly accurate in text classification tasks, making it a suitable choice for detecting
fake reviews.
2. Fast processing: The Naive Bayes algorithm is computationally efficient and can
process large amounts of data quickly, making it a good choice for processing the
Yelp dataset.
1
3. Reliability: The proposed system uses a rich dataset from Yelp, which provides
a reliable source of data for detecting fake reviews. The Yelp dataset contains user
reviews, ratings, and metadata for businesses in various cities, which can help in
identifying patterns and trends in the reviews.
4. Scalability: The system can be scaled up to handle larger datasets and more
complex models, making it suitable for businesses and researchers who want to
analyze large amounts of review data.
Overall, the proposed system provides a reliable, accurate, and scalable solution
for detecting fake reviews in the Yelp dataset, which can benefit both businesses
and customers. The system can help businesses improve their reputation by
identifying and removing fake reviews, while customers can have more
trustworthy and reliable reviews to inform their purchasing decisions.
CHAPTER 4
SYSTEM REQUIREMENTS
1
Front End HTMl,CSS
Packages numpy, sklearn, Pandas, Matplotlib
Back End Python
Processor Core2Duo
Speed 2 GHz
Random Access Memory 4 GB
HDD 500 GB
Key Board Windows Keyboard
Mouse Three Button Mouse
Monitor SVG
CHAPTER 5
SYSTEM DESIGN
1
The system design for detecting fake reviews using the Yelp dataset and Gaussian
Naive Bayes algorithm involves the following steps:
2. Feature extraction: Features are extracted from the preprocessed reviews. The
features can include the frequency of each word or the presence of specific phrases.
The features are used as inputs to the Gaussian Naive Bayes algorithm.
3. Model training: The Yelp dataset is split into training and testing sets. The
training set is used to train the Gaussian Naive Bayes algorithm. The algorithm
calculates the probability of a review being fake or genuine based on the input
features.
4. Model testing: The testing set is used to evaluate the performance of the trained
model. The model's performance is evaluated using metrics such as accuracy,
precision, recall, and F1-score.
7. Visualization: The results of the system can be visualized using charts and
graphs to provide insights into the performance of the system. The visualization
can include confusion matrices, precision-recall curves, and ROC curves.
1
The system design for detecting fake reviews using the Yelp dataset and Gaussian
Naive Bayes algorithm is modular and can be easily modified to incorporate
additional features or algorithms for improved performance. The design is scalable
and can handle large amounts of review data efficiently. Overall, the system design
provides a reliable and accurate solution for detecting fake reviews in the Yelp
dataset.
1
The system architecture for detecting fake reviews using the Yelp dataset and
Gaussian Naive Bayes algorithm can be broken down into the following
components:
1. Yelp dataset: The Yelp dataset is a rich source of review data that includes user
reviews, ratings, and metadata for businesses in various cities. The dataset is
preprocessed by removing stop words, stemming the words, and converting them
to lowercase.
2. Feature extraction: Features are extracted from the preprocessed reviews, such
as the frequency of each word or the presence of specific phrases. These features
are used as inputs to the Gaussian Naive Bayes algorithm.
3. Training and testing sets: The Yelp dataset is split into training and testing sets.
The training set is used to train the Gaussian Naive Bayes algorithm, while the
testing set is used to evaluate the model's performance.
1
The system architecture for detecting fake reviews using the Yelp dataset and
Gaussian Naive Bayes algorithm is designed to be scalable and easy to implement.
The system can handle large amounts of review data and can be modified to
incorporate additional features or algorithms for improved performance. Overall,
the system architecture provides a reliable and accurate solution for detecting fake
reviews in the Yelp dataset.
1
5.4 Sequence Diagram:
A sequence diagram shows object interactions arranged in time sequence. It de-
picts the objects and classes involved in the scenario and the sequence of messages
exchanged between the objects needed to carry out the functionality of the
scenario
In Data pre-processing module we take the information of user search hotel from
the Data Scrapping module, on that information we apply algorithm for cleaning
1
the data using various methods like word tokenizer, stop words removal and feature
selection in this module
1
CHAPTER 6
RESUTLTS AND DISCUSSION
6.1 Data Loading
1
Fig 6.2 Data pre processing
6.3 Training
1
Fig 6.3 Training
Web Application
1
Fig 6.4.2 Admin Login
1
6.4.4 ADD HOTEL
1
6.4.6 CUSTOMER SIGNUP
1
6.4.8 Customer Dashboard
1
Fig 6.4.9 Review page
1
Fig 6.4.11 Result page
1
CHAPTER 7
CONCLUSION AND FUTURE WORK
CONCLUSION
In conclusion, the online fake review detection system using the Yelp dataset and
Gaussian Naive Bayes algorithm is an effective solution for detecting fake reviews
on online platforms. The system can help online businesses to maintain their
reputation and protect their customers from fraudulent activities. The system is
designed to preprocess the Yelp dataset, extract features, train and test the
Gaussian Naive Bayes algorithm, and predict whether a review is fake or genuine.
The system can be easily scaled and modified to incorporate additional features or
algorithms for improved performance. A Flask web application can also be
developed to provide a user-friendly interface for the system. The application can
accept user inputs in the form of reviews and provide real-time predictions on their
authenticity. Overall, the online fake review detection system is a valuable tool for
online businesses to maintain their integrity and reputation and ensure that
customers can make informed decisions based on genuine reviews.
1
FUTURE WORK
There are several areas of future work for the online fake review detection system
using the Yelp dataset and Gaussian Naive Bayes algorithm. Some of the possible
future work areas are:
1. Incorporating more advanced machine learning algorithms: Although the
Gaussian Naive Bayes algorithm is effective for detecting fake reviews, there are
more advanced machine learning algorithms that can improve the system's
accuracy. For example, ensemble methods such as Random Forest and Gradient
Boosting can be used to combine multiple models and improve the prediction
accuracy.
2. Handling more complex review data: The system can be further improved to
handle more complex review data, such as reviews containing images and videos.
Natural Language Processing techniques can be used to extract features from the
text, and Computer Vision techniques can be used to analyze images and videos.
3. Developing a mobile application: A mobile application can be developed to
provide a more convenient way for users to access the system. The application can
allow users to scan QR codes or take photos of reviews and receive real-time
predictions on their authenticity.
4. Expanding the dataset: The system's performance can be further improved by
expanding the Yelp dataset or using other datasets from different online platforms.
The larger and more diverse the dataset, the more accurate the system's predictions
are likely to be.
5. Improving the user interface: The Flask web application can be further
improved by adding more user-friendly features, such as a search bar, filtering
options, and visualizations of the system's performance.
1
REFERENCES
1. Jindal, N., & Liu, B. (2008). Opinion spam and analysis. In Proceedings of the
international conference on web search and data mining (pp. 219-230).
2. Ott, M., Choi, Y., Cardie, C., & Hancock, J. T. (2011). Finding deceptive
opinion spam by any stretch of the imagination. In Proceedings of the 49th Annual
Meeting of the Association for Computational Linguistics: Human Language
Technologies (pp. 309-319).
3. Mukherjee, A., Kumar, A., Liu, B., & Wang, J. (2013). Spotting fake reviewer
groups in consumer reviews. In Proceedings of the 22nd international conference
on World Wide Web (pp. 191-202).
4. Zhang, Y., Sun, A., & Zhang, J. (2016). Detecting fake online reviews using
generative model. In Proceedings of the 2016 IEEE/WIC/ACM international
conference on web intelligence (pp. 703- 706).
5. Chen, Y., Huang, S., & Xu, W. (2019). Detecting fake reviews using a
convolutional neural network. Information Processing & Management, 56(6),
1526-1538.
6. Yang, J., Li, W., Yu, C., & Luo, X. (2020). A multi-feature fusion approach for
fake review detection. Information Sciences, 507, 1-17.
7. Luo, W., & Li, Y. (2019). A hybrid method for fake review detection. Journal of
Computational Science, 30, 8-16.
8. Wang, X., Li, J., Li, J., & Liu, Y. (2017). A feature-based method for detecting
fake reviews. Journal of Computer Science and Technology, 32(5), 943-955.
9. Fornaciari, R., Guidotti, R., & Zappella, G. (2019). Detecting fake reviews: A
deep learning approach. Information Sciences, 481, 422-441.
1
10. Lu, C., Hu, Y., Wang, X., & Zhang, H. (2020). An ensemble model for fake
review detection in online social media. Information Sciences, 507, 171-184.
11. Li, Y., Li, Y., Li, Z., Li, Z., & Zhou, X. (2020). A survey of fake review
detection methods. Information Processing & Management, 57(1), 102117.
12. Zhang, Y., Jin, C., Shi, H., & Liu, Y. (2020). Detection of fake reviews via a
novel feature set and hybrid feature selection. Information Processing &
Management, 57(1), 102116.
13. Yin, X., Feng, F., Hao, Y., & Li, Q. (2019). A comparative study of supervised
learning algorithms for fake review detection. Journal of Ambient Intelligence and
Humanized Computing, 10(4), 1657-1669.
14. Rayana, S., & Akoglu, L. (2015). Collective opinion spam detection: Bridging
review networks and metadata. In Proceedings of the 24th international conference
on world wide web (pp. 35-36).
15. Zhang, Y., & Zhang, J. (2016). Detecting fake reviews using discriminant
analysis. Information Processing & Management, 52(2), 291-303.