igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Transitivity Triples


From: Gábor Csárdi
Subject: Re: [igraph] Transitivity Triples
Date: Fri, 12 Dec 2008 11:51:24 +0100

Another possibility is to use 'clique' to get all the triangles of the
corresponding undirected graph, check that the direction of the edges
is right and then multiply the edge weights. This will not be very
fast, either, but it is possibly the easiest and quickest to implement
in R.

Gabor

On Fri, Dec 12, 2008 at 11:04 AM, Gábor Csárdi <address@hidden> wrote:
> Riccardo,
>
> the number of transitive triplets you can get easily with
> triad.census. The number of balanced triplets is more difficult. The
> igraph transitivity could be modified to do this, but that is in C,
> not in R.
>
> Btw. you might be interested in this thread:
> http://markmail.org/message/dgobdxsyfjeocy54#query:r-help tom
> balanced+page:1+mid:6yx3bc5qyvm3stb5+state:results
>
> The last message has some R code for a similar problem, but it is a
> very slow brute-force method, it only helps if your graphs are small.
>
> The other thing that you could try is to formalize the problem with
> matrix multiplications (probably possible), and then work on the
> adjacency matrix. The 'Matrix' package has sparse matrices. This would
> work a bit larger graphs as well.
>
> Gabor
>
>
>
> On Thu, Dec 11, 2008 at 4:17 PM, Riccardo Tasso <address@hidden> wrote:
>> Hi,
>>   I'm working on a weighted directed network (with positive and negative
>> links) and I'd like to count the occurrence of the following pattern.
>> Given a transitive triple (in the form A->B->C, A->C), a "balanced triple"
>> is a triple for which weight(A->B)*weight(B->C)*weight(A->C) > 0.
>> My task is to count the number of all the transitive triples and the number
>> of all the balanced triples in my network.
>> Can you help me implementing this function in R using igraph?
>>
>> Thank you,
>>   Riccardo
>>
>>
>> _______________________________________________
>> igraph-help mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/igraph-help
>>
>
>
>
> --
> Gabor Csardi <address@hidden>     UNIL DGM
>



-- 
Gabor Csardi <address@hidden>     UNIL DGM




reply via email to

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