All Projects → GiulioRossetti → f1-communities

GiulioRossetti / f1-communities

Licence: GPL-3.0 license
A novel approach to evaluate community detection algorithms on ground truth

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to f1-communities

Awesome Community Detection
A curated list of community detection research papers with implementations.
Stars: ✭ 1,874 (+9270%)
Mutual labels:  community-detection, network-analysis
ABC
Annotated Beethoven Corpus (ABC): A dataset of harmonic analyses with standardized labels
Stars: ✭ 37 (+85%)
Mutual labels:  ground-truth
ffxiv-dissector
A Wireshark dissector for the FFXIV wire protocol
Stars: ✭ 14 (-30%)
Mutual labels:  network-analysis
IPRadar2
Real-time detection and defense against malicious network activity and policy violations (exploits, port-scanners, advertising, telemetry, state surveillance, etc.)
Stars: ✭ 20 (+0%)
Mutual labels:  network-analysis
epynet
Object-oriented wrapper for EPANET 2.1
Stars: ✭ 24 (+20%)
Mutual labels:  network-analysis
GNN4CD
Supervised community detection with line graph neural networks
Stars: ✭ 67 (+235%)
Mutual labels:  community-detection
PySODEvalToolkit
PySODEvalToolkit: A Python-based Evaluation Toolbox for Salient Object Detection and Camouflaged Object Detection
Stars: ✭ 59 (+195%)
Mutual labels:  evaluation-metrics
NetBID
Data-driven Network-based Bayesian Inference of Drivers
Stars: ✭ 21 (+5%)
Mutual labels:  network-analysis
Network-Embedding-Resources
Network Embedding Survey and Resources
Stars: ✭ 43 (+115%)
Mutual labels:  network-analysis
SynNet-Pipeline
Workflow for Building Microsynteny Networks
Stars: ✭ 32 (+60%)
Mutual labels:  network-analysis
ssldump
ssldump - (de-facto repository gathering patches around the cyberspace)
Stars: ✭ 160 (+700%)
Mutual labels:  network-analysis
NetworkInference
R implementation to the netinf algorithm. Infers the most likely diffusion network from a set of events
Stars: ✭ 21 (+5%)
Mutual labels:  network-analysis
nervaluate
Full named-entity (i.e., not tag/token) evaluation metrics based on SemEval’13
Stars: ✭ 40 (+100%)
Mutual labels:  evaluation-metrics
Final Project
Using Twitter Ego Network Analysis to Detect Sources of Fake News
Stars: ✭ 44 (+120%)
Mutual labels:  network-analysis
A-Detector
⭐ An anomaly-based intrusion detection system.
Stars: ✭ 69 (+245%)
Mutual labels:  network-analysis
public-transit-tools
Tools for working with GTFS public transit data in ArcGIS
Stars: ✭ 126 (+530%)
Mutual labels:  network-analysis
kitti-A-LOAM
Easy description to run and evaluate A-LOAM with KITTI-data
Stars: ✭ 28 (+40%)
Mutual labels:  ground-truth
packet cafe
A platform built for easy-to-use automated network traffic analysis
Stars: ✭ 40 (+100%)
Mutual labels:  network-analysis
Junet.jl
Julia package for network research
Stars: ✭ 37 (+85%)
Mutual labels:  network-analysis
pathpy
pathpy is an OpenSource python package for the modeling and analysis of pathways and temporal networks using higher-order and multi-order graphical models
Stars: ✭ 124 (+520%)
Mutual labels:  network-analysis

Normalized F1-communities

Evaluating a community detection algorithm is a complex task due to the lack of a shared and universally accepted definition of community. In literature, one of the most common way to assess the performances of a community detection algorithm is to compare its output with given ground-truth communities by using computationally expensive metrics (i.e., Normalized Mutual Information). We proposed a novel approach aimed at evaluate the adherence of a community partition to the ground truth: our methodology provides more information than the state-of-the-art ones and is fast to compute on large-scale networks. By defining a classification problem on the real community label we compute an average F1-score that captures the level of approximation reached by network partitions obtained through community discovery algorithms w.r.t. ground-truth ones. Moreover, our approach allows for a visual inspection of the partition quality exploiting density scatter plots.

N.B.: NF1 can be used also to measure the resemblance of partitions obtained applying different algorithms to the same graph.

Citation

If you use our algorithm please cite the following works:

Rossetti, Giulio; Pappalardo, Luca; Rinzivillo, Salvatore "A novel approach to evaluate community detection algorithms on ground truth" 7th Workshop on Complex Networks, Springer-Verlag, 2016.

Instructions:

The NF1 score can be computed using a standalone interface as well as within a python script.

Installation

To install the nf1 package use pip

pip install nf1

Standalone execution

The following command line has to be used from the shell:

NF1_evaluate community_file ground_truth_file [--plot output_filename] [--maxpts points_to_plot] [--title plot_title] 

Where:

community_file: is the file containing the community identified by a Community Discovery algorithm;
ground_truth_file: is the file containing the ground-truth community;
output_filename: defines the plot filename (optional, if not specified the plot will not be generated);
points_to_plot: defines the number of points to plot (optional – if not specified all the points will be plotted);
plot_title: defines the plot title (optional).

File(s) Format:

The script expects as minimal inputs two text files containing community descriptions. Each line of the input files should identify a single community as a list of node ids (the accepted separator are: tab, space, comma).

Community file example:

(0,1,2,3)
(5,6,7,8)
(1,6,3)

Integration in python script

Python code example

from nf1 import NF1
import networkx as nx
from networkx.algorithms import community

g = nx.karate_club_graph()

kclique = list(community.k_clique_communities(g, 4))
kcoms = [tuple(x) for x in kclique]

lp = list(community.label_propagation_communities(g))
lpcoms = [tuple(x) for x in lp]

# Computing the NF1 scores and statistics
nf = NF1(lpcoms, kcoms)
results = nf.summary()
print(results['scores'])
print(results['details'])

# Visualising the Precision-Recall density scatter-plot
nf.plot()

In order to avoid biased evaluations be sure to comply with the following rules:

  • A community must be composed by at least 3 nodes.
  • No nested communities: a community must not be a proper subset of another community.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].