Coder Social home page Coder Social logo

dingqk / graph-rec Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nhtsai/graph-rec

0.0 0.0 0.0 3.65 MB

Senior Capstone Project: Graph-Based Product Recommendation

Home Page: https://nhtsai.github.io/graph-rec/

Jupyter Notebook 94.94% Python 4.99% Dockerfile 0.07% Shell 0.01%

graph-rec's Introduction

Graph-based Product Recommendation

DSC180B Capstone Project on Graph Data Analysis

Project Website: https://nhtsai.github.io/graph-rec/

Project

Amazon Product Recommendation using a graph neural network approach.

Requirements

  • dask
  • pandas
  • torch
  • torchtext
  • dgl

Data

Datasets

Amazon Product Dataset from Professor Julian McAuley (link)

  • Product Reviews (5-core)
  • Product Metadata
  • Product Image Features

GraphSAGE Model

PinSAGE

Graph & Features

The graph is a heterogeneous, bipartite user-product graph, connected by reviews.

  • Product Nodes (ASIN)
    • Features: title, price, image representation
  • User Nodes (reviewerID)
  • Edges (user, reviewed, product) and (product, reviewed-by, user)
    • Features: helpful, overall

Data Configuration (config/data-params.json)

Model

We use an unsupervised PinSage model (adapted from DGL).

Model Configuration (config/pinsage-model-params.json)

  • name: model configuration name
  • random-walk-length: maximum number traversals for a single random walk, default: 2
  • random-walk-restart-prob: termination probability after each random walk traversal, default: 0.5
  • num-random-walks: number of random walks to try for each given node, default: 10
  • num-neighbors: number of neighbors to select for each given node, default: 3
  • num-layers: number of sampling layers, default: 2
  • hidden-dims: dimension of product embedding, default: 64 or 128
  • batch-size: batch size, default: 64
  • num-epochs: number of training epochs, default: 500
  • batches-per-epoch: number of batches per training epoch, default: 512
  • num-workers: number of workers, `default: 3 or (#cores - 1)
  • lr: learning rate, default: 3e-4
  • k: number of recommendations, default: 500
  • model-dir: directory of existing model to continue training
  • existing-model: filename of existing model to continue training, default: null
  • id-as-features: use id as features, makes model transductive
  • eval-freq: evaluates model on validation set when epoch % eval-freq == 0, also evaluates model after last training epoch
  • save-freq: saves model when epoch % save-freq == 0, also saves model after last training epoch

References

graph-rec's People

Contributors

nhtsai avatar ajarkas 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.