SlideShare a Scribd company logo
Graph Gurus 26
Using Graph Algorithms for Advanced Analytics
Part 1 - Shortest Paths
1
© 2020 TigerGraph. All Rights Reserved
Some Housekeeping Items
● Although your phone is muted we do want to answer your questions -
submit your questions at any time using the Q&A tab in the menu
● The webinar is being recorded and will uploaded to our website shortly
(https://www.tigergraph.com/webinars-and-events/) and the URL will be
emailed you
● If you have issues with Zoom please contact the panelists via chat
2
© 2020 TigerGraph. All Rights Reserved
Today's Presenter
3
Victor Lee
Head of Product Strategy
● BS in Electrical Engineering and Computer
Science from UC Berkeley, MS in Electrical
Engineering from Stanford University
● PhD in Computer Science from Kent State
University focused on graph data mining
● 20+ years in tech industry
© 2020 TigerGraph. All Rights Reserved
Move Faster with TigerGraph Cloud
Built for agile teams who would rather build innovative applications than
procure hardware or configure and manage databases
4
© 2020 TigerGraph. All Rights Reserved
Today’s Outline
5
1
3
2
Graph Analytics - uses and benefits
Shortest Path Algorithms
How to select and use the right one
What are Graph Algorithms?
Overview of different types
4
Demo
GSQL Path Algorithms
© 2020 TigerGraph. All Rights Reserved
Data-Driven Business
Collect more data. See more. Understand more. Decide better.
6
© 2020 TigerGraph. All Rights Reserved
Analyzing Connected Data
● All data processing is "connecting data"
A + B = C
● Linking datasets together enriches your knowledge.
● Statistical Analysis and Machine Learning are about correlation:
seeing how one set of things relates to another set of things.
⇒ Graphs are an ideal way to organize and analyze complex data.
7
Online
sales
In-store
salesStore
Demographics
Web
analytics
© 2020 TigerGraph. All Rights Reserved 8
What is a Graph?
● A Graph is a collection of Vertices and
Vertex-to-Vertex Connections, called Edges
● Each Vertex (sometimes referred to as a node)
and each Edge has a type and characteristic
properties.
● Natural storage model for modeling data and
its interconnections or relationships
● Natural model for representing transactions
● Natural model for knowledge/analysis/
learning – through following and studying
connections
Matt
Customer
Chris
Customer
John
Customer
Bob
Customer
Stephanie
Partner
Jack
Sales
Dan
Partner
Tom
Sales
W
orkswith
Friends
w
ith
Partners
with
W
orkswith
Sells
to
Friends
with
Friends
with
Knows
Product
A
Product
B
Owns
Loves
Bought
Resells
Property Graph
© 2020 TigerGraph. All Rights Reserved
Why Are Graphs Important for Business?
9
100% Annual Growth in Graph through 2022
Graph Named Trend No. 5 on Gartner’s Top 10 Data and Analytics Technology Trends for 2019
What is graph analytics?
A set of analytic techniques that allows for the exploration of relationships between
entities of interest such as organizations, people and transactions.
What’s unique about graph?
Graph data stores can efficiently model, explore and query data with complex
interrelationships across data silos.
Why is graph one of the top 10 trends for data and analytics?
Graph analytics is growing due to the need to ask complex questions across complex
data, which is not always practical or even possible at scale using SQL queries.
© 2020 TigerGraph. All Rights Reserved
Graph algorithms are functions for measuring characteristics
of graphs, vertices, or relationships.
A graph algorithm library serves as a toolkit and as building
blocks for analyzing your data.
Specialized functions Combine to make
something greater
Graph Algorithms
10
© 2020 TigerGraph. All Rights Reserved
GSQL Graph Algorithm Library
● Written in GSQL - high-level, parallelized
● Open-source, user-extensible
● Well-documented
11
docs.tigergraph.com/graph-algorithm-library
© 2020 TigerGraph. All Rights Reserved
Example Questions/Analyses for Graph Algorithms
Which entity is most centrally
located?
● For delivery logistics or greatest visibility
● Closeness Centrality, Betweenness
Centrality algorithms
12
How much influence does this
entity exert over the others?
● For market penetration & buyer
influence
● PageRank algorithm
Which entity has similar relationships
to this entity?
● For grouping customers, products, etc.
● Cosine Similarity, SimRank, RoleSim
algorithms
What are the natural community
groupings in the graph?
● For partitioning risk groups, workgroups,
product offerings, etc.
● Community Detection, MinCut
algorithms
© 2020 TigerGraph. All Rights Reserved
Picking the Right Algorithm for the Job
To become a master designer:
● Learn what each tool can do
● Learn to combine building blocks to solve complex issues
This webinar series is designed to show you what each tool
can do. We'll also show you some application examples.
13
© 2020 TigerGraph. All Rights Reserved
Case Study: Finding Regions of Influence
Step 1: Hub Detection/Ranking - Finding the Influencers
14
Additional details at https://www.tigergraph.com/solutions/product-service-marketing/
Source: Pharmaceutical/Life
Science company seeking the
most influential prescribers.
© 2020 TigerGraph. All Rights Reserved
Case Study: Finding Regions of Influence
Step 1: Community Detection
15
Additional details at https://www.tigergraph.com/solutions/product-service-marketing/
© 2020 TigerGraph. All Rights Reserved
Some Types of Graph Algorithms
● Search
● Path Finding & Analytics
● Centrality / Ranking
● Clustering / Community Detection
● Similarity
● Classification
16
© 2020 TigerGraph. All Rights Reserved
Path Analytics
A
B
C
D
E
F
H
G
Is there a path from A to H?
● How many paths?
● What is the shortest or cheapest path?
● What is the degree of separation
(number of hops)?
○ The smaller the degree, the greater
the knowledge/influence/trust of the other
○ Likelihood of encountering one another
○ Referral for jobs, etc.
● Games:
○ Kevin Bacon number: https://oracleofbacon.org/
○ Erdős number
17
© 2020 TigerGraph. All Rights Reserved
Common Path Questions
● What is the shortest distance from vertex A to vertex B?
● What is a shortest path (sequence of vertices) from A to B?
● Case 1: Unweighted edges
○ We only care if a relationship exists, not how strong or long it is
A
B
C
D
E
F
H
G
18
© 2020 TigerGraph. All Rights Reserved
Shortest Distance in an Unweighted Graph
A
B
C
D
E
F
H
G
Short Distance algorithm:
● Count levels in breadth-first search
● Side benefit: Also finds the shortest
distance to other vertices along the
way
1
1
1
2
2
3
3
function: shortest_distance_unweighted(A, H)
output: 3
19
© 2020 TigerGraph. All Rights Reserved
Shortest Path in an Unweighted Graph
A
B
C
D
E
F
H
G
Short Path algorithm:
● Use breadth-first search
● Record how you got to each vertex
● Variation: return 1 shortest path or
all shortest paths?
A
A
A
A,B
A,C
A,B,E
A,B,E;
A,C,F
function: shortest_path_unweighted(A, H)
output: {A,B,E,H},{A,C,F,H}
● Side benefit: Also finds the shortest
path to other vertices along the way
● Improved version: Search
simultaneously from both source and
destination (bidirectional search)
20
© 2020 TigerGraph. All Rights Reserved
Shortest Path in a Weighted Graph
● Case 2: Weighted edges
○ Each edge has a numerical weight, which is the "cost" to traverse
that edge.
○ Weight could represent distance or elapsed time or cost
A
B
C
D
E
F
H
G
2
4
2
1
2
3
5
2
3
2
3
21
© 2020 TigerGraph. All Rights Reserved
Dijkstra's Algorithm for Shortest Path
● Finds a shortest distance or path from a source to every other
vertex.
● Works by assuming the worst case (infinite distance) and then
incrementally finding better (shorter) paths.
● Procedure:
○ Initialize every distance to ∞.
○ Use breadth-first search BUT
go in order of shortest distance.
○ Every time an edge reaches
a destination vertex, update
the shortest distance AND
the path to get there.
● More complex (slower) than unweighted shortest path.
A
B
C
D
E
F
H
G
2
4
2
1
2
3
5
2
3
2
3
22
© 2020 TigerGraph. All Rights Reserved
Dijkstra's Algorithm for Shortest Path
A
B
C
D
E
F
H
G
2
4
2
1
2
3
5
2
3
2
3
2,A
4,A
2,A
∞
∞
∞
∞
A
B
C
D
E
F
H
G
2
4
2
1
2
3
5
2
3
2
3
2,A
3,AD
2,A
4,AB
6,ADC
∞
∞
23
© 2020 TigerGraph. All Rights Reserved
Dijkstra's Algorithm for Shortest Path
A
B
C
D
E
F
H
G
2
4
2
1
2
3
5
2
3
2
3
2,A
3,AD
2,A
4,AB
6,ADC|ABE
7,ABE
9,ABE
A
B
C
D
E
F
H
G
2
4
2
1
2
3
5
2
3
2
3
2,A
3,AD
2,A
4,AB
6,ADC|ABE
7,ABE
8,ADCF|ABEF
function: shortest_path_weighted(A, H)
output: {A,D,C,F,H},{A,B,E,F,H}
24
© 2020 TigerGraph. All Rights Reserved
Review: Analytics with Graph Algorithms
● Graph Algorithms answer fundamental questions about
connected data
● Each algorithm in a library is tool in an analytics toolkit.
● Building Blocks for more complex business questions
● Some questions/algorithms are faster or slower than others
25
© 2020 TigerGraph. All Rights Reserved
Practical SW Issues with Graph Algorithms
Wish List:
● Algorithms are functions you can call with your application
● Run the algorithms in-database (don't export the data)
● Option to update the graph with the algorithm results
● Be able to modify/customize the algorithms
● Massively parallel processing to handle big graphs
26
© 2020 TigerGraph. All Rights Reserved
TigerGraph GSQL Graph Algorithm Library
✓ Call each algorithm as a GSQL
function or as a RESTful endpoint
✓ Run the algorithms in-database
(don't export the data)
✓ Option to update the graph with
the algorithm results
✓ Able to modify/customize the
algorithms. Turing-complete
language.
✓ Massively parallel processing to
handle big graphs
27
DEMO
GSQL Graph Algorithms in TigerGraph Cloud
28
© 2020 TigerGraph. All Rights Reserved
Real-World Example: Airline Routes
● Dataset: Global commercial airline routes from
openflights.org
○ 7,698 airports
○ 67,664 direct flight routes
● Unweighted search: find the route(s) from A to B with the
fewest stops, ignoring actual distance traveled
○ Simplifications: not considering actual flight schedules or which
airlines or prices
● Add weight: distance from city to city
○ BUT dataset doesn't have that info. Write a simple GSQL to
calculate the distance, based on locations of source and
destination, and add it to the graph data
● Weighted search: find the shortest route from A to B
29
© 2020 TigerGraph. All Rights Reserved
Enhancements
(Might or might not do, if we have time to develop and time to
demo)
● ALL the shortest routes (e.g., there might be multiple 1-stop
routes from Des Moines to Cleveland
● Find the Top K shortest routes
● Find routes only on a given airline
● Find multi-hop routes that don't change airlines
30
© 2020 TigerGraph. All Rights Reserved
Summary
31
1
4
3
Graph Algorithms - tools and building
blocks for analyzing graph data
GSQL Algorithm Library - runs
in-database, high-performance,
easy to read and modify
Shortest Path Algorithms - different
algorithms for weighted and
unweighted graphs
2 Learning To Use Algorithms - know what
problem they solve, pros and cons
Q&A
Please submit your questions via the Q&A tab in Zoom
32
© 2020 TigerGraph. All Rights Reserved
More Questions?
Join our Developer Forum
https://groups.google.com/a/opengsql.org/forum/#!forum/gsql-users
Sign up for our Developer Office Hours (every Thursday at 11 AM PST)
https://info.tigergraph.com/officehours
33
© 2020 TigerGraph. All Rights Reserved
Additional Resources
Start Free at TigerGraph Cloud Today!
https://www.tigergraph.com/cloud/
Test Drive Online Demo
https://www.tigergraph.com/demo
Download the Developer Edition
https://www.tigergraph.com/download/
Guru Scripts
https://github.com/tigergraph/ecosys/tree/master/guru_scripts
34
© 2020 TigerGraph. All Rights Reserved
Upcoming Graph Guru Events
35
Coming to Dallas, Houston, Austin, Seattle, San
Francisco… and Munich! More are in the works.
View all events and request your own here:
https://www.tigergraph.com/graphguruscomestoyou/
Graph Gurus 27: An In-Database Machine
Learning Solution For Real-Time Recommendations
https://info.tigergraph.com/graph-gurus-27
Thank You
36

More Related Content

What's hot (20)

PPTX
Deep dive into LangChain integration with Neo4j.pptx
TomazBratanic1
 
PDF
Policy gradient
Jie-Han Chen
 
PDF
Network flow problems
Dr Sandeep Kumar Poonia
 
PDF
Hands on Explainable Recommender Systems with Knowledge Graphs @ RecSys22
GiacomoBalloccu
 
PDF
GraphFrames: DataFrame-based graphs for Apache® Spark™
Databricks
 
PDF
Geospatial Data Analysis and Visualization in Python
Halfdan Rump
 
PDF
Graph Convolutional Neural Networks
신동 강
 
PPTX
Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering
SOYEON KIM
 
PPTX
AlexNet, VGG, GoogleNet, Resnet
Jungwon Kim
 
PDF
Matrix calculus
Sungbin Lim
 
PPTX
AI3391 Artificial intelligence Session 28 Resolution.pptx
Guru Nanak Technical Institutions
 
PDF
Latent Dirichlet Allocation
Sangwoo Mo
 
PDF
Past, Present & Future of Recommender Systems: An Industry Perspective
Justin Basilico
 
PPTX
Deep Natural Language Processing for Search Systems (sigir 2019 tutorial)
Weiwei Guo
 
PDF
Building a Knowledge Graph with Spark and NLP: How We Recommend Novel Drugs t...
Databricks
 
PDF
Predicting Influence and Communities Using Graph Algorithms
Databricks
 
PDF
Achieving Algorithmic Transparency with Shapley Additive Explanations (H2O Lo...
Sri Ambati
 
PDF
Graph Analyses with Python and NetworkX
Benjamin Bengfort
 
PDF
Optimizing Your Supply Chain with the Neo4j Graph
Neo4j
 
Deep dive into LangChain integration with Neo4j.pptx
TomazBratanic1
 
Policy gradient
Jie-Han Chen
 
Network flow problems
Dr Sandeep Kumar Poonia
 
Hands on Explainable Recommender Systems with Knowledge Graphs @ RecSys22
GiacomoBalloccu
 
GraphFrames: DataFrame-based graphs for Apache® Spark™
Databricks
 
Geospatial Data Analysis and Visualization in Python
Halfdan Rump
 
Graph Convolutional Neural Networks
신동 강
 
Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering
SOYEON KIM
 
AlexNet, VGG, GoogleNet, Resnet
Jungwon Kim
 
Matrix calculus
Sungbin Lim
 
AI3391 Artificial intelligence Session 28 Resolution.pptx
Guru Nanak Technical Institutions
 
Latent Dirichlet Allocation
Sangwoo Mo
 
Past, Present & Future of Recommender Systems: An Industry Perspective
Justin Basilico
 
Deep Natural Language Processing for Search Systems (sigir 2019 tutorial)
Weiwei Guo
 
Building a Knowledge Graph with Spark and NLP: How We Recommend Novel Drugs t...
Databricks
 
Predicting Influence and Communities Using Graph Algorithms
Databricks
 
Achieving Algorithmic Transparency with Shapley Additive Explanations (H2O Lo...
Sri Ambati
 
Graph Analyses with Python and NetworkX
Benjamin Bengfort
 
Optimizing Your Supply Chain with the Neo4j Graph
Neo4j
 

Similar to Graph Gurus Episode 26: Using Graph Algorithms for Advanced Analytics Part 1 (20)

PDF
Graph Gurus Episode 27: Using Graph Algorithms for Advanced Analytics Part 2
TigerGraph
 
PDF
Graph Gurus Episode 32: Using Graph Algorithms for Advanced Analytics Part 5
TigerGraph
 
PDF
Graph Gurus Episode 29: Using Graph Algorithms for Advanced Analytics Part 3
TigerGraph
 
PDF
Graph Analytics with Greenplum and Apache MADlib
VMware Tanzu
 
PDF
Graph Gurus Episode 7: Connecting the Dots in Real-Time: Deep Link Analysis w...
TigerGraph
 
PDF
Graph Gurus Episode 37: Modeling for Kaggle COVID-19 Dataset
TigerGraph
 
PDF
Shift Remote: AI: Smarter AI with analytical graph databases - Victor Lee (Ti...
Shift Conference
 
PDF
Graph Gurus Episode 5: Webinar PageRank
TigerGraph
 
PDF
Graph Gurus 15: Introducing TigerGraph 2.4
TigerGraph
 
PPTX
Apache Spark GraphX highlights.
Doug Needham
 
PDF
Graph Algorithms - Map-Reduce Graph Processing
Jason J Pulikkottil
 
PPT
An Introduction to Graph Databases
InfiniteGraph
 
PDF
What Is GDS and Neo4j’s GDS Library
Neo4j
 
PDF
Unit-10 Graphs .pdf
Yatru Harsha Hiski
 
PDF
GraphTour 2020 - Graphs & AI: A Path for Data Science
Neo4j
 
PPTX
Data Structure Graph DMZ #DMZone
Doug Needham
 
PPTX
Tiger graph 2021 corporate overview [read only]
ercan5
 
PPTX
Graph Algorithms
Ashwin Shiv
 
PPTX
Spanning Tree in data structure and .pptx
asimshahzad8611
 
PPTX
Dijkstra's algorithm presentation
Subid Biswas
 
Graph Gurus Episode 27: Using Graph Algorithms for Advanced Analytics Part 2
TigerGraph
 
Graph Gurus Episode 32: Using Graph Algorithms for Advanced Analytics Part 5
TigerGraph
 
Graph Gurus Episode 29: Using Graph Algorithms for Advanced Analytics Part 3
TigerGraph
 
Graph Analytics with Greenplum and Apache MADlib
VMware Tanzu
 
Graph Gurus Episode 7: Connecting the Dots in Real-Time: Deep Link Analysis w...
TigerGraph
 
Graph Gurus Episode 37: Modeling for Kaggle COVID-19 Dataset
TigerGraph
 
Shift Remote: AI: Smarter AI with analytical graph databases - Victor Lee (Ti...
Shift Conference
 
Graph Gurus Episode 5: Webinar PageRank
TigerGraph
 
Graph Gurus 15: Introducing TigerGraph 2.4
TigerGraph
 
Apache Spark GraphX highlights.
Doug Needham
 
Graph Algorithms - Map-Reduce Graph Processing
Jason J Pulikkottil
 
An Introduction to Graph Databases
InfiniteGraph
 
What Is GDS and Neo4j’s GDS Library
Neo4j
 
Unit-10 Graphs .pdf
Yatru Harsha Hiski
 
GraphTour 2020 - Graphs & AI: A Path for Data Science
Neo4j
 
Data Structure Graph DMZ #DMZone
Doug Needham
 
Tiger graph 2021 corporate overview [read only]
ercan5
 
Graph Algorithms
Ashwin Shiv
 
Spanning Tree in data structure and .pptx
asimshahzad8611
 
Dijkstra's algorithm presentation
Subid Biswas
 
Ad

More from TigerGraph (20)

PDF
MAXIMIZING THE VALUE OF SCIENTIFIC INFORMATION TO ACCELERATE INNOVATION
TigerGraph
 
PDF
Better Together: How Graph database enables easy data integration with Spark ...
TigerGraph
 
PDF
Building an accurate understanding of consumers based on real-world signals
TigerGraph
 
PDF
Care Intervention Assistant - Omaha Clinical Data Information System
TigerGraph
 
PDF
Correspondent Banking Networks
TigerGraph
 
PDF
Delivering Large Scale Real-time Graph Analytics with Dell Infrastructure and...
TigerGraph
 
PDF
Deploying an End-to-End TigerGraph Enterprise Architecture using Kafka, Maria...
TigerGraph
 
PDF
Fraud Detection and Compliance with Graph Learning
TigerGraph
 
PDF
Fraudulent credit card cash-out detection On Graphs
TigerGraph
 
PDF
FROM DATAFRAMES TO GRAPH Data Science with pyTigerGraph
TigerGraph
 
PDF
Customer Experience Management
TigerGraph
 
PDF
Graph+AI for Fin. Services
TigerGraph
 
PDF
Davraz - A graph visualization and exploration software.
TigerGraph
 
PDF
Plume - A Code Property Graph Extraction and Analysis Library
TigerGraph
 
PDF
TigerGraph.js
TigerGraph
 
PDF
GRAPHS FOR THE FUTURE ENERGY SYSTEMS
TigerGraph
 
PDF
Hardware Accelerated Machine Learning Solution for Detecting Fraud and Money ...
TigerGraph
 
PDF
How to Build An AI Based Customer Data Platform: Learn the design patterns fo...
TigerGraph
 
PDF
Machine Learning Feature Design with TigerGraph 3.0 No-Code GUI
TigerGraph
 
PDF
Recommendation Engine with In-Database Machine Learning
TigerGraph
 
MAXIMIZING THE VALUE OF SCIENTIFIC INFORMATION TO ACCELERATE INNOVATION
TigerGraph
 
Better Together: How Graph database enables easy data integration with Spark ...
TigerGraph
 
Building an accurate understanding of consumers based on real-world signals
TigerGraph
 
Care Intervention Assistant - Omaha Clinical Data Information System
TigerGraph
 
Correspondent Banking Networks
TigerGraph
 
Delivering Large Scale Real-time Graph Analytics with Dell Infrastructure and...
TigerGraph
 
Deploying an End-to-End TigerGraph Enterprise Architecture using Kafka, Maria...
TigerGraph
 
Fraud Detection and Compliance with Graph Learning
TigerGraph
 
Fraudulent credit card cash-out detection On Graphs
TigerGraph
 
FROM DATAFRAMES TO GRAPH Data Science with pyTigerGraph
TigerGraph
 
Customer Experience Management
TigerGraph
 
Graph+AI for Fin. Services
TigerGraph
 
Davraz - A graph visualization and exploration software.
TigerGraph
 
Plume - A Code Property Graph Extraction and Analysis Library
TigerGraph
 
TigerGraph.js
TigerGraph
 
GRAPHS FOR THE FUTURE ENERGY SYSTEMS
TigerGraph
 
Hardware Accelerated Machine Learning Solution for Detecting Fraud and Money ...
TigerGraph
 
How to Build An AI Based Customer Data Platform: Learn the design patterns fo...
TigerGraph
 
Machine Learning Feature Design with TigerGraph 3.0 No-Code GUI
TigerGraph
 
Recommendation Engine with In-Database Machine Learning
TigerGraph
 
Ad

Recently uploaded (20)

PDF
Unlocking Insights: Introducing i-Metrics Asia-Pacific Corporation and Strate...
Janette Toral
 
PPTX
Presentation.pptx hhgihyugyygyijguuffddfffffff
abhiruppal2007
 
PPTX
Comparative Study of ML Techniques for RealTime Credit Card Fraud Detection S...
Debolina Ghosh
 
PDF
GOOGLE ADS (1).pdf THE ULTIMATE GUIDE TO
kushalkeshwanisou
 
PDF
Datàaaaaaaaaaengineeeeeeeeeeeeeeeeeeeeeee
juadsr96
 
PPTX
MENU-DRIVEN PROGRAM ON ARUNACHAL PRADESH.pptx
manvi200807
 
DOCX
🧩 1. Solvent R-WPS Office work scientific
NohaSalah45
 
PDF
A Web Repository System for Data Mining in Drug Discovery
IJDKP
 
PDF
Business Automation Solution with Excel 1.1.pdf
Vivek Kedia
 
PPTX
Data Analytics using sparkabcdefghi.pptx
KarkuzhaliS3
 
DOCX
COT Feb 19, 2025 DLLgvbbnnjjjjjj_Digestive System and its Functions_PISA_CBA....
kayemorales1105
 
PPTX
在线购买英国本科毕业证苏格兰皇家音乐学院水印成绩单RSAMD学费发票
Taqyea
 
PDF
Exploiting the Low Volatility Anomaly: A Low Beta Model Portfolio for Risk-Ad...
Bradley Norbom, CFA
 
PDF
TCU EVALUATION FACULTY TCU Taguig City 1st Semester 2017-2018
MELJUN CORTES
 
PDF
Blood pressure (3).pdfbdbsbsbhshshshhdhdhshshs
hernandezemma379
 
PPTX
covid 19 data analysis updates in our municipality
RhuAyungon1
 
PDF
5- Global Demography Concepts _ Population Pyramids .pdf
pkhadka824
 
PPTX
How to Add Columns and Rows in an R Data Frame
subhashenia
 
PDF
Loading Data into Snowflake (Bulk & Stream)
Accentfuture
 
PPTX
Monitoring Improvement ( Pomalaa Branch).pptx
fajarkunee
 
Unlocking Insights: Introducing i-Metrics Asia-Pacific Corporation and Strate...
Janette Toral
 
Presentation.pptx hhgihyugyygyijguuffddfffffff
abhiruppal2007
 
Comparative Study of ML Techniques for RealTime Credit Card Fraud Detection S...
Debolina Ghosh
 
GOOGLE ADS (1).pdf THE ULTIMATE GUIDE TO
kushalkeshwanisou
 
Datàaaaaaaaaaengineeeeeeeeeeeeeeeeeeeeeee
juadsr96
 
MENU-DRIVEN PROGRAM ON ARUNACHAL PRADESH.pptx
manvi200807
 
🧩 1. Solvent R-WPS Office work scientific
NohaSalah45
 
A Web Repository System for Data Mining in Drug Discovery
IJDKP
 
Business Automation Solution with Excel 1.1.pdf
Vivek Kedia
 
Data Analytics using sparkabcdefghi.pptx
KarkuzhaliS3
 
COT Feb 19, 2025 DLLgvbbnnjjjjjj_Digestive System and its Functions_PISA_CBA....
kayemorales1105
 
在线购买英国本科毕业证苏格兰皇家音乐学院水印成绩单RSAMD学费发票
Taqyea
 
Exploiting the Low Volatility Anomaly: A Low Beta Model Portfolio for Risk-Ad...
Bradley Norbom, CFA
 
TCU EVALUATION FACULTY TCU Taguig City 1st Semester 2017-2018
MELJUN CORTES
 
Blood pressure (3).pdfbdbsbsbhshshshhdhdhshshs
hernandezemma379
 
covid 19 data analysis updates in our municipality
RhuAyungon1
 
5- Global Demography Concepts _ Population Pyramids .pdf
pkhadka824
 
How to Add Columns and Rows in an R Data Frame
subhashenia
 
Loading Data into Snowflake (Bulk & Stream)
Accentfuture
 
Monitoring Improvement ( Pomalaa Branch).pptx
fajarkunee
 

Graph Gurus Episode 26: Using Graph Algorithms for Advanced Analytics Part 1

  • 1. Graph Gurus 26 Using Graph Algorithms for Advanced Analytics Part 1 - Shortest Paths 1
  • 2. © 2020 TigerGraph. All Rights Reserved Some Housekeeping Items ● Although your phone is muted we do want to answer your questions - submit your questions at any time using the Q&A tab in the menu ● The webinar is being recorded and will uploaded to our website shortly (https://www.tigergraph.com/webinars-and-events/) and the URL will be emailed you ● If you have issues with Zoom please contact the panelists via chat 2
  • 3. © 2020 TigerGraph. All Rights Reserved Today's Presenter 3 Victor Lee Head of Product Strategy ● BS in Electrical Engineering and Computer Science from UC Berkeley, MS in Electrical Engineering from Stanford University ● PhD in Computer Science from Kent State University focused on graph data mining ● 20+ years in tech industry
  • 4. © 2020 TigerGraph. All Rights Reserved Move Faster with TigerGraph Cloud Built for agile teams who would rather build innovative applications than procure hardware or configure and manage databases 4
  • 5. © 2020 TigerGraph. All Rights Reserved Today’s Outline 5 1 3 2 Graph Analytics - uses and benefits Shortest Path Algorithms How to select and use the right one What are Graph Algorithms? Overview of different types 4 Demo GSQL Path Algorithms
  • 6. © 2020 TigerGraph. All Rights Reserved Data-Driven Business Collect more data. See more. Understand more. Decide better. 6
  • 7. © 2020 TigerGraph. All Rights Reserved Analyzing Connected Data ● All data processing is "connecting data" A + B = C ● Linking datasets together enriches your knowledge. ● Statistical Analysis and Machine Learning are about correlation: seeing how one set of things relates to another set of things. ⇒ Graphs are an ideal way to organize and analyze complex data. 7 Online sales In-store salesStore Demographics Web analytics
  • 8. © 2020 TigerGraph. All Rights Reserved 8 What is a Graph? ● A Graph is a collection of Vertices and Vertex-to-Vertex Connections, called Edges ● Each Vertex (sometimes referred to as a node) and each Edge has a type and characteristic properties. ● Natural storage model for modeling data and its interconnections or relationships ● Natural model for representing transactions ● Natural model for knowledge/analysis/ learning – through following and studying connections Matt Customer Chris Customer John Customer Bob Customer Stephanie Partner Jack Sales Dan Partner Tom Sales W orkswith Friends w ith Partners with W orkswith Sells to Friends with Friends with Knows Product A Product B Owns Loves Bought Resells Property Graph
  • 9. © 2020 TigerGraph. All Rights Reserved Why Are Graphs Important for Business? 9 100% Annual Growth in Graph through 2022 Graph Named Trend No. 5 on Gartner’s Top 10 Data and Analytics Technology Trends for 2019 What is graph analytics? A set of analytic techniques that allows for the exploration of relationships between entities of interest such as organizations, people and transactions. What’s unique about graph? Graph data stores can efficiently model, explore and query data with complex interrelationships across data silos. Why is graph one of the top 10 trends for data and analytics? Graph analytics is growing due to the need to ask complex questions across complex data, which is not always practical or even possible at scale using SQL queries.
  • 10. © 2020 TigerGraph. All Rights Reserved Graph algorithms are functions for measuring characteristics of graphs, vertices, or relationships. A graph algorithm library serves as a toolkit and as building blocks for analyzing your data. Specialized functions Combine to make something greater Graph Algorithms 10
  • 11. © 2020 TigerGraph. All Rights Reserved GSQL Graph Algorithm Library ● Written in GSQL - high-level, parallelized ● Open-source, user-extensible ● Well-documented 11 docs.tigergraph.com/graph-algorithm-library
  • 12. © 2020 TigerGraph. All Rights Reserved Example Questions/Analyses for Graph Algorithms Which entity is most centrally located? ● For delivery logistics or greatest visibility ● Closeness Centrality, Betweenness Centrality algorithms 12 How much influence does this entity exert over the others? ● For market penetration & buyer influence ● PageRank algorithm Which entity has similar relationships to this entity? ● For grouping customers, products, etc. ● Cosine Similarity, SimRank, RoleSim algorithms What are the natural community groupings in the graph? ● For partitioning risk groups, workgroups, product offerings, etc. ● Community Detection, MinCut algorithms
  • 13. © 2020 TigerGraph. All Rights Reserved Picking the Right Algorithm for the Job To become a master designer: ● Learn what each tool can do ● Learn to combine building blocks to solve complex issues This webinar series is designed to show you what each tool can do. We'll also show you some application examples. 13
  • 14. © 2020 TigerGraph. All Rights Reserved Case Study: Finding Regions of Influence Step 1: Hub Detection/Ranking - Finding the Influencers 14 Additional details at https://www.tigergraph.com/solutions/product-service-marketing/ Source: Pharmaceutical/Life Science company seeking the most influential prescribers.
  • 15. © 2020 TigerGraph. All Rights Reserved Case Study: Finding Regions of Influence Step 1: Community Detection 15 Additional details at https://www.tigergraph.com/solutions/product-service-marketing/
  • 16. © 2020 TigerGraph. All Rights Reserved Some Types of Graph Algorithms ● Search ● Path Finding & Analytics ● Centrality / Ranking ● Clustering / Community Detection ● Similarity ● Classification 16
  • 17. © 2020 TigerGraph. All Rights Reserved Path Analytics A B C D E F H G Is there a path from A to H? ● How many paths? ● What is the shortest or cheapest path? ● What is the degree of separation (number of hops)? ○ The smaller the degree, the greater the knowledge/influence/trust of the other ○ Likelihood of encountering one another ○ Referral for jobs, etc. ● Games: ○ Kevin Bacon number: https://oracleofbacon.org/ ○ Erdős number 17
  • 18. © 2020 TigerGraph. All Rights Reserved Common Path Questions ● What is the shortest distance from vertex A to vertex B? ● What is a shortest path (sequence of vertices) from A to B? ● Case 1: Unweighted edges ○ We only care if a relationship exists, not how strong or long it is A B C D E F H G 18
  • 19. © 2020 TigerGraph. All Rights Reserved Shortest Distance in an Unweighted Graph A B C D E F H G Short Distance algorithm: ● Count levels in breadth-first search ● Side benefit: Also finds the shortest distance to other vertices along the way 1 1 1 2 2 3 3 function: shortest_distance_unweighted(A, H) output: 3 19
  • 20. © 2020 TigerGraph. All Rights Reserved Shortest Path in an Unweighted Graph A B C D E F H G Short Path algorithm: ● Use breadth-first search ● Record how you got to each vertex ● Variation: return 1 shortest path or all shortest paths? A A A A,B A,C A,B,E A,B,E; A,C,F function: shortest_path_unweighted(A, H) output: {A,B,E,H},{A,C,F,H} ● Side benefit: Also finds the shortest path to other vertices along the way ● Improved version: Search simultaneously from both source and destination (bidirectional search) 20
  • 21. © 2020 TigerGraph. All Rights Reserved Shortest Path in a Weighted Graph ● Case 2: Weighted edges ○ Each edge has a numerical weight, which is the "cost" to traverse that edge. ○ Weight could represent distance or elapsed time or cost A B C D E F H G 2 4 2 1 2 3 5 2 3 2 3 21
  • 22. © 2020 TigerGraph. All Rights Reserved Dijkstra's Algorithm for Shortest Path ● Finds a shortest distance or path from a source to every other vertex. ● Works by assuming the worst case (infinite distance) and then incrementally finding better (shorter) paths. ● Procedure: ○ Initialize every distance to ∞. ○ Use breadth-first search BUT go in order of shortest distance. ○ Every time an edge reaches a destination vertex, update the shortest distance AND the path to get there. ● More complex (slower) than unweighted shortest path. A B C D E F H G 2 4 2 1 2 3 5 2 3 2 3 22
  • 23. © 2020 TigerGraph. All Rights Reserved Dijkstra's Algorithm for Shortest Path A B C D E F H G 2 4 2 1 2 3 5 2 3 2 3 2,A 4,A 2,A ∞ ∞ ∞ ∞ A B C D E F H G 2 4 2 1 2 3 5 2 3 2 3 2,A 3,AD 2,A 4,AB 6,ADC ∞ ∞ 23
  • 24. © 2020 TigerGraph. All Rights Reserved Dijkstra's Algorithm for Shortest Path A B C D E F H G 2 4 2 1 2 3 5 2 3 2 3 2,A 3,AD 2,A 4,AB 6,ADC|ABE 7,ABE 9,ABE A B C D E F H G 2 4 2 1 2 3 5 2 3 2 3 2,A 3,AD 2,A 4,AB 6,ADC|ABE 7,ABE 8,ADCF|ABEF function: shortest_path_weighted(A, H) output: {A,D,C,F,H},{A,B,E,F,H} 24
  • 25. © 2020 TigerGraph. All Rights Reserved Review: Analytics with Graph Algorithms ● Graph Algorithms answer fundamental questions about connected data ● Each algorithm in a library is tool in an analytics toolkit. ● Building Blocks for more complex business questions ● Some questions/algorithms are faster or slower than others 25
  • 26. © 2020 TigerGraph. All Rights Reserved Practical SW Issues with Graph Algorithms Wish List: ● Algorithms are functions you can call with your application ● Run the algorithms in-database (don't export the data) ● Option to update the graph with the algorithm results ● Be able to modify/customize the algorithms ● Massively parallel processing to handle big graphs 26
  • 27. © 2020 TigerGraph. All Rights Reserved TigerGraph GSQL Graph Algorithm Library ✓ Call each algorithm as a GSQL function or as a RESTful endpoint ✓ Run the algorithms in-database (don't export the data) ✓ Option to update the graph with the algorithm results ✓ Able to modify/customize the algorithms. Turing-complete language. ✓ Massively parallel processing to handle big graphs 27
  • 28. DEMO GSQL Graph Algorithms in TigerGraph Cloud 28
  • 29. © 2020 TigerGraph. All Rights Reserved Real-World Example: Airline Routes ● Dataset: Global commercial airline routes from openflights.org ○ 7,698 airports ○ 67,664 direct flight routes ● Unweighted search: find the route(s) from A to B with the fewest stops, ignoring actual distance traveled ○ Simplifications: not considering actual flight schedules or which airlines or prices ● Add weight: distance from city to city ○ BUT dataset doesn't have that info. Write a simple GSQL to calculate the distance, based on locations of source and destination, and add it to the graph data ● Weighted search: find the shortest route from A to B 29
  • 30. © 2020 TigerGraph. All Rights Reserved Enhancements (Might or might not do, if we have time to develop and time to demo) ● ALL the shortest routes (e.g., there might be multiple 1-stop routes from Des Moines to Cleveland ● Find the Top K shortest routes ● Find routes only on a given airline ● Find multi-hop routes that don't change airlines 30
  • 31. © 2020 TigerGraph. All Rights Reserved Summary 31 1 4 3 Graph Algorithms - tools and building blocks for analyzing graph data GSQL Algorithm Library - runs in-database, high-performance, easy to read and modify Shortest Path Algorithms - different algorithms for weighted and unweighted graphs 2 Learning To Use Algorithms - know what problem they solve, pros and cons
  • 32. Q&A Please submit your questions via the Q&A tab in Zoom 32
  • 33. © 2020 TigerGraph. All Rights Reserved More Questions? Join our Developer Forum https://groups.google.com/a/opengsql.org/forum/#!forum/gsql-users Sign up for our Developer Office Hours (every Thursday at 11 AM PST) https://info.tigergraph.com/officehours 33
  • 34. © 2020 TigerGraph. All Rights Reserved Additional Resources Start Free at TigerGraph Cloud Today! https://www.tigergraph.com/cloud/ Test Drive Online Demo https://www.tigergraph.com/demo Download the Developer Edition https://www.tigergraph.com/download/ Guru Scripts https://github.com/tigergraph/ecosys/tree/master/guru_scripts 34
  • 35. © 2020 TigerGraph. All Rights Reserved Upcoming Graph Guru Events 35 Coming to Dallas, Houston, Austin, Seattle, San Francisco… and Munich! More are in the works. View all events and request your own here: https://www.tigergraph.com/graphguruscomestoyou/ Graph Gurus 27: An In-Database Machine Learning Solution For Real-Time Recommendations https://info.tigergraph.com/graph-gurus-27