Skip to content

giosem1/hypernegative

Repository files navigation

Contributors Forks Stargazers Issues project_license LinkedIn


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

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/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

imdb_pipeline --help

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

imdb_pipeline --dataset_name COURSERA --negative_sampling MotifHypergraphNegativeSampler --hlp_method CommonNeighbors

(back to top)

Contact

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

Project Link: https://github.com/giosem1/hypernegative

(back to top)

Acknowledgments

(back to top)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages