Skip to main content

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.

Filter by
Sorted by
Tagged with
1 vote
1 answer
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 ...
KC15's user avatar
  • 153
4 votes
1 answer
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 ...
G5W's user avatar
  • 2,640
0 votes
0 answers
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 ...
user avatar
1 vote
1 answer
41 views

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

Given this network: ...
robertspierre's user avatar
1 vote
0 answers
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 ...
No Future's user avatar
1 vote
1 answer
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: ...
Mark's user avatar
  • 307
1 vote
0 answers
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 ...
JElder's user avatar
  • 1,037
2 votes
1 answer
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 ...
JElder's user avatar
  • 1,037
3 votes
1 answer
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 ...
flashing sweep's user avatar
1 vote
2 answers
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 ...
Rens's user avatar
  • 111
1 vote
1 answer
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. ...
Gregor Sturm's user avatar
2 votes
2 answers
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 ...
MCS's user avatar
  • 47
1 vote
1 answer
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 ...
JElder's user avatar
  • 1,037
1 vote
0 answers
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 ...
Huy Nguyen's user avatar
2 votes
0 answers
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 ...
Robert Magnuszewski's user avatar
3 votes
1 answer
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 ...
sheß's user avatar
  • 367
5 votes
2 answers
3k views

Explanation of centralityPlot in qgraph

I am using this code to get a centralityPlot. ...
user avatar
5 votes
1 answer
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 ...
Daniel's user avatar
  • 223
5 votes
1 answer
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 ...
Daniel's user avatar
  • 223
3 votes
1 answer
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 ...
user avatar
1 vote
1 answer
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 ...
Mihai's user avatar
  • 259
0 votes
0 answers
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 ...
Mihai's user avatar
  • 259
2 votes
0 answers
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 (...
Philip Leifeld's user avatar
0 votes
0 answers
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 ...
mickkk's user avatar
  • 949
2 votes
1 answer
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 ...
mickkk's user avatar
  • 949
1 vote
1 answer
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::...
Erwin's user avatar
  • 33
1 vote
0 answers
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: ...
mickkk's user avatar
  • 949
2 votes
2 answers
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 ...
FilipeTeixeira's user avatar
4 votes
1 answer
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 ...
Bloodstone Programmer's user avatar
2 votes
0 answers
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 ...
NBK's user avatar
  • 225
1 vote
0 answers
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 ...
FilipeTeixeira's user avatar
1 vote
0 answers
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,...
Srecko's user avatar
  • 197
1 vote
1 answer
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 ...
The Last Word's user avatar
1 vote
0 answers
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 ...
The Last Word's user avatar
3 votes
0 answers
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 ...
DS2004's user avatar
  • 31
1 vote
0 answers
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 ...
rafa.pereira's user avatar
2 votes
1 answer
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 ...
rafa.pereira's user avatar
0 votes
2 answers
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 ...
Ross Gayler's user avatar
1 vote
1 answer
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 ...
jokel's user avatar
  • 2,783
4 votes
1 answer
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), ...
RMurphy's user avatar
  • 876
1 vote
1 answer
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 ...
vidhya9's user avatar
  • 153
3 votes
2 answers
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 ...
anjama's user avatar
  • 557
1 vote
0 answers
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 ... .....
Saurav Tripathy's user avatar
3 votes
0 answers
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 ...
Neal Sidd's user avatar
2 votes
0 answers
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 ...
jmgrod's user avatar
  • 21
4 votes
1 answer
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 ...
oipo's user avatar
  • 213
4 votes
2 answers
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 ...
timothyjgraham's user avatar
0 votes
1 answer
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 ...
ABIM's user avatar
  • 554
2 votes
1 answer
1k views

Does the Girvan–Newman community detection algorithm work on a weighted graph with non-integer weights?

I have a weighted undirected graph, where weight is distance and it is between 0 and 1. I want to apply the weighted version of Girvan–Newman community detection. I think weight must refer to strength ...
Ysak's user avatar
  • 21
6 votes
1 answer
516 views

igraph betweenness depends on order of edges

I have a question whether order of edges in graph should matter or not? It seems that betweenness function produces slightly different results for different orderings of input file. input file : ...
Vitomir Kovanovic's user avatar