Giter Site home page Giter Site logo

simonepiaggesi / simplex2pred Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 10.31 MB

Data and code repository from "Effective Higher-order Link Prediction and Reconstruction from Simplicial Complex Embeddings"

License: GNU General Public License v3.0

Jupyter Notebook 92.23% Python 7.77%
higher-order-networks link-prediction representation-learning simplicial-complexes

simplex2pred's Introduction

Effective Higher-order Link Prediction and Reconstruction from Simplicial Complex Embeddings

In this repository you find code to run experiments of the paper "Effective Higher-order Link Prediction and Reconstruction from Simplicial Complex Embeddings". The library SNAP is needed, together with requirements.txt. The code has been tested with Python 3.6.13.

If you use the code in this repository, please consider citing us:

@inproceedings{piaggesi2022effective,
  title={Effective Higher-order Link Prediction and Reconstruction from Simplicial Complex Embeddings},
  author={Piaggesi, Simone and Panisson, Andr{\'e} and Petri, Giovanni},
  booktitle={Learning on Graphs Conference},
  pages={55--1},
  year={2022},
  organization={PMLR}
}

Repository organization

Description of folders

  • processed-data/: datasets downloaded from here and pre-processed (extraction of the largest projected component and filtering of unfrequent nodes). Original data can be downloaded also from here.
  • 3way-metrics-data/: 3-way scores computed with this code. We slightly adjusted the Julia code to calculate scores also for the quantiles 0-80 needed in the reconstruction task. You need to download this folder to run the 3-way analysis.

Description of python files

-simplex2hasse.py File got from the reference repo with few modifications for our purposes.

-snap_node2vec.py Utilities to run node2vec with the SNAP library.

-k_simple2vec.py Utilities to run k-simplex2vec, downloaded from the reference repo.

-calibrated_metrics.py Utilities to compute calibrated AUC-PR, downloaded from the reference repo.

-utils.py Utilities for our experiments.

Description of jupyter notebooks

-s2v_train.ipynb and ks2v_train.ipynb Jupyter notebooks to train Simplex2Vec and K-Simplex2Vec.

-negative_hyperedge_sampling.ipynb Jupyter notebook to sample negative hyperedges. You need to set the variable TUPLE_SIZE=3 (or 4) to sample results.

-s2v_dimensions_gridsearch.ipynb and ks2v_dimensions_gridsearch.ipynb Jupyter notebooks needed to find the best dimension scores in order to plot figures.

-3way_figures.ipynb and 3way_figures.ipynb Plot figures with previously computed results.

-4way_tables.ipynb and 4way_tables.ipynb Show results into tables.

References

  1. Billings, Jacob Charles Wright, et al. "Simplex2vec embeddings for community detection in simplicial complexes." arXiv preprint arXiv:1906.09068 (2019).
  2. Benson, Austin R., et al. "Simplicial closure and higher-order link prediction." Proceedings of the National Academy of Sciences 115.48 (2018): E11221-E11230.
  3. Hacker, Celia. "k-simplex2vec: a simplicial extension of node2vec." arXiv preprint arXiv:2010.05636 (2020).
  4. Siblini, Wissam, et al. "Master your metrics with calibration." International Symposium on Intelligent Data Analysis. Springer, Cham, 2020.

simplex2pred's People

Contributors

simonepiaggesi avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.