Skip to main content

A small library for loading and downloading relational datasets

Project description

relational-datasets - (Pre-Alpha Release)

A small library for loading and downloading relational datasets.

pip install relational-datasets

PyPi Version License Python Package Builds Documentation Deploy

Pre-Alpha Release

This API and the datasets at https://github.com/srlearn/datasets/ are currently being experimented with.

Open enhancements and bugs are tracked here:

Use Case 1: Fetching Zipfiles

Running the fetch method downloads a version of a datset to your local cache:

import relational_datasets

relational_datasets.fetch("toy_cancer")
relational_datasets.fetch("toy_father", "v0.0.2")
relational_datasets.fetch("cora")

Resulting in:

~/relational_datasets/
├── toy_cancer_v0.0.3.zip   <--- latest
├── toy_father_v0.0.2.zip   <--- specific version
└── cora_v0.0.3.zip         <--- latest

Use Case 2: Loading Data

The load method returns train and test folds—each with pos, neg, and facts. Internally it uses fetch, so it will automatically download a dataset if it is not available.

For example: "Load fold-2 of webkb"

from relational_datasets import load

train, test = load("webkb", "v0.0.3", fold=2)

print(len(train.facts))
# 1344

Install

From PyPi

pip install relational-datasets

From GitHub Source

git clone https://github.com/srlearn/relational-datasets.git
cd relational-datasets
pip install -e .

Contributions

This package was partially based on datasets from the Starling Lab Datasets Collection, which included specific contributions by Harsha Kokel and Devendra Singh Dhami. Tushar Khot converted many to the ILP format from Alchemy 2 format, but that occurred before versions were tracked. Some inspiration was drawn from the "RelationalDatasets" list that Jonas Schouterden collected.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

relational-datasets-0.1.1.tar.gz (12.5 kB view hashes)

Uploaded Source

Built Distribution

relational_datasets-0.1.1-py3-none-any.whl (13.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page