Top Banner
14, Selventa. All Rights Reserved. Scalable Networks with Graph-tool April 2014
7

© 2014, Selventa. All Rights Reserved. Scalable Networks with Graph-tool April 2014.

Dec 26, 2015

Download

Documents

Gloria Greer
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: © 2014, Selventa. All Rights Reserved. Scalable Networks with Graph-tool April 2014.

© 2014, Selventa. All Rights Reserved.

Scalable Networks with Graph-tool

April 2014

Page 2: © 2014, Selventa. All Rights Reserved. Scalable Networks with Graph-tool April 2014.

© 2014, Selventa. All Rights Reserved.

Scalable Networks with Graph-tool

Page 3: © 2014, Selventa. All Rights Reserved. Scalable Networks with Graph-tool April 2014.

© 2014, Selventa. All Rights Reserved. 3

What is graph-tool?

Page 4: © 2014, Selventa. All Rights Reserved. Scalable Networks with Graph-tool April 2014.

© 2014, Selventa. All Rights Reserved. 4

What is graph-tool?

• A Python library– E.g.:

>>> g = Graph(directed=False)

• Innards written in C/C++– Efficient use of memory– Excellent speed on consumer-grade hardware– Leverages multi-core capabilities through OpenMP

• Features– Lots of built-in algorithms (50+)– Does input/output in GraphML, Graphviz DOT, and GML– Allow “on-the-fly” filtering of graph components

Page 5: © 2014, Selventa. All Rights Reserved. Scalable Networks with Graph-tool April 2014.

© 2014, Selventa. All Rights Reserved. 5

Memory Estimates

Page 6: © 2014, Selventa. All Rights Reserved. Scalable Networks with Graph-tool April 2014.

© 2014, Selventa. All Rights Reserved. 6

How does it compare?

• Using the BEL large corpus for reference– 100k vertices– 160k edges

• In Java…– Using the popular TinkerPop graph stack– 360 MB is used

• In Python…– Using graph-tool– 55 MB is used

Page 7: © 2014, Selventa. All Rights Reserved. Scalable Networks with Graph-tool April 2014.

© 2014, Selventa. All Rights Reserved. 7

Filtering Example

• “On-the-fly” filtering of graphs is easy!– E.g.:

>>> vfilter = g.new_vertex_filter(’bool’)>>> for v in g.vertices():... # include vertex ‘v’... vfilter[v] = True... # alternatively, exclude with False...>>> g.set_vertex_filter(vfilter)>>> # clear previous filter>>> g.set_vertex_filter(None)