Machine learning prediction for restaurant ratings
Motivation
This work is motivated by two notions:
- How can we categorize the restaurants in a particular region into multiple groups, such as Southside restaurants?
- How can we predict the ratings of restaurants that we haven’t visited before? This would assist us in selecting restaurants that are likely to be enjoyable for us the next time we fancy going out.
Implementation
Two approaches are employed in this work to address the aforementioned questions:
-
Unsupervised learning: This approach is used to group restaurants that are in close proximity to each other.
-
Supervised learning: This approach is utilized to predict the ratings of new restaurants based on the ratings of previously visited restaurants.
Final result
Clustering restaurants
The following is a visualization of the Voronoi diagram generated by the implemented unsupervised k-means algorithm. This diagram illustrates the closest restaurants to each other, allowing us to cluster them into eight groups.
Rating prediction
The following demonstrates the implementation of least-squares linear regression to predict user ratings for restaurants the user hasn’t visited before. This prediction is based on the ratings the user has given to restaurants they have visited previously. The ratings are indicated by the numbers inside parentheses above each colored dot.
Reference to the stub code.