Wn18rr¶
Wn18rr dataset.
Parameters¶
-
batch_size
-
shuffle – defaults to
True
-
pre_compute – defaults to
True
-
num_workers – defaults to
1
-
seed – defaults to
None
Attributes¶
-
train (list): Training set.
valid (list): Validation set. test (list): Testing set. entities (dict): Index of entities. relations (dict): Index of relations. n_entity (int): Number of entities. n_relation (int): Number of relations.
Examples¶
>>> from ckb import datasets
>>> dataset = datasets.Wn18rr(batch_size=1, pre_compute=True, shuffle=True, seed=42, num_workers = 0)
>>> dataset
Wn18rr dataset
Batch size 1
Entities 40943
Relations 11
Shuffle True
Train triples 69585
Validation triples 11381
Test triples 12037
Methods¶
fetch
get_train_loader
Initialize train dataset loader.
Parameters
- mode
mapping_entities
Construct mapping entities.
mapping_relations
Construct mapping relations.