Dear all,
I have a bipartite graph, directed and with weightened edges. It is very
large, I believe 36k nodes and 52k edges. I am trying to make a projection
of it, but I could not find any function or way to do so with graph-tool.
Is there any way I am not aware of? If there is no current way, where would
you recommend try with such a big graph? I am currently trying to run this
on a 8gb RAM 2012 macbook pro 15` (2.2 ghz or something like that).
I started of from (1) Gephi plugin (
https://marketplace.gephi.org/plugin/multimode-networks-transformations-2/),
which after running for a couple hours almost froze my computer and output
no graph (I had to force quit it). My second attempt was (and is) on igraph
( http://igraph.org/python/doc/igraph.Graph-class.html#bipartite_projection
)
I came across this post:
http://stackoverflow.com/questions/606516/python-graph-library
And read about graph-tool and how efficient it is compared to the igraph
and networkx (which I was about to try but given up when I saw the time
table).
Thank you for your attention,
Hi,
I am trying to read the graphml output of graph-tool's graphml using
networkx.
https://github.com/networkx/networkx/issues/843
Unfortunately this does not work with any of the vector_* type property maps
which graph-tool uses. Have you encountered this issue before?
It seems the right thing to do might be to extend your graphml to hold the
vector_* attributes as detailed:
http://graphml.graphdrawing.org/primer/graphml-primer.html#EXT
Is there some reason why it was done the way it is? How do you manage
read/writing graphml data to other tools?
In the meantime, it might be possible to hack some read support for
graph-tool's xml into networkx. To this end, could you please advise how to
parse the 'key1' data (should be two floats)
<node id="n1">
<data key="key0">6</data>
<data key="key1">0x1.5c71d0cb8d943p+3, 0x1.70db7f4083655p+3</data>
</node>
thanks
-
--
View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com…
Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.
Hi
New to the graph-tool. Build it from src on Fedora 16 (64) . Built with
cairomm enabled . Try to run as per the quick start , however when
executing
graph_draw(g, vertex_text=g.vertex_index, vertex_font_size=18,
... output_size=(200, 200), output="two-nodes.pdf")
i get undefined symbol
_ZN5Cairo7ContextC1EP6_cairob
However the symbol above is defined in : libcairomm-1.0.so see below nm
command results
nm /usr/local/lib/libcairomm-1.0.so | grep -i _ZN5Cairo7ContextC1EP6_cairob
0000000000014b90 T _ZN5Cairo7ContextC1EP6_cairob
Interestingly the library libgraph_tool_draw.so has indeed have the
undefined symbol
U _ZN5Cairo7ContextC1EP6_cairob
but does not depend on the cairomm libarary - see the ldd output . unless
the library is dynamically load i do not understand why
Any advise appreciated-
regards Sasho
ldd
/usr/local/lib/python2.7/site-packages/graph_tool/draw/libgraph_tool_draw.so
linux-vdso.so.1 => (0x00007fffc46da000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f99fd6cd000)
libpython2.7.so.1.0 => /usr/lib64/libpython2.7.so.1.0 (0x00007f99fd30e000)
libboost_iostreams.so.1.49.0 => /usr/local/lib/libboost_iostreams.so.1.49.0
(0x00007f99fd0f6000)
libboost_python.so.1.49.0 => /usr/local/lib/libboost_python.so.1.49.0
(0x00007f99fceaa000)
libboost_regex.so.1.49.0 => /usr/local/lib/libboost_regex.so.1.49.0
(0x00007f99fcbc8000)
libCGAL.so.9 => /usr/local/lib/libCGAL.so.9 (0x00007f99fc9a5000)
libexpat.so.0 => /usr/local/lib/libexpat.so.0 (0x00007f99fc77c000)
libbz2.so.1 => /lib64/libbz2.so.1 (0x00007f99fc54d000)
libm.so.6 => /lib64/libm.so.6 (0x00007f99fc2c9000)
libc.so.6 => /lib64/libc.so.6 (0x00007f99fbf11000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f99fbcfb000)
/lib64/ld-linux-x86-64.so.2 (0x00000030cea00000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f99fbadf000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f99fb8db000)
libutil.so.1 => /lib64/libutil.so.1 (0x00007f99fb6d7000)
libz.so.1 => /lib64/libz.so.1 (0x00007f99fb4c0000)
librt.so.1 => /lib64/librt.so.1 (0x00007f99fb2b8000)
libgmpxx.so.4 => /usr/lib64/libgmpxx.so.4 (0x00007f99fb0b3000)
libboost_thread.so.1.49.0 => /usr/local/lib/libboost_thread.so.1.49.0
(0x00007f99fae98000)
libgmp.so.3 => /usr/lib64/libgmp.so.3 (0x00007f99fac41000)
--
View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com…
Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.
Hey,
I'm a researcher without much experience in creating good graph algorithm
implementations.
I'm blown away with how much faster some algorithms are in C++ (for instance
Dijkstra's shortest path) when compared to the implementation in python or
matlab.
Is there any chance you could create a tutorial of how you made the python
interface to C++ code?
Also as far as I can tell this is the best graph library out there, but it's
relatively hard to install. As a result people like me are using inferior
libraries for algorithms and visualization. Do you think you could work on
making your library easier to install, or at least providing more
instructions? I work with both Windows and Mac OS X, and I wasn't able to
install your library on either.
--
View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com…
Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.
I go the initial examples going in an IPython Notebook with no problem, looks
great!
The SIRS example, and the Price network I'd be happy to post the Gists of
them at github. since so many are now using IPython notebooks for analysis.
In the examples there are none with hover labels on the resulting plots.
In doing visual exploration it is way helpful to be able to see the
properties of a point in a cluster.. The pretty graphs alone are not so
helpful?
I'm sure it should be obvious but I am new to graph analysis...
--
View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com…
Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.
I'm packaging graph-tool for RHEL. I'd like to contribute the spec for
distribution so that your users can easily build packages on Red Hat
systems, and you can offer them for distribution if you choose to do so.
I did notice a couple of problems while packaging.
First, your build scripts appear to install into the general library
path(distutils.sysconfig.get_python_lib()) when it should install to the
platform-dependent library path
(distutils.sysconfig.get_python_lib(1)). According to the manual, I
believe you should be using pyexecdir rather than pythondir.
http://www.gnu.org/software/automake/manual/html_node/Python.html
Second, numpy headers appear to be included incorrectly.
>>> print numpy.get_include.__doc__
Return the directory that contains the NumPy \*.h header files.
Extension modules that need to compile against NumPy should use
this
function to locate the appropriate include directory.
$ python -c 'import numpy; print "-I" + numpy.get_include()'
-I/usr/lib64/python2.7/site-packages/numpy/core/include
However, arrayobject.h is included directly where the correct path
should be numpy/arrayobject.h. Because the headers don't include that
prefix, the spec file includes a static path for the headers.
Similarly, the cairomm headers are included without a prefix.
# pkg-config --cflags cairomm-1.0
-I/usr/include/cairomm-1.0 -I/usr/include/cairo
-I/usr/include/sigc++-2.0 -I/usr/lib64/sigc++-2.0/include
-I/usr/include/pixman-1 -I/usr/include/freetype2
-I/usr/include/libpng12
cairommconfig.h is included, when the correct path is
cairomm/cairommconfig.h.
The in_degree method returns wrong values if it is called with the weight
parameter. As far as I could trace down the issue, it seems the method
weighted_in_degree is resposible with C++ signature:
boost::python::api::object weighted_in_degree(graph_tool::PythonVertex
{lvalue},boost::any). Below is a minimal example.
Let's create a simple directed graph with two vertices and one edge.
In [1]:
import graph_tool.all as gt
g=gt.Graph()
v1 = g.add_vertex()
v2 = g.add_vertex()
e1 = g.add_edge(v1,v2)
in-degree and out-degree look like expected
In [2]: [[v.in_degree(),v.out_degree()] for v in g.vertices()]
Out[2]: [[0, 1], [1, 0]]
Now, let's add some weight.
In [3]:
g.ep['exposure'] = g.new_edge_property("double")
g.ep['exposure'][e1] = 1.5
the results for out-degree look ok, however the in-degree array looks like
it is shifted
In [4]:
[[v.in_degree(weight=g.ep['exposure']),v.out_degree(weight=g.ep['exposure'])]
for v in g.vertices()]
Out[4]: [[1.5, 1.5], [0.0, 0.0]]
I am using py27-graph-tool @2.2.36_0+gtk3 and boost
@1.57.0_1+no_single+no_static+python27 I wonder if anyone can reproduce this
issue. in_degree_issue.json
<http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com…>
--
View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com…
Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.
Hi all, my apologies if the answer is in the doc, I did not find it. What
is the output of graph_tool.topology.shortest_path when several shortest
path are available between two vertices?
Best,
F.
I am new in python and I found graph-tool interesting. I want to convert DOT
or GDL graph to distance matrix. Is it possible in graph-tool? If yes, could
u help me how can do that?
--
View this message in context: http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com…
Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.