Giter VIP home page Giter VIP logo

ge-recommendation-system's Introduction

GE

Showcases a recommendation system using Amazon Personalize to generate real-time recommendations based on interactions by customers.

Getting started

  1. Deploy the backend on AWS

    1. Upload USERS.csv, ITEMS.csv and USER_INTERACTIONS.csv to an S3 bucket (Find these files in the shared GE box).

    2. Add a bucket policy allowing Amazon Personalize to access the contents.

      Bucket policy

      Replace BUCKET_NAME with your bucket name below.

      {
        "Version": "2012-10-17",
        "Id": "PersonalizeS3BucketAccessPolicy",
        "Statement": [
          {
            "Sid": "PersonalizeS3BucketAccessPolicy",
            "Effect": "Allow",
            "Principal": {
              "Service": "personalize.amazonaws.com"
            },
            "Action": ["s3:GetObject", "s3:ListBucket"],
            "Resource": [
              "arn:aws:s3:::BUCKET_NAME",
              "arn:aws:s3:::BUCKET_NAME/*"
            ]
          }
        ]
      }
    3. Create an IAM role with the AmazonS3ReadOnlyAccess permission. Steps 2 and 3 can also be automated by running initRole.ipynb

    4. In the Amazon personalize dashboard, create a dataset group and add the three datasets. The required shema for each of the datasets can be copied from below

      Users dataset schema
      {
        "type": "record",
        "name": "Users",
        "namespace": "com.amazonaws.personalize.schema",
        "fields": [
          {
            "name": "USER_ID",
            "type": "string"
          },
          {
            "name": "USER_HOSPITAL",
            "type": ["null", "string"]
          },
          {
            "name": "USER_ROLE",
            "type": "string",
            "categorical": true
          }
        ],
        "version": "1.0"
      }
      Items dataset schema
      {
        "type": "record",
        "name": "Items",
        "namespace": "com.amazonaws.personalize.schema",
        "fields": [
          {
            "name": "ITEM_NAME",
            "type": ["null", "string"]
          },
          {
            "name": "ITEM_FAMILY",
            "type": "string",
            "categorical": true
          },
          {
            "name": "ITEM_OVERVIEW",
            "type": ["null", "string"]
          },
          {
            "name": "ITEM_ID",
            "type": "string"
          }
        ],
        "version": "1.0"
      }
      Interactions dataset schema
      {
        "type": "record",
        "name": "Interactions",
        "namespace": "com.amazonaws.personalize.schema",
        "fields": [
          {
            "name": "USER_ID",
            "type": "string"
          },
          {
            "name": "ITEM_ID",
            "type": "string"
          },
          {
            "name": "ACTION",
            "type": "string",
            "category": true
          },
          {
            "name": "TIMESTAMP",
            "type": "long"
          }
        ],
        "version": "1.0"
      }
    5. Once the dataset import jobs have completed, create a solution with the arn:aws:personalize:::recipe/aws-user-personalization recipe.

    6. Create a campaign with the given solution version and copy the campaign ARN

    7. Create a lambda function with the code from getRecLambda.py. Copy the Campaign ARN to line 27.

    8. Attach an API gateway trigger to the function.

  2. Start the web app

    Make sure you have NodeJS v16.6.0+ installed. Then, continue with the following steps:

    # Install dependencies
    npm install
    
    # Copy the example env file to .env.local, and fill in your endpoint URL from API gateway
    cp .env.local.example .env.local
    
    # The development server should be available on http://localhost:3000
    npm run dev

About

We submitted this project for GE Healthcare's GE Hack-E-LTH '21 hackathon and won 1st prize. Our team comprised of Joshua T, Samyuktha T H, Sandeep Rajakrishnan, and Vighnesh Shankar.

ge-recommendation-system's People

Contributors

radiantly avatar samkeating avatar san-coding avatar vighneshshankar23 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ge-recommendation-system's Issues

Todo : By Oct 14, 2021

User data:

  • Group users based on 30 or so hospitals
  • Role - Biomed Department Manager (50%), CFO (1 person), Operator (Rest)

Item data:

  • Extract keywords from overview (max 250 characters)

Interaction data:

  • Generate events in a more refined way
  • Have a tree structure ensuring that a user who has placed the order has recorded all other events

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.