A small library for loading and downloading relational datasets
Project description
relational-datasets
A small library for loading and downloading relational datasets.
Use Case 1: Managing Zipfiles of Data
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("webkb")
Resulting in:
~/relational_datasets/
├── toy_cancer_v0.0.3.zip <--- latest
├── toy_father_v0.0.2.zip <--- specific version
└── webkb_v0.0.3.zip <--- latest
Use Case 2: Loading Data
The load
method returns train and test folds—each with pos
, neg
, and facts
.
For example: "Load fold-2 of webkb"
from relational_datsets import load
train, test = load("webkb", fold=2)
print(len(train.facts))
# 1344 facts in fold-2 of webkb
Install
From PyPi
pip install relational-datasets
From GitHub Source
git clone git@github.com:hayesall/relational-datasets.git
cd relational-datasets
pip install -e .
Function Signatures: Quick Reference
Load or fetch data:
load(name: str, version: str = "", fold: int = 1) -> Tuple[RelationalDataset, RelationalDataset]
fetch(name: str, version: str = "") -> str
Get or clear the cache directory:
get_data_home(data_home=None) -> str
clear_data_home(data_home=None) -> None
Helper method to check the latest version of datasets on GitHub:
latest_version() -> str
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
Close
Hashes for relational-datasets-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9b507de0a65ac23e8d15b8aaceba45597874bf0a1a2b9e4dd69bfae2678daf3 |
|
MD5 | d4280135ca445769e325df7346af8c7b |
|
BLAKE2b-256 | 0dc27204d0c4536824a21424eae8e8a66b71a7ada4e9e720210017f4b8065bce |
Close
Hashes for relational_datasets-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea08b415250a859075f080a0ea61403a883abcde2cae3a8b186fdb47fff76db1 |
|
MD5 | a6462c923b1c5e1e934c52074e473e82 |
|
BLAKE2b-256 | 1e685ea1ab9ecf6cdf5d035edc2d4491394aea83e56f912631c7a87f405d3fc0 |