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
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
- Alexander Hayes - Indiana University, Bloomington
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file relational-datasets-0.1.1.tar.gz.
File metadata
- Download URL: relational-datasets-0.1.1.tar.gz
- Upload date:
- Size: 12.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e18adb47f7404d88e8a29c0bd2fd95a5a09981528b5fba7d8b1ea5dc4b5124a
|
|
| MD5 |
13751dda5284e3c42c9dfcdc9b3f732f
|
|
| BLAKE2b-256 |
1af522a4e8d447ada9b5df11ffee741198220de41cca469d48a5fa7a38bbd1da
|
File details
Details for the file relational_datasets-0.1.1-py3-none-any.whl.
File metadata
- Download URL: relational_datasets-0.1.1-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e1b391530d51dc17a58a0d59b0e0f5f287df32791bddb7fd9884544a1ccac4a
|
|
| MD5 |
f467c3441fcf38da39c3ca58e11aaa30
|
|
| BLAKE2b-256 |
249b2d1453f6305bc5c949f24ad67db681b3712b9cdd0c61fd758019f36e2891
|