The algorithm in this package is inspired about the paper "Detecting Topic Authoritative Social Media Users: a Multilayer Network Approach". In this paper, the authors propose a method capable to find influential users by exploiting the contents of the messages posted by them to express opinions on items, by modeling these contents with a three-layer network.
The full paper and other materials are avaible on ICAR-CNR website.
I try to develop an algorithm like SocialAU using JAX, PyTorch and NumPy for calculations between tensors.
* Python >= 3.8.5
* Numpy >= 1.20
* PyTorch >= 1.10.2
- Clone or download .zip and unzip
- Using terminal go into the folder with setup.py
- Digit the following command
python setup.py install
- Try
import influencer
influencer.__version__
or
sudo apt install git
pip install git+https://github.com/nickprock/influencer.git
If you use my code in your research, please cite this project:
@misc{influencer-centrality,
author = {Nicola Procopio,
title = {Influencer Centrality},
howpublished = {\url{https://github.com/nickprock/influencer}},
year = {2020}
}
and this paper:
@article{oro2017detecting,
title={Detecting topic authoritative social media users: a multilayer network approach},
author={Oro, Ermelinda and Pizzuti, Clara and Procopio, Nicola and Ruffolo, Massimo},
journal={IEEE Transactions on Multimedia},
volume={20},
number={5},
pages={1195--1208},
year={2017},
publisher={IEEE}
}
The package contains others centrality measure like:
I tested the performance about JAX vs Numpy vs PyTorch on HITS algorithm here on Google Colab. Other tests are available in notebook directory.
The focus on Numpy vs PyTorch
Execution time in log10 scale.
At the moment numpy work better than JAX but I may have made some mistakes (the reason could be this). PyTorch is the best implementation, in socialAU works fine up to 10^9 nodes, runtime broke down with a tensor of about 5B nodes. Numpy stops at 10^8 nodes.
Please report it in the issues.
The library allows you to use only numpy versions beacuse JAX is not avaible for Windows, but the script is into lazy_centrality.py
Have Fun!
The code present in this project is licensed under the MIT License.
Quest'opera è distribuita con Licenza Creative Commons Attribuzione 4.0 Internazionale.