Skip to main content
Skip table of contents

10. Algorithms

In this Session…

Before you begin…

  • Using Algorithms to understand paths and clusters in the graph.

  • Using Trace Neighbor.

To follow along, download:
HowTo_10_START.graphxr
HowTo_10_START.graphxrsnapshots


Slide

1

How To GraphXR 10. Algorithms

2

Before You Begin…

Ideally, you’ll have worked through Module 9. Time Series. If you’re starting here, and you want to follow along, you’ll need to:

  • Log in to GraphXR, create a Project, and open its graph space.

  • Download starting data (HowTo_10_START.graphxr) for this module and drag and drop it onto the graph space. 

  • Optionally:

3

Open the Algorithm panel. Graph algorithms help find and highlight paths, measure connectedness, and calculate measures of sub-grouping in large graph networks. to run a variety of commonly used graph algorithms against your data. 

4

Algorithms are organized in Path Finding, Centrality, and Community Detection tabs. 

5

Path Finding finds and selects the shortest path between two sets of nodes. Let’s select a few Episodes nodes and find the paths connecting them to selected House nodes.

6

Select starting Episode nodes and click Add to Start

7

Select ending House nodes and click Add to End. Now click Trace Path..

6

With a complicated graph it can be hard to see the path. You can click the Spotlight Path toggle to see only the nodes and edges involved in the path.

7

Click Un-spotlight Path to see the entire graph again.
TIP: You can Tag the spotlit path nodes or take a Snapshot.   

8

The nodes and edges that make up the path are selected. To see only those nodes and edges click the Spotlight Path toggle.

9

You can Tag the spotlit path nodes, take a snapshot, or save a view.
Click the  Un-spotlight Path toggle to see the entire graph again.

10

To find a path between any two nodes, simply select the two nodes and in the right-click menu choose Find Path.

11

To isolate this selected path you can use the right-click menu Select=>Invert and then Actions=>Hide. Or, open the Algorithm=>Path Finding tab to spotlight the path.

12

A brief aside: the Trace Neighbor toolbar icon provides another way to explore paths from selected nodes (but not to a specified set of ending nodes). Select one or more nodes and click Trace Neighbor.

13

The slider control shows the number of hops in the graph. Choose the number of path hops to highlight (in this case, try 2).

14

To isolate the highlighted path, click the Select Visible icon, then click Inverse and Hide Selected to hide the data not on the highlighted path.
Now let’s return to the Algorithm panel and look at Centrality algorithms.

15

Centrality algorithms measure the impact of the nodes in a graph in various specific ways. Simply click to run, and a property and value for that algorithm will be added to every node in the graph.
Degree counts the number of relationships a node has.
PageRank estimates a node’s importance based on its linked neighbors. 
Betweenness measures the number of shortest paths that run through a node.
Closeness calculates which nodes have the shortest path to all other nodes.

16

Open an information window or a Table to see the new properties. To edit and export results, display an Enhanced Table or click Export Excel or Export CSV.

17

Community Detection algorithms are used to find strongly connected subgraphs (or clusters) in larger graphs. The commonly used Connected Component, Strong Connected Component, Louvain and Label Propagation algorithms are available.
Connected Component finds groups where each node is reachable from every other node in the group.
Strong Connected Component finds groups where each node is reachable from every other node in the group, following a direction of relationships.
Louvain maximizes “accuracy” of groups by comparing relationship weights to a defined estimate.
Label Propagation infers clusters by spreading labels based on neighborhood majorities.

18

Again, click to run. A corresponding property and value is added to every node in the graph. Open a table or an information widow to view the results.

19

For a detailed overview of how these algorithms work and how to use them appropriately, refer to https://neo4j.com/lp/book-graph-algorithms-ms/ .

Next, in Module 11. Editing, we’ll delve into how to add and edit graph data. 

Next Steps…

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.