MultiLayer Version
The archive contains all the data and code to reproduce the paper “Multilayer Network Backboning,” published in CIKM26.
If you’re only interested in performing multilayer backboning, the minimum code needed is:
import backboning as bb
edges_bb = bb.noise_corrected_ml(edges)
Assuming that “edges” is a pandas dataframe with a multilayer edgelist. Each row in the dataframe should contain one edge. The dataframe should have columns src, trg (for the nodes connected by the edge), layer (the layer id connecting the edges), and nij (the edge weight). src, trg, and layer can be arbitrary strings, nij should be a non-negative int (but it can be float as well). The “wiki_data/edges.csv” file in the archive is an example of a well-formatted input file.
Once you run it, you can still use the standard thresholding function to extract the backbone just like in the single layer example below.
Single Layer Version
Download Backboning Code and Data (Python 2, Networkx 1 version)
Backboning code for Python 3 & Networkx 2
The archive contains a Python module to perform network backboning, which is the filtering of non-significant edges from a very dense and noisy network.
The module provides several utilities and the following methods:
- Noise Corrected: New methodology published at ICDE 2017 developed by Frank Neffke and me (please cite: Coscia & Neffke “Network Backboning with Noisy Data”, ICDE 2017 — Paper, Bibtex);
- Disparity Filter: http://www.pnas.org/content/106/16/6483.full;
- High Salience Skeleton: http://www.nature.com/articles/ncomms1847;
- Doubly Stochastic Transformation: http://www.pnas.org/content/106/26/E66.full.pdf;
- Maximum Spanning Tree: https://en.wikipedia.org/wiki/Minimum_spanning_tree;
- Naive Thresholding.
The module requires the following Python packages:
- Pandas
- Numpy
- Networkx
The archive contains data and example code that should get you up and running. A minimal working example is provided here. I will assume you either have the backboning.py module in your running directory or in a directory of your Python path:
import backboning
table, nnodes, nnedges = backboning.read("/path/to/input", "column_of_interest")
nc_table = backboning.noise_corrected(table)
nc_backbone = backboning.thresholding(nc_table, threshold_value)
backboning.write(nc_backbone, "network_name", "nc", "/path/to/output")
Easy!
Download Backboning Code and Data(Python 2, Networkx 1 version)
