DataSet

class DataSet[source]

Bases: object

Contains a lazy reference to a training, testing, and validation data set.

Attributes Summary

entity_to_id

The mapping of entity labels to IDs.

num_entities

The number of entities.

num_relations

The number of relations.

relation_to_id

The mapping of relation labels to IDs.

Methods Summary

from_path(path[, ratios])

Create a dataset from a single triples factory by splitting it in 3.

from_tf(tf[, ratios])

Create a dataset from a single triples factory by splitting it in 3.

get_normalized_name()

Get the normalized name of the dataset.

summarize()

Print a summary of the dataset.

summary_str()

Make a summary string of all of the factories.

Attributes Documentation

entity_to_id

The mapping of entity labels to IDs.

num_entities

The number of entities.

num_relations

The number of relations.

relation_to_id

The mapping of relation labels to IDs.

Methods Documentation

classmethod from_path(path, ratios=None)[source]

Create a dataset from a single triples factory by splitting it in 3.

Return type

DataSet

static from_tf(tf, ratios=None)[source]

Create a dataset from a single triples factory by splitting it in 3.

Return type

DataSet

classmethod get_normalized_name()[source]

Get the normalized name of the dataset.

Return type

str

summarize()[source]

Print a summary of the dataset.

Return type

None

summary_str()[source]

Make a summary string of all of the factories.

Return type

str