A python implementation of the facetnet soft community detection algorithm for temporal networks
Recent Commits
Commit | Author | Details | Committed | ||||
---|---|---|---|---|---|---|---|
f675092c232c | ruegg | moved seed reset to facetnet.step | May 9 2022 | ||||
8b91003aaa34 | ruegg | added seed argument to step and evol function too | Dec 28 2021 | ||||
7d3ed20e9b4b | ruegg | added random number generator seed for experiment demo | Dec 28 2021 | ||||
5a3388f51760 | ruegg | small changes | Dec 22 2021 | ||||
3b4f69fd54d0 | ruegg | resolve conflicts | Nov 3 2021 | ||||
9a4638477265 | ruegg | turned project into proper python package | Nov 3 2021 | ||||
2f0a240929b1 | ruegg | added logging to facetnet_evol | Mar 20 2021 | ||||
8aae8d7f474a | ruegg | fixed facetnet_evol | Mar 20 2021 | ||||
609ef0565200 | ruegg | added connectivity matrix permutation | Mar 10 2021 | ||||
5236fc5a7a06 | ruegg | added connectivity matrix permutation | Mar 9 2021 | ||||
280dfba73099 | ruegg | code simplification | Mar 9 2021 | ||||
d69f0991668d | ruegg | fixed experiment 4.1.1 script | Mar 8 2021 | ||||
08b5e0f14ef0 | ruegg | removed cpp folder | Mar 8 2021 | ||||
91bbeea78b38 | ruegg | small readme change | Sep 22 2020 | ||||
7d95e0842545 | ruegg | small readme change | Sep 22 2020 |
README.md
facetnet-python-unil
This is a python implementation of the facetnet algorithm presented in Lin, Yu-Ru, et al. "Facetnet: a framework for analyzing communities and their evolutions in dynamic networks." Proceedings of the 17th international conference on World Wide Web. ACM, 2008. based on the implementation of blmoistawinde. References in code comments refer to paragraphs in this paper.
File description
- facetnet_step.py: performs one time step update of the algorithm. Needs the state of the previous step as an input (xcap.dat, lcap.dat, idmap.dat, idmap_inv.dat). If no previous state is supplied, an initialization step is performed with alpha = 1.
- facetnet_evol.py: generates an entire evolution of facetnet given a set of edge lists for different snapshot networks.
- facetnet.py: python module implementing the algorithm
- facetnet_exp_4_1_1.py: reproduces the experiment described in paragraph 4.1.1 of the original paper.
- paper_experiments/synthetic_dataset_1/0.edgelist: edgelist for the static graph used for the experiment described before. This file also serves as an example for the input format of edge lists.
The first two scripts can be called from the command line. Type e.g. python3 facetnet_step.py --help for a description of the arguments.
Dependencies
- python 3.6
- pandas
- numpy
- tqdm
- matplotlib
- seaborn
To reproduce the paper experiments:
- networkx
- python-louvain
How to use
After cloning the repository, enter the folder (folder that contains setup.py script) and install the package:
sh pip install .
this should also install all required packages.
Author and copyright
If you use this code, please cite:
@article{richardsonant, title={Ant behavioural maturation is mediated by a stochastic transition between two fundamental states.}, author={Richardson, TO and Braunschweig, R and Journeau, OA and R{\"u}egg, M and McGregor, S and De Los Rio, P and Keller, L}, journal={Current Biology} }
Tag v1.0 of this repository refers to the version used for the aforementioned publication.
Please also cite:
@inproceedings{lin2008facetnet, title={Facetnet: a framework for analyzing communities and their evolutions in dynamic networks}, author={Lin, Yu-Ru and Chi, Yun and Zhu, Shenghuo and Sundaram, Hari and Tseng, Belle L}, booktitle={Proceedings of the 17th international conference on World Wide Web}, pages={685--694}, year={2008}, organization={ACM} }
Written by Group L. Keller, Université de Lausanne, Departement of Ecology and Evolution. Contact: Matthias Rüegg, matthias.ruegg@unil.ch
Copyright 2019 UNIL. All rights reserved.
This file is part of facetnet-python-unil. facet-python-unil is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. facet-python-unil is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with facet-python-unil. If not, see <https://www.gnu.org/licenses/>.