Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

naivebayes

🏨 Hotel Review Rating Prediction (NLP with Naive Bayes & Logistic Regression)

This project uses natural language processing to predict hotel review ratings based on user-written review text. The analysis involves cleaning a real-world dataset, visualizing insights, and building two machine learning models: Naive Bayes and Logistic Regression.

🔍 Key Highlights

  • Data cleaning & EDA
  • Visualizations of ratings and top review cities
  • TF-IDF vectorization for better word weighting
  • Naive Bayes vs Logistic Regression model comparison
  • Evaluation using accuracy, precision, recall, F1-score
  • Summary insights and recommendations

📈 Results

  • Best performance on frequent rating classes (especially rating 5)
  • Logistic Regression outperformed Naive Bayes (F1: 0.49 vs 0.45)
  • Rare ratings (6–10) were difficult to predict due to imbalance

📦 Tools Used

  • Python (Pandas, Matplotlib, Seaborn)
  • Scikit-learn
  • Jupyter Notebook (Google Colab)

🚀 Run This Notebook

  1. Clone the repo or open the notebook in Google Colab
  2. Upload the dataset (hotel reviews.csv)
  3. Run cells from top to bottom

📌 Author

Billy Pierre – LinkedIn | GitHub

About

Predict hotel review ratings using NLP techniques. Includes data cleaning, visualization, TF-IDF vectorization, and a comparison of Naive Bayes vs Logistic Regression. Evaluated using accuracy, F1-score, and confusion matrix.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages