[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] Help with Weighted_Adjacency

From: Rita Maria del Rio Chanona
Subject: [igraph] Help with Weighted_Adjacency
Date: Wed, 25 Jun 2014 08:28:25 -0500

I am new to this forum but would really appreciate some hlep with igraph.

I'm trying to convert a weighted adjacency matrix into a graph and then use simple Graph.pagerank, evcent and others.

I am currently using:

AdjacencyMatrix3= [[0,2,1,0,0,0,0,0,0], [1,0,5,8,0,0,0,0,0], [0,7,0,1,0,0,0,0,0], [1,0,8,0,1,0,0,0,0], [0,0,0,8,0,1,0,0,0], [0,0,0,0,100,0,0,0,1], [0,0,0,0,0,50,0,0,1], [0,0,0,0,0,1,1,0,0], [0,0,0,0,0,1,0,10,0]]

graph3 = Graph.Weighted_Adjacency(AdjacencyMatrix3, mode = 'directed', attr = 'weight')
evcentr3 = Graph.evcent(graph3)
pagerank3 = Graph.pagerank(graph3)
betw3 = Graph.betweenness(graph3)

yet the results I'm getting with pagerank, evcent and betweenness are for an unweighted graph.

I am using python and have aldo had problems with the following commands:

AttributeError: 'Graph' object has no attribute 'is_weighted'

g = Graph.Adjacency(AdjacencyMatrix3, weighted = True)
TypeError: 'weighted' is an invalid keyword argument for this function

Any help will be very much appreciated.
Thanks in advanced,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]