# Questions tagged [igraph]

igraph is a collection of tools for graph theory and network analysis. Its core is a software library written in C/C++, and it has interfaces to R, Python and Mathematica.

69 questions
Filter by
Sorted by
Tagged with
1 vote
40 views

### Identify allies in event-data via network analysis in R

I am examining a network of actors involved in civil wars, where each actor is represented as a vertex, and the connections (edges) between them signify instances of conflict or battles. Through ...
• 153
142 views

### Why is Louvain Method Non-Deterministic?

I am using the implementation of the Louvain algorithm for community detection in igraph in R. I observe that running it multiple times produces different answers. However, when I read the algorithm ...
• 2,640
55 views

### Do patent citation degrees follow a power-law?

I'm currently working on a thesis on patent citation networks. Most approaches are based upon the hypothesis that the degrees, specifically the in-degrees (forward citations) follow a power-law ...
1 vote
41 views

### igaph gives me a diameter, but I think the diameter is another one [closed]

Given this network: ...
• 2,301
1 vote
49 views

### Method for comparing 2 3-dimensional networks (igraphs in R) [closed]

I'm looking for a way to compare 2 (or more) igraph objects in R. These are trajectories in 3-dim which are a network of nodes and edges but are not necessarily the same number of either, just that ...
1 vote
83 views

### Why is the closeness centrality value higher for less connected nodes?

I built an igraph graph from a data frame containing the (symbolic) edge list and weight. This is the data frame: ...
• 307
1 vote
200 views

### How to handle missing data when calculating network homophily/assortativity?

I am trying to calculate network homophily/assortativity for a graph. However, some of my nodes have missing values. It turns out igraph's assortativity functions have no "na.rm" function ...
• 1,037
340 views

### igraph's "assortativity" function returns NaN if all attributes are identical. Why?

I am trying to use igraph's assortativity function. It returns positive values if more similar nodes have similar attributes and negative values otherwise. Indeed, if I randomly generate attributes ...
• 1,037
120 views

### Build graph of transitive relationships [closed]

I am wondering given the type of directed graph A, how do I convert it into the type of directed graph B? Basically, in graph B, I want to ignore Node X and only retain the Node T. Conceptually, I am ...
1 vote
959 views

### Network analysis: density of communities/partitions (and other metrics)

After running a community detection algorhythm (e.g. edge betweenness, or greedy modularity), I like know the density of each seperate community, and potentially some other metrics, too. My desired ...
• 111
1 vote
34 views

### Given a graph, test if some vertices are more connected than the background

I have a neighborhood graph of some 10k vertices (a k-NN graph of single-cell RNA-seq data). I am interested if a given set of vertices is more connected to each other than you would expect by chance. ...
• 125
244 views

### Network clustering stability using bootstrapping techniques

I use the standard modularity-maximisation Louvain clustering method to partition a large undirected network into communities. I fear the result of the partition is quite fragile. Is there a standard ...
• 47
1 vote
847 views

### What is the difference between brokerage and betweenness?

This link describes betweenness: "Betweenness centrality measures the extent to which a vertex lies on paths between other vertices." This link describes brokerage: "Brokerage is a ...
• 1,037
1 vote
23 views

### Graph question - How to compute scaling parameter α after gaining a degree sequence of a graph?

I am a junior data scientist and very new to the graph theory, so I guess my question is stupid. Recently, I have been reading several papers related to a graph theory to try to answer a question that ...
28 views

### Average from multiple random networks [closed]

I am testing the Small World of my network by comparing it with a random one. With an igraph package I am able to generate a random network of the same parametres that I have in my original set, the ...
203 views

### Community-detection algorithm to use to divide large network (200k nodes) into few (~5) communities

I have a large moderately dense network (50k nodes, 300k edges) and want to divide this into few (5-10) communities, based on how densely connected the nodes are. I've been looking into the ...
• 367
3k views

### Explanation of centralityPlot in qgraph

I am using this code to get a centralityPlot. ...
2k views

### Assortativity coefficient in igraph

In the context of Social Network Analysis, I want to compute the homogeneity of different networks for specific attributes. For this case the igraph package contains the method assortativity() to ...
• 223
2k views

### Computation of Network Homophily / Heterogeneity

I am quite confused about the calculation of network homophily in network analysis. Right now I am computing the homophily using the following function, which has been written and also described by ...
• 223
1k views

### Kamada Kawai vs Fruchterman Reingold

I am trying to visualize microbial correlation networks. I am using igraph in R. And my goal is to have weighed edges based on the correlation coefficient between the nodes. I don't understand what ...
1 vote
452 views

### How to generate networks of a certain density?

How can you generate small world or scale-free networks with a certain density, say .3? In the case of random networks it seems easy because an edge is drawn based ...
• 259
281 views

### Connectivity vs. density for random, small world and scale-free networks

I am trying to understand a paper by reconstructing the the analyses discussed in the Validation study section, however, I am confused when it comes to how a network metric is used. Specifically, the ...
• 259
250 views

### Network modularity for exactly two communities

I have a number of empirical networks that tend to show bipolarization patterns, meaning that there are precisely two communities. In some networks, the two communities are very clearly separated (...
85 views

### Does recursive partition of a graph using min-cut yield the minimum cumulative sum of edges weights?

Suppose I have an undirected graph with weigthed edges a and vertices. I want to partition the graph in N subgroups. Suppose that any time a cut occurs, I sum the weights of the edges which belong to ...
• 949
61 views

### What is the state of the art process for finding isolated communities in graphs?

Is there a state of the art process to follow for finding isolated communities in graphs? I know there are a lot of algorithms available, but I struggle to find a set of steps for preprocessing and ...
• 949
1 vote
90 views

### Bias correction of a sampled igraph

Suppose I have a sample (S) of a graph where S is a subset of G -- the population Graph. Is there a way (theoretical) to compute for bias in the estimation of centralization (as in igraph::...
• 33
1 vote
23 views

### Why switching edges definition changes the result of random walk search for communities? (walktrap)

If a graph object is a not directed graph, then the following set of operations should yield the same result: ...
• 949
758 views

### Monte Carlo or Bootstrapping for network in R

I have a large network for which I'm using iGraph in R to handle. However, I would like to take some small random samples of that network, and calculate for example the standard deviation of parallel ...
1k views

### Clustering network usign modularity maximization algorithm

I have been working on a Network-based clustering approach. I used "cluster_optimal" of 'igraph' package in R for clustering. The function works by modularity maximization algorithm. I have ...
37 views

### Measure propensity of contagion between sets of nodes using r igraph

What would be a good way of measuring propensity of contagion between two sets of nodes in a network? I tried creating an index that includes path distance and number of shortest paths, but network ...
• 225
1 vote
57 views

### Graph Theory / Network Analysis - properties variation

I have a rather complex network (air travel in the US) with more than 500 nodes, and small-world, scale-free proprieties, spanning over 10 years, and with quarterly information. As I'm trying to ...
1 vote
331 views

### Setting initial assignments for mixed-membership stochastic blockmodel

I created two networks at two points (in the middle of the month and at the end of the month). Tried to run mmsb.collapsed.gibbs.sampler for the first network and obtained network communities. However,...
• 197
1 vote
474 views

### Difference between real and random graphs in bipartite networks

I am trying to prove that my network is a real network and not a random network by doing certain tests in igraph. The clustering coefficient of my network is zero, so I wont be looking at that ...
1 vote
1k views

### Clustering Coefficient of zero in the Network

The clustering co-efficient of my real network is zero. As a matter of fact, all the nodes of the network have a clustering coefficient of zero. I am trying to compare my network to an ensemble of ...
238 views

### Modeling products (from sales data) in a graph network for clustering and product recommendations.

I have a high level question about whether or not graph networks would be an appropriate method to model a situation I'm studying. It's been a while since I last worked on a project building/analyzing ...
• 31
1 vote
965 views

### Input to fit a power-law to degree distribution of a network

I would like to use R to test whether the degree distribution of a network behave like a power-law with scale-free property. Nonetheless, I've read diferent people ...
• 131
882 views

### Log-likelihood in fit_power_law{igraph}

The R package igraph has the fit_power_law function which, as you can imagine, can fit a ...
• 131
887 views

### R package for graph manipulation: transitive reduction and cliques

Can anyone suggest an R package for graph manipulation that can find cliques and also performs transitive reduction? From websearching I see that I can find cliques with igraph. (Transitive ...
• 283
1 vote
38 views

### How to alter undirected, binary graph to have specific graph-analytical characteristics while keeping others constant

I am working on a undirected, binary graph (derived from functional neuroimaging). I would like to alter this graph to change specific graph-characteristics (e.g. a specific value for the global ...
• 2,783
5k views

### Calculating Transitivity (Clustering Coefficient) from Adjacency Matrix, and igraph package

Suppose $G$ is a simple, undirected graph. The corresponding adjacency matrix, $A$ is binary, symmetric, and has all zeroes on the diagonal. By definition (Networks: An Introduction, M.E.J Newman), ...
• 876
1 vote
1k views

### How to compare the degree distributions of 2 different graphs

I am new to statistics.I am trying to compare 2 networks. Can anyone pls help me to understand what the degree distribution of the 2 networks say. I mean the similarities or differences bet the 2 ...
• 153
598 views

### Community detection in network

I'm fairly new to the subject of network theory and community detection, and I'm trying to apply to some data that I have. To start, my data essentially looks like this: Basically, what I have is a ...
• 557
1 vote
94 views

### Network/Graph Analysis Beginner Resources

I am a beginner to Network/Graph Analysis. I have data in the following format: Customer | CustomerSpend Anna $10 Bob$30 Charlie \$50 ... .....
106 views

### Social Network Analysis: Measuring the link between vertex values

I'm relatively new to social network analysis and from what I understand many of the common statistical technique do not work in social network analysis due to the non IID nature of networks. My ...
84 views

### Testing if a directed, bipartite network is non-random

I am struggling with finding a suitable approach to determine if a directed, bipartite network is non-random, i.e., if the relations between the nodes and edges of my empirical network are due to ...
• 21
4k views

### Community detection and modularity

I am reading the book "Network science" of Barabasi and in particular the chapter on community detection. If I understand correctly, modularity is a goodness factor of partition calculated by a ...
• 213
220 views

### Problems with representing and analysing non-network data as a network?

Suppose I have a dataset with 200 observations of 30 categorical variables. The dataset describes websites and different kinds of design features they deploy (or do not deploy). If I were to convert ...
864 views

### igraph shortest path export as vector [closed]

This is probably a very simple question but I cannot seem to solve it: I'm using the igraph package and want to export the vpath part of the get.shortest.paths output as a vector so that I may work ...
• 554