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.
Requirements:
- torch>=1.13.0
- torch-geometric>=2.6.1
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 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
pipeline --helpRun a pipeline with a specific dataset, negative sampling strategy, and HLP method:
pipeline --dataset_name COURSERA --negative_sampling MotifHypergraphNegativeSampler --hlp_method CommonNeighbors --output_path ./resultsGiovanni Semioli - g.semioli1@studenti.unisa.it
Project Link: https://github.com/hypernetwork-research-group/hypernegative
