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
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.0.tar.gz.
File metadata
- Download URL: relational-datasets-0.1.0.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9b507de0a65ac23e8d15b8aaceba45597874bf0a1a2b9e4dd69bfae2678daf3
|
|
| MD5 |
d4280135ca445769e325df7346af8c7b
|
|
| BLAKE2b-256 |
0dc27204d0c4536824a21424eae8e8a66b71a7ada4e9e720210017f4b8065bce
|
File details
Details for the file relational_datasets-0.1.0-py3-none-any.whl.
File metadata
- Download URL: relational_datasets-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea08b415250a859075f080a0ea61403a883abcde2cae3a8b186fdb47fff76db1
|
|
| MD5 |
a6462c923b1c5e1e934c52074e473e82
|
|
| BLAKE2b-256 |
1e685ea1ab9ecf6cdf5d035edc2d4491394aea83e56f912631c7a87f405d3fc0
|