Skip to content

hypernetwork-research-group/HyperlinkBench

Repository files navigation

Contributors Forks Stargazers Issues project_license PyPI


Logo

HYPERNEGATIVE

A Python library for the evaluation of Hyperlink Prediction algorithms
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contact
  5. Acknowledgments

About The Project

Product Name Screen Shot

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.

(back to top)

Built With

  • Python
  • PyTorch
  • Pytorch_geometric

(back to top)

Getting Started

Follow these steps to set up the project locally.

Installation

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 hypernegative

Usage

You can either use Hypernegative as a Python library or through the CLI.

Python example

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
)

CLI example

Show available options

pipeline --help

Run a pipeline with a specific dataset, negative sampling strategy, and HLP method:

pipeline --dataset_name COURSERA --negative_sampling MotifHypergraphNegativeSampler --hlp_method CommonNeighbors --output_path ./results

(back to top)

Contact

Giovanni Semioli - g.semioli1@studenti.unisa.it

Project Link: https://github.com/hypernetwork-research-group/hypernegative

(back to top)

Acknowledgments

(back to top)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages