Skip to content

Building a model designed to analyze customer sentiment in hotel reviews, categorizing sentiments as [positive, neutral, or negative] The project also includes a variant model to enhance classification accuracy and provide diverse analytical perspectives.

License

Notifications You must be signed in to change notification settings

Nukaze/sentiment-analysis-hotel-reviews

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sentiment-analysis-hotel-reviews

Build a model to analyze customer sentiment from hotel reviews (positive, neutral, or negative).

Dataset

tripadvisor_logo

URL: TripAdvisor Hotel Reviews on Kaggle The folder contains:

  • offering.txt
  • offerings.csv
  • review.txt
  • reviews.csv

(Note: In this repository, ignore review.txt and reviews.csv due to Git LFS limitations. xD)


In my main.py, only offerings.csv and reviews.csv are used.

df_offerings: [4333]row x [8]col
df_reviews: [810967]row x [11]col

Data splitting:

by test_size = 0.2
data_splitting

Machine Learning Model:

1. Logistic Regression Result:

Labels: [positive, neutral, negative]
Configuration:
logistic_regression_model_config
Accuracy: 0.87
logistic_regression_model_result



2. Random Forest Classifier Result:

Configuration:
random_forest_classifier_config
Accuracy: 0.78
random_forest_classifier_result

About

Building a model designed to analyze customer sentiment in hotel reviews, categorizing sentiments as [positive, neutral, or negative] The project also includes a variant model to enhance classification accuracy and provide diverse analytical perspectives.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages