igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Find six degrees of separation in Actor-Actor Network


From: Enes Abanoz
Subject: Re: [igraph] Find six degrees of separation in Actor-Actor Network
Date: Mon, 21 Jan 2019 04:05:29 +0200 (EET)

Thank you for your prompt reply, Tamas :)
1) I only used shortest.path without defining any algorithm! Then get 
cumulative total shortest paths' value for each node. The cumulative total 
shortest path and eigenvector value give the same node in this sample network, 
but my real network gives different nodes. 
# Find shortes path from one to all nodes
p_short <- shortest.paths(lc_projected_g)
p_df <-as.data.frame(rownames(p_short))
p_df$Total_path_length <- rowSums(p_short)

2) I used E(lc_projected_g)$weight <- 1/E(lc_projected_g)$weight to fix weight 
issue in network.

3) This was a Movie-Actor bipartite network. When I project into Actor-Actor 
network, edges are Movie names. The edges in Actor-Actor network such as 
Actor01--Actor02 but I need to get it like that Actor01-MoiveA-Actor02 or 
Actor01-MovieA/MovieB-Actor02.

BIPARTITE NETWORK!
df <- structure(list(Movie.Name = structure(c(1L, 1L, 1L, 1L, 2L, 2L, 
2L, 2L, 2L, 3L, 3L, 3L, 4L, 4L, 4L), .Label = c("A", "B", "C", 
"D"), class = "factor"), Actor.Name = structure(c(1L, 5L, 6L, 
7L, 8L, 5L, 9L, 1L, 10L, 11L, 8L, 12L, 2L, 3L, 4L), .Label = c("Actor1", 
"Actor10", "Actor11", "Actor12", "Actor2", "Actor3", "Actor4", 
"Actor5", "Actor6", "Actor7", "Actor8", "Actor9"), class = "factor")), .Names = 
c("Movie.Name", 
"Actor.Name"), class = "data.frame", row.names = c(NA, -15L))
   


----- Original Message -----
From: "Tamas Nepusz" <address@hidden>
To: "igraph-help" <address@hidden>
Sent: Saturday, January 19, 2019 6:03:49 AM
Subject: Re: [igraph] Find six degrees of separation in Actor-Actor Network

> - In igraph weight is considered as a cost or close relation
It depends on the algorithm; for shortest path calculations, weights
represents distances (i.e. the larger the weight, the longer the edge
is).

> Even though there are many edges between Actor01 and Actor02 , the length of 
> path will be one! Is this right?
You could set it to 1, or you could set it to 1/K if K was the
original weight, or you can use any other transformation that fits
your purposes. It is entirely up to you.

> - When I calculate the total shortest path between all nodes, there are three 
> nodes have same value. In this case should I look for eigenvector centrality 
> to find right node that will be considered the center node or starting point.
Again, it's up to you which other centrality measures you use to
augment the shortest path analysis.

> -  When I projected the bipartite network into Actor-Actor network, I'am 
> losing the the names of edges that are important for me. How can I get assign 
> edge name into Actor-Actor network.

What are the names of the edges in your case? The input data frame
contains node names only.

T.

_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



reply via email to

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