Comments (3)
Can you make the example complete? We don't have the data files that you are loading.
Ideally, make an example that does not rely on any data files. If not possible, please provide the data files.
from python-igraph.
@szhorvat
the pgp.xml download from https://networks.skewed.de/net/pgp_strong/files/pgp_strong.xml.zst,
the escorts download from https://networks.skewed.de/net/escorts/files/escorts.xml.zst.
#!/bin/env python
from igraph import *
import graph_tool.all as gt
import timeit
gt1 = gt.load_graph("pgp.xml")
ut1 = gt.load_graph("escorts.xml")
g = Graph.from_graph_tool(gt1)
u = Graph.from_graph_tool(ut1)
if __name__ == "__main__":
print("Profiling shortest path")
print("=======================")
print()
n=1000
print(timeit.timeit("u.shortest_paths([u.vs[0]])", setup="from __main__ import u", number=n)/n)
print()
print("Profiling clustering")
print("==================")
print()
n=100
print(timeit.timeit("u.transitivity_undirected()", setup="from __main__ import u", number=n)/n)
print()
print("Profiling PageRank")
print("==================")
print()
n=100
print(timeit.timeit("g.pagerank(damping=0.85)", setup="from __main__ import g", number=n)/n)
print()
print("Profiling k-core")
print("================")
print()
n=1000
print(timeit.timeit("u.coreness(mode='all')", setup="from __main__ import u", number=n)/n)
print()
print("Profiling minimum spanning tree")
print("===============================")
print()
n=1000
print(timeit.timeit("u.spanning_tree()", setup="from __main__ import u", number=n)/n)
print()
print("Profiling betweenness")
print("=====================")
print()
n=3
print(timeit.timeit("g.betweenness()", setup="from __main__ import g", number=n)/n)
print(timeit.timeit("g.edge_betweenness()", setup="from __main__ import g", number=n)/n)
from python-igraph.
I'll take a look, stay tuned.
from python-igraph.
Related Issues (20)
- Expose invalidate_cache()
- is_bigraphical should not have an option for self-loops
- Undirected multigraph edges are filled polygons in Matplotlib HOT 4
- Online doc pages should have analytics HOT 1
- Lazy load matplotlib to avoid import locks HOT 4
- Handling of neighbouring vertices in vertex connectivity calculations not properly documented HOT 1
- Update platforms wheels are being created for HOT 2
- Clarify documentation of get_shortest_path
- Expose igraph_from_prufer() HOT 3
- Matplotlib backend: 'diamond' shape is too small, edges do not connect to it HOT 4
- Tutorial makes the impression that `bbox` option should work with Matplotlib HOT 2
- Tables in the tutorial should wrap text HOT 3
- `vertex_color` as tuple of RGB doesn't work HOT 2
- fails to build with clang 17.0.6 in Termux HOT 4
- Add C argument prefixattr to Python interface of write_graphml HOT 2
- In version 0.10.5 or later, `ax.texts` is empty.
- Is it possible to have the global/local efficiency calculation function in the python-iGraph version?
- Lazy load matplotlib because importing it is slow and not core to using igrpah HOT 1
- Feature Request: Object Graph Model HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-igraph.