Giter VIP home page Giter VIP logo

restaurant-recomm's Introduction

restaurant-recomm

Restaurant recommender

Problem: https://docs.google.com/document/d/1Q2sP8O1NXSa1xcNZshscydi1I-KbD_UekTxxrbcFONs/edit

Design

Each folder of src contain one package

Loader package

This package loads and parses data.csv.

Models

This package basically holds all models arounds our resturant recommender. This include restaurant, cuisines and user.

Rules

This package contains all rules which are used by restaurant recommender. In this, we have rules.go which basically contains one interface which are implemented by different types of rules we have.

Recommender

This is main engine for our restaurant recommender. This package basically create rules using rule package and apply those rules based on user and restaurant data.

Testing

To test this code just run below code from root folder of the repo

go run src/main/main.go

Based on current user set in main.go(Primary cuisine NorthIndian(2) with cost bracket of 5 and seconday cuisine Chinese(3) with cost bracket of 2) and data for restaurants present in data.csv. It output is

ID2
ID5
ID17
ID3
ID6
ID7
ID4
ID1
ID19
ID9
ID10
ID8
ID11
ID12
ID13
ID14
ID15
ID16
ID18
ID20
ID21
ID22
ID23

To understand this output, let analyse the data.explain which basically explain the entries in data.csv file. Here is below explained output based on rules defined in the problem

ID2  -> Rule 1 "Featured restaurants of primary cuisine and primary cost bracket."
ID5  -> Rule 2 "All restaurants of Primary cuisine, primary cost bracket with rating >= 4"
ID17 -> Rule 3 "All restaurants of Primary cuisine, secondary cost bracket with rating >= 4.5"
ID3  -> Rule 4 "All restaurants of secondary cuisine, primary cost bracket with rating >= 4.5"
ID6  -> Rule 4 "All restaurants of secondary cuisine, primary cost bracket with rating >= 4.5"
ID7  -> Rule 5 "Top 4 newly created restaurants by rating"
ID4  -> Rule 5  
ID1  -> Rule 5
ID19 -> Rule 5
ID9  -> Rule 6 "All restaurants of Primary cuisine, primary cost bracket with rating < 4"
ID10 -> Rule 8 "All restaurants of secondary cuisine, primary cost bracket with rating < 4.5"
ID8  -> Rule 9 "All restaurants of any cuisine, any cost bracket"
ID11 -> Rule 9
ID12 -> Rule 9
ID13 -> Rule 9
ID14 -> Rule 9
ID15 -> Rule 9
ID16 -> Rule 9
ID18 -> Rule 9
ID20 -> Rule 9
ID21 -> Rule 9
ID22 -> Rule 9
ID23 -> Rule 9

Note: No combination of sample user defined main.go and data in data.csv satified rule 7. So no explicit entry for rule7

restaurant-recomm's People

Contributors

tiwarishub avatar

Stargazers

zako77xx  avatar

Watchers

 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.