[SOLVED] Weighted Adjacency Matrix,Community Detection, GDF

Get help with your data
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
shafique
Posts:2
Joined:31 Jan 2011 08:17
[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] Weighted Adjacency Matrix,Community Detection, GDF

Post by shafique » 31 Jan 2011 08:29

Hi,
I have no experience of script writing and just switched from Pajek to Gephi 0.7 due to the need for detecting communities from a weighted adjacency matrix of 74 nodes. Somehow, my .NET file of Pajek did not open in Gephi. After failure with .dl type as well, I resorted to .gdf file.

In my matrix every element represents the frequency of co-occurance of corresponding nodes, and hence, it is the weight of the edge. When I open the .gdf file in Gephi, it gives only one error:

"Column type is not found for 'weight', string is used instead.
Edge property found: weight"

All the data loads neatly in Nodes and Edges tables of Gephi. However, the problem is that the graph shows every node connected to every other node which obviously is not the case. Moreover, the modularity algorithm lumps all the nodes in a single community while even a cursory view of my matrix and Pajek network suggests a strong likelihood that there are a few communities.
coclass_edges_ep_GDF.csv
Data File
(62.83KiB)Downloaded 456 times
The data file is attached in .csv format which I open in Notepad and save as .gdf type.

Can anybody help in pointing out what I may be doing wrong?

Moreover, what are other alternative softwares for community detection?

Any help will be highly appreciated.

Thanks in anticipation.

BR,
Shafique

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: Weighted Adjacency Matrix, Community Detection, and .GDF

Post by eduramiba » 31 Jan 2011 20:15

Hi shafique,

Well I think you were missing the types for the attributes.

For example you need

Code: Select all

nodedef> name VARCHAR
instead of just

Code: Select all

nodedef> name
With these changes it loads ok.

Anyway, your file has a lot of edges, basically every node is connected to every node so the file does not seem correct for what you need.
Attachments
coclass_edges_ep_GDF.csv
(62.86KiB)Downloaded 285 times

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: Weighted Adjacency Matrix, Community Detection, and .GDF

Post by admin » 31 Jan 2011 23:16

Hi,

The community detection method implemented in Gephi is the Louvain method: https://sites.google.com/site/findcommunities/
I don't think that it takes edge weight into account, sorry.

WanderingAengus
Posts:4
Joined:16 May 2011 20:15
[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: Weighted Adjacency Matrix, Community Detection, and .GDF

Post by WanderingAengus » 16 May 2011 20:25

I'm trying to decide if Gephi is the tool I'm looking for so apologies for a n00b question and re-opening the thread.

I have the same situation: square, weighted adjacency matrix, but a little more interested in visualization than community detection. Is it possible to scale the edges to correspond to the edge weights? I probably wandered past this in the documentation, and didn't realize what I was looking at.

Once I know I can get there, I'll download/install/frantically play with Gephi to get something on the screen.

Thanks in advance.

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: Weighted Adjacency Matrix, Community Detection, and .GDF

Post by admin » 16 May 2011 22:34

Edge thickness is linearly proportional to the edge weight.

WanderingAengus
Posts:4
Joined:16 May 2011 20:15
[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: Weighted Adjacency Matrix, Community Detection, and .GDF

Post by WanderingAengus » 16 May 2011 23:01

Excellent! Now I just need to write a script to get the data from matrix to list format and I'm set. Thanks for the quick response! Cheers.
Last edited by WanderingAengus on 17 May 2011 14:19, edited 1 time in total.

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: Weighted Adjacency Matrix, Community Detection, and .GDF

Post by admin » 17 May 2011 08:46

You can use the DL file format to import a matrix:

http://gephi.org/users/supported-graph- ... dl-format/

WanderingAengus
Posts:4
Joined:16 May 2011 20:15
[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: Weighted Adjacency Matrix, Community Detection, and .GDF

Post by WanderingAengus » 17 May 2011 14:21

Yep, I had picked that up from another post in the forum. Cheers.

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