I have a graph of 6 million nodes like
is required (igraph) # Graph of 1000 nodes graph with the following four attributes defined for each node & lt; - ba.game (1000)
# Features V (g) $ Attribute1 & lt; -% V (G) %% (V (g), 20) V (g) $ attribute 2 in the sample & lt; - Vi (G) %% in the sample (V (g), 20) V (g) $ Attribute3 & lt; -% V (G) %% V (G), 20) V (G) $ attribute 4 & lt; I have a subset of 12,000 in nodes, which is of particular interest: in V (g) %% sample (v (g), 20)
VSAT of $ 100 nodes (g) $ subset & lt; - V (g) %% in the sample (V (g), 100)
What I want to achieve is an analysis of the neighborhood of my subset < / Code>. That is, I want to define
V (g) $ neigh.attr1 < - rep (NA, vcount (g)) V (g) $ neigh.attr2 & lt; - rep (NA, Wecount (G)) V (G) $ neighbor. ATTR 3 & amp; Lt; - Representative (NA, Wecount (G)) V (G) $ neighbor. ATT 4 & lt; - Representative (NA, Weakant (G))
has been changed for each node in NA
subtas
, together V (g) $ attribute {1..4} == Correct
.
I can easily create a list of neighborhood neighborhoods with neighbors
- Neighborhood (g, command = 1, v (g) [v (g) $ sub-index == TRUE], mode = "out")
But I'm a skilled to iterate Calculate the statistics of each and every four characteristics on each neighbors
and can not think in a manner. Actually, the way I came together is a loop in which the size of my original graph looks very long:
subset_indies
No comments:
Post a Comment