Giter VIP home page Giter VIP logo

graph-ml-notebooks's Introduction

TigerGraph ML Workbench: Graph ML as a Service

TigerGraph’s Machine Learning Workbench is a Python-based toolkit that accelerates the development of graph-enhanced machine learning, which leverages the added insight from connected data and graph features for better predictions. The GitHub repository of the notebooks are found here.

Set Up Your Workbench

Step 1. Create DB credentials and set access permission

To access the graph database through pyTigerGraph, we need to create a database username and password, then put these credentials in config.json.

  1. Go back to your browser tab/window for TigerGraph Cloud.
  2. Click on Cluster on the left side menu. For the cluster containing this workbench, click Access Management.
  3. Create a database user and grant appropriate permissions (e.g., globaldesigner). More details about managing database users can be found here: https://docs.tigergraph.com/cloud/security/manage-db-users. More details about access control settings can be found here: https://docs.tigergraph.com/tigergraph-server/current/user-access/access-control-model#_built_in_roles.

Step 2. Update the database credentials in config.json

  1. After creating the login credentials in Step 1, go back to the ML Workbench and edit config.json in the root jupyter notebook folder to replace the host, username and password with your new credentials. Example: config.json
{
    "host": "https://subdomain.i.tgcloud.io",
    "username": "user_1",
    "password": "MyPassword1!",
    "getToken": true 
}

Note: For the host parameter, it is the domain name of the Cluster. You can find it in Cluster’s Details page which can be found by clicking on Clusters on tgCloud's left panel, then by clicking on the cluster’s name in the list (Details -> Network Information -> Domain). Replace the substring subdomain with your actual subdomain. Make sure to keep the “https://” at the beginning of the domain in the json config.

  1. Once the credentials are updated, all the example notebooks and demos will refer to this config for database connections via pyTigerGraph. For example, here is how the algos/centrality.ipynb notebook connects to the database:
from pyTigerGraph import TigerGraphConnection
conn = TigerGraphConnection(
    host=config["host"],
    username=config["username"],
    password=config["password"]
)

Learn Graph ML from Example Notebooks

The ML Workbench comes with a collection of canonical Python notebooks that will introduce you to a number of features of the TigerGraph ML ecosystem.

  • The basics directory contains notebooks on how to get started with pyTigerGraph.
  • The algos directory contains notebooks for each category of algorithms within TigerGraph's Graph Data Science Library. You can run these algorithms via the pyTigerGraph Featurizer functionality.
  • The GNNs directory contains tutorial notebooks on how to train GNNs using data stored in a TigerGraph database.
  • The applications directory contains end to end demos of common applications such as fraud detection and recommendation.

We recommend starting with the tutorials in the basics folders if you are new to pyTigerGraph. Once you are familiar with our pyTigerGraph client, familiarize yourself with a few graph algorithms with the examples in the algos folder before going through the GNNs and end-to-end applications tutorials.

1. Getting Started with pyTigerGraph and GSQL

folder notebook intro
basics datasets.ipynb Load Data into TigerGraph
basics feature_engineering.ipynb Util functions about building graph features from TigerGraph
basics pyTigergraph_101.ipynb Basic pyTigerGraph examples
basics gsql_101.ipynb Basic GSQL 101 using pyTigerGraph
basics gsql_102.ipynb Advanced GSQL 102 (pattern match) using pyTigerGraph
basics template_query.ipynb How to call template query with pyTigerGraph

2. Graph Algorithms

folder notebook intro
algos centrality.ipynb Centrality algorithms
algos community.ipynb Community detection algorithms
algos similarity.ipynb Similarity algorithms
algos pathfinding.ipynb Pathfinding between vertices
algos embedding.ipynb Graph embedding algorithms
algos classification.ipynb Node classification algorithms
algos topologicalLinkPrediction.ipynb Topological link predictions

3. Graph Neural Networks with TigerGraph

folder notebook intro
GNNs/PyG gcn_node_classification.ipynb Node classification using PyG
GNNs/PyG gcn_link_prediction.ipynb Link prediction using PyG
GNNs/PyG hgat_node_classification.ipynb Heterogeneous Graph Attention Network using PyG
GNNs/DGL gcn_node_classification.ipynb Node classification using DGL
GNNs/DGL rgcn_node_classification.ipynb Heterogeneous Graph Convolutional Network using DGL
GNNs/Spektral gcn_node_classification.ipynb Node classification using Spektral for Tensorflow

4. End-to-end Applications using Graph ML

folder notebook intro
applications/fraud_detection fraud_detection.ipynb End-to-end fraud detection using Graph ML
applications/recommendation recommendation.ipynb End-to-end recommendation using Graph ML

graph-ml-notebooks's People

Contributors

parkererickson-tg avatar billshitg avatar zhixiany avatar luzhoutg avatar trisjtg 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.