Page 1 of 2
[SOLVED] Best practice for very dynamic network?
Posted: 16 May 2012 12:00
by miturian
Hi, I'd like to use gephi to show evolution of a neural network simulation, in which the weights of the edges change constantly, and pop in and out of existence. Can anyone suggest a good way of doing this? I suppose I am really trying to stream the graph, but I realize that that is still being developed.
Is there a more generic way of describing time, instead of dates? seconds really make more sense in my data, so if I could just give a float, that would be pretty helpful?
Would something like
<edge id="10" source="0" target="3">
<attvalue for="weight" value="1" start="0"/>
<attvalue for="weight" value="1.1" start="1"/>
<attvalue for="weight" value="1.2" start="2"/>
<attvalue for="weight" value="1.1" start="3"/>
<attvalue for="weight" value="1" start="4"/>
<spells>
<spell> start="1" end="2" </spell>
<spell> start="3" end="5" </spell>
</spells>
</edge>
work? Can I change the edge-weight like that?
I think I saw something in the primer about values overwriting each other quite easily, so that's why I'm only giving start-times.
Of course I'm going to write a matlab script that creates the gexf-file, but it is still a quality that the file doesn't become too large, so unnecessary text should be avoided. It's also a quality that gephi can handle the file easily. Under those constraints, does anyone have suggestions to best practice?
Thanks
Re: Best practice for very dynamic network?
Posted: 16 May 2012 13:53
by admin
Hi, this should work.
You can compress your GEXF file because Gephi handles ZIP and GZIP files.
Re: Best practice for very dynamic network?
Posted: 23 May 2012 10:42
by miturian
hmm, for some reason it's not working.
This is my header (as you can see, mostly copy-pasted from the primer):
Code: Select all
<?xml version="1.0" encoding="UTF8"?>
<gexf xmlns="http://www.gexf.net/1.2draft"
xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance"
xsi:schemaLocation="http://www.gexf.net/1.2draft
http://www.gexf.net/1.2draft/gexf.xsd"
version="1.2">
<meta lastmodifieddate="20090320">
<creator>Gephi.org</creator>
<description>A hello world! file</description>
<keywords>undefined</keywords>
</meta>
<graph mode="dynamic" timeformat="double" defaultedgetype="directed">
and this is an example of an edge:
Code: Select all
<edge id="1" source="29" target="1">
<attvalue for="weight" value="1.9216" start="9.9626"/>
<spells>
<spell> start="9.9626" end="900010" </spell>
</spells>
</edge>
however, when I load the file into gephi, I get
The time interval for edge 'edge id=1' attribute could not be parsed. Use xsd:date, xsd:dateTime or Double formatting.
when I try to copy-paste that message, I get "org.gephi.io.importer.api.Issue@20547840 SEVERE ", which I suppose is the identifier?
gephi reports the loaded file as not dynamic.
Re: Best practice for very dynamic network?
Posted: 23 May 2012 12:59
by eduramiba
Hi,
The right syntax for spells is:
Code: Select all
<spell start="9.9626" end="900010" />
Eduardo
Re: Best practice for very dynamic network?
Posted: 23 May 2012 13:07
by miturian
thanks. however, that didn't change anything...
Re: Best practice for very dynamic network?
Posted: 23 May 2012 13:11
by eduramiba
Perhaps there is another syntax problem.
Check this page
http://gexf.net/format/dynamics.html to see if everything is correct.
Eduardo
Re: Best practice for very dynamic network?
Posted: 23 May 2012 13:21
by admin
Please send the smallest GEXF which is not working, so we can find the issue.
Re: Best practice for very dynamic network?
Posted: 23 May 2012 15:15
by miturian
I hope this is small enough:
Code: Select all
<?xml version="1.0" encoding="UTF8"?>
<gexf xmlns="http://www.gexf.net/1.2draft"
xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance"
xsi:schemaLocation="http://www.gexf.net/1.2draft
http://www.gexf.net/1.2draft/gexf.xsd"
version="1.2">
<meta lastmodifieddate="20090320">
<creator>Gephi.org</creator>
<description>A hello world! file</description>
<keywords>undefined</keywords>
</meta>
<graph mode="dynamic" timeformat="double" defaultedgetype="directed">
<nodes>
<node id="1" />
<node id="2" />
<node id="29" />
</nodes>
<edges>
<edge id="1" source="29" target="1">
<attvalue for="weight" value="1.9216" start="9.9626"/>
<spells>
<spell start="9.9626" end="900010" />
</spells>
</edge>
<edge id="2" source="29" target="2">
<attvalue for="weight" value="1.9216" start="9.9626"/>
<spells>
<spell start="9.9626" end="900010" />
</spells>
</edge>
</edges>
</graph>
</gexf>
gephi is now recognising that the network is dynamic - this may have been fixed by changing the spell-syntax, but I still get the same error-message for both edges.
Re: Best practice for very dynamic network?
Posted: 23 May 2012 15:18
by admin
<attvalue> should be inside <attvalues>:
Code: Select all
<attvalues><attvalue ... /></attvalues>
Re: Best practice for very dynamic network?
Posted: 23 May 2012 15:25
by miturian
I'm afraid that didn't change anything. the new file is:
Code: Select all
<?xml version="1.0" encoding="UTF8"?>
<gexf xmlns="http://www.gexf.net/1.2draft"
xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance"
xsi:schemaLocation="http://www.gexf.net/1.2draft
http://www.gexf.net/1.2draft/gexf.xsd"
version="1.2">
<meta lastmodifieddate="20090320">
<creator>Gephi.org</creator>
<description>A hello world! file</description>
<keywords>undefined</keywords>
</meta>
<graph mode="dynamic" timeformat="double" defaultedgetype="directed">
<nodes>
<node id="1" />
<node id="2" />
<node id="29" />
</nodes>
<edges>
<edge id="1" source="29" target="1">
<attvalues>
<attvalue for="weight" value="1.9216" start="9.9626"/>
</attvalues>
<spells>
<spell start="9.9626" end="900010" />
</spells>
</edge>
<edge id="2" source="29" target="2">
<attvalues>
<attvalue for="weight" value="1.9216" start="9.9626"/>
</attvalues>
<spells>
<spell start="9.9626" end="900010" />
</spells>
</edge>
</edges>
</graph>
</gexf>