A Python library for the evaluation of Hyperlink Prediction algorithms
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
Hypernegative is a Python library designed for the evaluation of Hyperlink Prediction (HLP) models. It provides a unified interface for all components of an evaluation pipeline, ensuring consistency, modularity, and ease of use.
The library is structured as a modular and reusable framework, with a strong focus on reproducibility in both Hyperlink Prediction (HLP) and Negative Sampling (NS) methods.
Originally developed as a Bachelor’s thesis project in Computer Science at the University of Salerno, Hypernegative is intended to evolve into a research and experimentation tool in the domains of HLP and NS.
Follow these steps to set up the project locally.
Hypernegative supports Python 3.9 to 3.13.
You can install Hypernegative, which requires PyTorch and PyTorch Geometric (PyG), by running:
You can install and use Hypernergative wich require the library PyTorch and PyG. For this, simply run
pip install git+https://github.com/giosem1/hypernegativeYou can either use Hypernegative as a Python library or through the CLI.
from hypernegative.hyperlink_prediction.datasets import IMDBHypergraphDataset
from hypernegative.hyperlink_prediction.loader import DatasetLoader
dataset = IMDBHypergraphDataset()
loader = DatasetLoader(
dataset,
"MotifHypergraphNegativeSampler",
dataset._data.num_nodes,
batch_size=4000,
shuffle=True,
drop_last=True
)Show available options
imdb_pipeline --helpRun a pipeline with a specific dataset, negative sampling strategy, and HLP method:
imdb_pipeline --dataset_name COURSERA --negative_sampling MotifHypergraphNegativeSampler --hlp_method CommonNeighborsGiovanni Semioli - g.semioli1@studenti.unisa.it
Project Link: https://github.com/giosem1/hypernegative
