A comprehensive data science and machine learning repository focused on restaurant data analysis. This project covers end-to-end workflows including multiclass cuisine classification, spatial/location-based analytics, rating regression, and content-based recommendation engines.
This repository analyzes restaurant profile data (inspired by global restaurant directories like Zomato) to extract business insights and deliver predictive solutions across four dedicated domains:
- Cuisine Classification: Predicts the primary cuisine category using operational features and ratings.
- Location-Based Analysis: Performs geospatial mapping and city-level aggregations of price tiers, ratings, and cuisines.
- Restaurant Rating Prediction: Employs regression pipelines to forecast a restaurant's continuous
Aggregate rating. - Restaurant Recommendation System: Suggests top-matching eateries using TF-IDF feature extraction and cosine similarity on user preferences.
RestaurantCuisineClassificationUsingMachineLearning/
└── machine learning intern/
└── machine learning intern/
├── Dataset .csv
├── cuisine classification/
│ └── cuisine_classification.py
├── location based analysis/
│ └── location_analysis.py
├── restaurant rating predict/
│ └── rating_prediction.py
└── restaurant recommendation/
└── recommendation_system.py
- Objective: Categorize restaurant cuisine offerings based on operational attributes.
- Techniques: Missing value imputation, categorical label encoding (
LabelEncoder), and ensemble modeling viaRandomForestClassifier. - Evaluation: Weighted Precision, Recall, Accuracy, and standard multi-class classification reports.
- Objective: Understand geospatial patterns and regional dining trends.
- Techniques:
- Coordinate mapping across international latitudes/longitudes using
mpl_toolkits.basemapandmatplotlib. - City-level grouping to determine restaurant density, top-rated cities, and average pricing tiers with
seaborn. - Mode analysis to isolate popular cuisines across metro markets.
-
Objective: Estimate customer satisfaction (
Aggregate rating) prior to review accumulation. - Techniques:
- Clean
ColumnTransformerpreprocessing pipeline. - Standardized numerical features (
StandardScaler) with median/mean imputation. - One-Hot Encoding (
OneHotEncoder) for categorical parameters. - Continuous regression modeling (
LinearRegression) evaluated via Mean Squared Error (MSE) and$R^2$ Score.
- Objective: Match user taste profiles to the most relevant restaurants.
- Techniques:
- Metadata unification (Cuisines, Price Tiers, Text Ratings, and Votes).
- TF-IDF vectorization (
TfidfVectorizer) with English stop-word filtering. - Pairwise cosine similarity ranking (
linear_kernel) returning top-$N$ personalized venues.
The input dataset (Dataset .csv) contains global restaurant metrics including:
| Field | Description |
|---|---|
Restaurant ID / Name |
Unique identifier and public name of the venue |
City / Address / Locality |
Granular geographic descriptors |
Latitude / Longitude |
Coordinate pairs for geospatial plotting |
Cuisines |
Comma-separated food styles served |
Price range |
Scaled price band (e.g., 1–4) |
Aggregate rating / Rating text |
Numerical review score (0.0–5.0) and categorical descriptor |
Votes |
Cumulative count of user reviews submitted |
- Clone the repository:
git clone [https://github.com/ThiriloseJonesNithish-R/RestaurantCuisineClassificationUsingMachineLearning.git](https://github.com/ThiriloseJonesNithish-R/RestaurantCuisineClassificationUsingMachineLearning.git)
cd RestaurantCuisineClassificationUsingMachineLearning
- Create and activate a virtual environment (recommended):
python -m venv venv
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
- Install dependencies:
pip install pandas numpy scikit-learn matplotlib seaborn basemap
- Configure Dataset Path:
Ensure each script references the correct path to
Dataset .csvrelative to your execution directory:
data_path = "Dataset .csv" # Place within the module directory or adjust path accordinglyRun any module directly from your terminal:
- Train the Cuisine Classifier:
python "machine learning intern/machine learning intern/cuisine classification/cuisine_classification.py"
- Generate Geospatial & City Visualizations:
python "machine learning intern/machine learning intern/location based analysis/location_analysis.py"
- Run the Rating Prediction Pipeline:
python "machine learning intern/machine learning intern/restaurant rating predict/rating_prediction.py"
- Get Personalized Recommendations:
python "machine learning intern/machine learning intern/restaurant recommendation/recommendation_system.py"
This repository is distributed under the MIT License.