get_relation_cardinality_types_df
- get_relation_cardinality_types_df(*, dataset, parts=None, add_labels=True)[source]
Determine the relation cardinality types.
The possible types are given in relation_cardinality_types.
Note
In the current implementation, we have by definition
\[1 = \sum_{type} conf(relation, type)\]Note
These relation types are also mentioned in [wang2014]. However, the paper does not provide any details on their definition, nor is any code provided. Thus, their exact procedure is unknown and may not coincide with this implementation.
- Parameters
dataset (
Dataset
) – The dataset to investigate.parts (
Optional
[Collection
[str
]]) – Only use certain parts of the dataset, e.g., train triples. Defaults to using all triples, i.e. {“training”, “validation”, “testing}.add_labels (
bool
) – Whether to add relation labels (if available).
- Return type
DataFrame
- Returns
A dataframe with columns ( relation_id | relation_type )