Giter Club home page Giter Club logo

hotel-rating-prediction-ml's Introduction

Hotel Rating Prediction

This is a machine learning project that focuses on predicting hotel ratings based on various features and reviews. The goal is to build and evaluate different models to accurately predict the rating given by reviewers.

Table of Contents

Project Overview

The project aims to predict hotel ratings based on a dataset containing various features and reviews. The dataset is preprocessed to handle missing values, encode categorical variables, and perform feature scaling. The project includes both classification and regression models to cover different aspects of rating prediction.

Data Preprocessing

The data preprocessing steps involve handling outliers, encoding categorical variables, extracting relevant information from tags, and scaling numerical features. Outliers in certain columns are winsorized to mitigate their impact on the models. Categorical variables are encoded, and tags are extracted and organized into categories. Numerical features are scaled using the Min-Max scaling technique to ensure consistency across different ranges.

Model Training and Evaluation

Logistic Regression

A logistic regression model is trained to predict hotel ratings. The top features with the highest correlation to the target variable are selected for training the model. The model's performance is evaluated using validation and test accuracy scores. The trained logistic regression model is saved for future use.

Decision Tree Classifier

A decision tree classifier is trained to predict hotel ratings. The same top features selected for logistic regression are used as input features. The model's performance is evaluated using validation and test accuracy scores. The trained decision tree classifier is saved for future use.

Random Forest Classifier

A random forest classifier is trained to predict hotel ratings. The model uses 150 estimators, a maximum depth of 25, and minimum samples per leaf of 75. The model's performance is evaluated using validation and test accuracy scores. The trained random forest classifier is saved for future use.

K-Nearest Neighbors Classifier

A k-nearest neighbors classifier is trained to predict hotel ratings. The model uses 21 neighbors for classification. The model's performance is evaluated using validation and test accuracy scores. The trained k-nearest neighbors classifier is saved for future use.

Regression Models

Linear Regression

A linear regression model is trained to predict hotel ratings. The mean squared error (MSE) is calculated for both the training and validation sets to evaluate the model's performance.

K-Nearest Neighbors Regression

A k-nearest neighbors regression model is trained to predict hotel ratings. The mean squared error (MSE) is calculated for both the training and validation sets to evaluate the model's performance.

Random Forest Regression

A random forest regression model is trained to predict hotel ratings. The mean squared error (MSE) is calculated for both the training and validation sets to evaluate the model's performance.

Gradient Boosting Regression

A gradient boosting regression model is trained to predict hotel ratings. The mean squared error (MSE) is calculated for both the training and validation sets to evaluate the model's performance.

hotel-rating-prediction-ml's People

Contributors

el-sayed-mustafa avatar lunary403 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.