GraphPairCombinator
- class GraphPairCombinator[source]
Bases:
ABC
A base class for combination of a graph pair into a single graph.
Methods Summary
__call__
(left, right, alignment, **kwargs)Combine two graphs using the alignment information.
process
(mapped_triples, alignment, offsets)Process the combined mapped triples.
Methods Documentation
- __call__(left: TriplesFactory, right: TriplesFactory, alignment: DataFrame, **kwargs) tuple[TriplesFactory, Tensor] [source]
Combine two graphs using the alignment information.
- Parameters:
left (TriplesFactory) – the triples of the left graph
right (TriplesFactory) – the triples of the right graph
alignment (DataFrame) – columns: LEFT | RIGHT the alignment, i.e., pairs of matching entities
kwargs – additional keyword-based parameters passed to
TriplesFactory.__init__()
- Returns:
a single triples factory comprising the joint graph, as well as a tensor of pairs of matching IDs. The tensor of matching pairs has shape (2, num_alignments), where num_alignments can also be 0.
- Return type: