[SOLVED] Best practice for very dynamic network?

All questions about the GEXF (see http://gexf.net before)
miturian
Posts:23
Joined:13 Aug 2010 17:10
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[SOLVED] Best practice for very dynamic network?

Post by miturian » 16 May 2012 12:00

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

admin
Gephi Community Manager
Posts:964
Joined:09 Dec 2009 14:41
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Best practice for very dynamic network?

Post by admin » 16 May 2012 13:53

Hi, this should work.

You can compress your GEXF file because Gephi handles ZIP and GZIP files.

miturian
Posts:23
Joined:13 Aug 2010 17:10
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Best practice for very dynamic network?

Post by miturian » 23 May 2012 10:42

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.

User avatar
eduramiba
Gephi Code Manager
Posts:1064
Joined:22 Mar 2010 15:30
Location:Madrid, Spain
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Best practice for very dynamic network?

Post by eduramiba » 23 May 2012 12:59

Hi,
The right syntax for spells is:

Code: Select all

<spell start="9.9626" end="900010" />
Eduardo

miturian
Posts:23
Joined:13 Aug 2010 17:10
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Best practice for very dynamic network?

Post by miturian » 23 May 2012 13:07

thanks. however, that didn't change anything...

User avatar
eduramiba
Gephi Code Manager
Posts:1064
Joined:22 Mar 2010 15:30
Location:Madrid, Spain
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Best practice for very dynamic network?

Post by eduramiba » 23 May 2012 13:11

Perhaps there is another syntax problem.
Check this page http://gexf.net/format/dynamics.html to see if everything is correct.

Eduardo

admin
Gephi Community Manager
Posts:964
Joined:09 Dec 2009 14:41
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Best practice for very dynamic network?

Post by admin » 23 May 2012 13:21

Please send the smallest GEXF which is not working, so we can find the issue.

miturian
Posts:23
Joined:13 Aug 2010 17:10
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Best practice for very dynamic network?

Post by miturian » 23 May 2012 15:15

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.

admin
Gephi Community Manager
Posts:964
Joined:09 Dec 2009 14:41
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Best practice for very dynamic network?

Post by admin » 23 May 2012 15:18

<attvalue> should be inside <attvalues>:

Code: Select all

<attvalues><attvalue ... /></attvalues>

miturian
Posts:23
Joined:13 Aug 2010 17:10
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Best practice for very dynamic network?

Post by miturian » 23 May 2012 15:25

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>
 

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable