[SOLVED] How is the weight column calculated?

Visual manipulations and refinements
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
ayjaygi
Posts:15
Joined:01 Jul 2011 12:13
[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] How is the weight column calculated?

Post by ayjaygi » 20 Oct 2011 14:38

How is the weight column calculated?

User avatar
mbastian
Gephi Architect
Posts:728
Joined:10 Dec 2009 10:11
Location:San Francisco, CA
[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: How is the weight column calculated?

Post by mbastian » 20 Oct 2011 16:34

The weight is set as 1 by default if you don't provide any weight column in your file/database. Note that parallel edges are automatically merged and the weight increased.

If you import

A -> B
A -> B
B -> C

the edges in Gephi will be
A -> B with weight 2
B -> C with weight 1

maupek
Posts:1
Joined:22 Feb 2012 11:24
[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: [SOLVED] How is the weight column calculated?

Post by maupek » 22 Feb 2012 11:50

Hi,
I'am using 0.8 beta version and during importing gexf file I get "parallel edges are not supported yet...edge is ignored" message what is misleading because the weight of dupplicated edge was properly increased.

But my question is about "auto meta-edges creation" when working with hierarchy. Is there an algorithm described how the sum is calculated ?
In the example below all 3 edges have weight 1. When I contract Article1+Artilce2 nodes to the Institution1 node I get all 3 edged with weight 1.1. Is that correct ?

<?xml version="1.0" encoding="UTF-8"?>
<gexf xmlns="http://www.gexf.net/1.2draft" version="1.2" xmlns:viz="http://www.gexf.net/1.2draft/viz" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.gexf.net/1.2draft http://www.gexf.net/1.2draft/gexf.xsd">
<meta lastmodifieddate="2012-02-22">
<creator>Gephi 0.8</creator>
<description></description>
</meta>
<graph defaultedgetype="directed" timeformat="date" mode="dynamic">
<attributes class="node" mode="static">
<attribute id="0" title="name" type="string"></attribute>
<attribute id="1" title="type" type="string"></attribute>
<attribute id="2" title="kraj" type="string"></attribute>
</attributes>
<attributes class="edge" mode="static">
<attribute id="0" title="name" type="string"></attribute>
<attribute id="1" title="type" type="string"></attribute>
</attributes>
<nodes>
<node id="AUT01" label="Autor1" start="2000-01-01" end="2011-12-31">
<attvalues>
<attvalue for="0" value="Autor1"></attvalue>
<attvalue for="1" value="autor"></attvalue>
<attvalue for="2" value="PL"></attvalue>
</attvalues>
<viz:size value="10.0"></viz:size>
<viz:position x="144.80385" y="485.95135"></viz:position>
<viz:color r="153" g="153" b="153"></viz:color>
</node>
<node id="AUT02" label="Autor2" start="2000-01-01" end="2020-12-31">
<attvalues>
<attvalue for="0" value="Autor2"></attvalue>
<attvalue for="1" value="autor"></attvalue>
<attvalue for="2" value="PL"></attvalue>
</attvalues>
<viz:size value="10.0"></viz:size>
<viz:position x="593.07074" y="6.0369897"></viz:position>
<viz:color r="153" g="153" b="153"></viz:color>
</node>
<node id="AUT03" label="Autor3" start="2005-01-01" end="2020-12-31">
<attvalues>
<attvalue for="0" value="Autor3"></attvalue>
<attvalue for="1" value="autor"></attvalue>
<attvalue for="2" value="DE"></attvalue>
</attvalues>
<viz:size value="10.0"></viz:size>
<viz:position x="481.4844" y="243.55223"></viz:position>
<viz:color r="153" g="153" b="153"></viz:color>
</node>
<node id="ART01" label="Artykuł1">
<attvalues>
<attvalue for="0" value="Artykuł1"></attvalue>
<attvalue for="1" value="artykuł"></attvalue>
<attvalue for="2" value="PL"></attvalue>
</attvalues>
<viz:size value="10.0"></viz:size>
<viz:position x="-486.7212" y="64.2688"></viz:position>
<viz:color r="153" g="153" b="153"></viz:color>
</node>
<node id="ART02" label="Artykuł2">
<attvalues>
<attvalue for="0" value="Artykuł2"></attvalue>
<attvalue for="1" value="artykuł"></attvalue>
<attvalue for="2" value="PL"></attvalue>
</attvalues>
<viz:size value="10.0"></viz:size>
<viz:position x="-451.7746" y="-106.72249"></viz:position>
<viz:color r="153" g="153" b="153"></viz:color>
</node>
</nodes>
<edges>
<edge id="AU01" source="AUT01" target="ART01" start="2000-01-01" end="2001-12-31">
<attvalues>
<attvalue for="weight" value="1.0"></attvalue>
<attvalue for="1" value="autorstwo"></attvalue>
</attvalues>
</edge>
<edge id="AU03" source="AUT02" target="ART02" start="2000-01-01" end="2020-12-31">
<attvalues>
<attvalue for="weight" value="1.0"></attvalue>
<attvalue for="1" value="autorstwo"></attvalue>
</attvalues>
</edge>
<edge id="AU02" source="AUT03" target="ART01" start="2000-01-01" end="2020-12-31">
<attvalues>
<attvalue for="weight" value="1.0"></attvalue>
<attvalue for="1" value="autorstwo"></attvalue>
</attvalues>
</edge>
</edges>
</graph>
</gexf>

User avatar
mbastian
Gephi Architect
Posts:728
Joined:10 Dec 2009 10:11
Location:San Francisco, CA
[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: [SOLVED] How is the weight column calculated?

Post by mbastian » 22 Mar 2012 02:33

That doesn't sounds right. Let me check what's going on here.

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
[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