# yusufkhanml/restaurant-data-analysis-ml architecture

> Architecture diagram of the GitHub repository yusufkhanml/restaurant-data-analysis-ml, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yusufkhanml/restaurant-data-analysis-ml
- Repository: https://github.com/yusufkhanml/restaurant-data-analysis-ml

## Overview

This is a notebook-based restaurant data analysis project with four distinct workflows: rating prediction, restaurant recommendations, cuisine classification, and location analysis. The README documents their goals and outputs, but the notebooks and data files were not sampled, so implementation details and most data-flow links cannot be verified. The graph shows documented task-to-output relationships only; it does not assume which dataset files each notebook loads.

Main entry points: [`notebooks/Task_3_Cuisine_Classification.ipynb`](https://github.com/yusufkhanml/restaurant-data-analysis-ml/blob/main/notebooks/Task_3_Cuisine_Classification.ipynb) (Cuisine classification), [`notebooks/Task_4_Location_Based_Analysis.ipynb`](https://github.com/yusufkhanml/restaurant-data-analysis-ml/blob/main/notebooks/Task_4_Location_Based_Analysis.ipynb) (Location analysis), [`notebooks/Task_1_Rating_Prediction.ipynb`](https://github.com/yusufkhanml/restaurant-data-analysis-ml/blob/main/notebooks/Task_1_Rating_Prediction.ipynb) (Rating prediction), [`notebooks/Task_2_Recommendation_System.ipynb`](https://github.com/yusufkhanml/restaurant-data-analysis-ml/blob/main/notebooks/Task_2_Recommendation_System.ipynb) (Restaurant recommendations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Restaurant Data"]
  node_raw["Raw dataset<br/>[raw_dataset.csv]"]
  node_clean["Clean dataset<br/>[clean_dataset.csv]"]
end

subgraph group_analysis["Analysis Tasks"]
  node_rating["Rating prediction"]
  node_recommend["Restaurant recommendations"]
  node_cuisine["Cuisine classification"]
  node_location["Location analysis"]
end

subgraph group_models["Saved Models"]
  node_rating_model["Rating model"]
  node_cuisine_model["Cuisine classifier"]
  node_cuisine_encoder["Cuisine encoder"]
  node_feature_encoders["Feature encoders"]
end

subgraph group_maps["Map Outputs"]
  node_restaurant_map["Restaurant map"]
  node_heatmap["Restaurant heatmap"]
  node_cluster_map["City cluster map"]
end

node_analyst(("Project user"))

node_analyst -->|"runs notebook"| node_rating
node_analyst -->|"runs notebook"| node_recommend
node_analyst -->|"runs notebook"| node_cuisine
node_analyst -->|"runs notebook"| node_location
node_location -->|"creates map"| node_restaurant_map
node_location -->|"creates heatmap"| node_heatmap
node_location -->|"creates cluster map"| node_cluster_map
node_cuisine -->|"saves classifier"| node_cuisine_model
node_cuisine -->|"saves encoders"| node_cuisine_encoder
node_cuisine -->|"saves encoders"| node_feature_encoders

click node_raw "https://github.com/yusufkhanml/restaurant-data-analysis-ml/blob/main/Data/raw_dataset.csv"
click node_clean "https://github.com/yusufkhanml/restaurant-data-analysis-ml/blob/main/Data/clean_dataset.csv"
click node_rating "https://github.com/yusufkhanml/restaurant-data-analysis-ml/blob/main/notebooks/Task_1_Rating_Prediction.ipynb"
click node_recommend "https://github.com/yusufkhanml/restaurant-data-analysis-ml/blob/main/notebooks/Task_2_Recommendation_System.ipynb"
click node_cuisine "https://github.com/yusufkhanml/restaurant-data-analysis-ml/blob/main/notebooks/Task_3_Cuisine_Classification.ipynb"
click node_location "https://github.com/yusufkhanml/restaurant-data-analysis-ml/blob/main/notebooks/Task_4_Location_Based_Analysis.ipynb"
click node_rating_model "https://github.com/yusufkhanml/restaurant-data-analysis-ml/blob/main/models/rating_prediction_model_lgbm.pkl"
click node_cuisine_model "https://github.com/yusufkhanml/restaurant-data-analysis-ml/blob/main/models/xgboost_cuisine_classifier_merged.pkl"
click node_cuisine_encoder "https://github.com/yusufkhanml/restaurant-data-analysis-ml/blob/main/models/cuisine_group_encoder.pkl"
click node_feature_encoders "https://github.com/yusufkhanml/restaurant-data-analysis-ml/blob/main/models/feature_label_encoders.pkl"
click node_restaurant_map "https://github.com/yusufkhanml/restaurant-data-analysis-ml/blob/main/maps/restaurant_map.html"
click node_heatmap "https://github.com/yusufkhanml/restaurant-data-analysis-ml/blob/main/maps/restaurant_heatmap.html"
click node_cluster_map "https://github.com/yusufkhanml/restaurant-data-analysis-ml/blob/main/maps/city_clusters_map.html"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_raw,node_clean,node_analyst toneBlue
class node_rating,node_recommend,node_cuisine,node_location toneAmber
class node_rating_model,node_cuisine_model,node_cuisine_encoder,node_feature_encoders toneMint
class node_restaurant_map,node_heatmap,node_cluster_map toneRose
```

## Components

### Restaurant Data

- [Raw dataset](https://github.com/yusufkhanml/restaurant-data-analysis-ml/blob/main/Data/raw_dataset.csv): `Data/raw_dataset.csv`
- [Clean dataset](https://github.com/yusufkhanml/restaurant-data-analysis-ml/blob/main/Data/clean_dataset.csv): `Data/clean_dataset.csv`

### Analysis Tasks

- [Rating prediction](https://github.com/yusufkhanml/restaurant-data-analysis-ml/blob/main/notebooks/Task_1_Rating_Prediction.ipynb): `notebooks/Task_1_Rating_Prediction.ipynb`
- [Restaurant recommendations](https://github.com/yusufkhanml/restaurant-data-analysis-ml/blob/main/notebooks/Task_2_Recommendation_System.ipynb): `notebooks/Task_2_Recommendation_System.ipynb`
- [Cuisine classification](https://github.com/yusufkhanml/restaurant-data-analysis-ml/blob/main/notebooks/Task_3_Cuisine_Classification.ipynb): `notebooks/Task_3_Cuisine_Classification.ipynb`
- [Location analysis](https://github.com/yusufkhanml/restaurant-data-analysis-ml/blob/main/notebooks/Task_4_Location_Based_Analysis.ipynb): `notebooks/Task_4_Location_Based_Analysis.ipynb`

### Saved Models

- [Rating model](https://github.com/yusufkhanml/restaurant-data-analysis-ml/blob/main/models/rating_prediction_model_lgbm.pkl): `models/rating_prediction_model_lgbm.pkl`
- [Cuisine classifier](https://github.com/yusufkhanml/restaurant-data-analysis-ml/blob/main/models/xgboost_cuisine_classifier_merged.pkl): `models/xgboost_cuisine_classifier_merged.pkl`
- [Cuisine encoder](https://github.com/yusufkhanml/restaurant-data-analysis-ml/blob/main/models/cuisine_group_encoder.pkl): `models/cuisine_group_encoder.pkl`
- [Feature encoders](https://github.com/yusufkhanml/restaurant-data-analysis-ml/blob/main/models/feature_label_encoders.pkl): `models/feature_label_encoders.pkl`

### Map Outputs

- [Restaurant map](https://github.com/yusufkhanml/restaurant-data-analysis-ml/blob/main/maps/restaurant_map.html): `maps/restaurant_map.html`
- [Restaurant heatmap](https://github.com/yusufkhanml/restaurant-data-analysis-ml/blob/main/maps/restaurant_heatmap.html): `maps/restaurant_heatmap.html`
- [City cluster map](https://github.com/yusufkhanml/restaurant-data-analysis-ml/blob/main/maps/city_clusters_map.html): `maps/city_clusters_map.html`

### Other components

- **Project user**

## Connections

- Project user → Rating prediction: runs notebook (evidence: `README.md`)
- Project user → Restaurant recommendations: runs notebook (evidence: `README.md`)
- Project user → Cuisine classification: runs notebook (evidence: `README.md`)
- Project user → Location analysis: runs notebook (evidence: `README.md`)
- Location analysis → Restaurant map: creates map (evidence: `README.md`)
- Location analysis → Restaurant heatmap: creates heatmap (evidence: `README.md`)
- Location analysis → City cluster map: creates cluster map (evidence: `README.md`)
- Cuisine classification → Cuisine classifier: saves classifier (evidence: `README.md`)
- Cuisine classification → Cuisine encoder: saves encoders (evidence: `README.md`)
- Cuisine classification → Feature encoders: saves encoders (evidence: `README.md`)
