Two questions:
- The usual katz calculation definition uses the transpose
adjacency matrix, Is this transposition done in your code?
- Is the adjacency matrix normalized when no edge weight is used?
Example,
Imagine a directed circular graph with node numbers {1,2,3,4}
and edges (source, target):
(1,2)
(2,3)
(3,4)
(4,1)
with aditional edges
(1,3)
(4,2)
The adjoint matrix (A) will be:
0 0 0 1/2
1/2 0 0 1/2
1/2 1
0 0
0 0
1 0
Fixing max_iter=2, using the canonical basis as
beta vectors and set \alpha very near to one then the calculation
matriz (F=I+A') must be:
1 1/2 1/2 0
0 1 1 0
0
0 1 1
1/2
1/2 0 1
(' for transpose matrix)
Thanks in advance, David.
El 28/10/13 13:28, Tiago Peixoto [via Main discussion list for the
graph-tool project] escribió:
On
10/27/2013 06:49 AM, xenil wrote:
> The first finding was that a normalization is done during
the intermediate
> steps of the calculation because the diagonal elements
are changing of
> value.
>
> I look at the graph_katz.hh file and i havesome
questions:
> a) Line 72:
> c_temp[v] += alpha * get(w, *e) * c[s];
>
> when w is not specified, What w value is used? The
normalized adjacency
> matrix value?
Here "w" are the edge weights. They should be 1 by default.
> b) Line 87:
> c_temp[v] /= norm;
>
> after the swap of the line 90.
>
> Could be this the intermediate step nomralization? Is this
correct?
This is indeed _NOT_ correct. It should not affect the results if
normalization is desired, but will not give the correct
unnormalized
results. Thanks for pointing this out... I have fixed this in the
git
version.
Cheers,
Tiago
--
Tiago de Paula Peixoto <[hidden email]>
_______________________________________________
graph-tool mailing list
[hidden email]
http://lists.skewed.de/mailman/listinfo/graph-tool
View this message in context: Re: Katz centrality calculation
Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.