Extraction
Main part of the tool, containing the extraction functions.
extract_data(graph_specs)
Extracts heterogeneous data from the Graph Specs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
graph_specs
|
GraphSpecs
|
Graph specs containing the data sources. |
required |
Returns:
| Type | Description |
|---|---|
HeteroData
|
Constructed heterogeneous graph data. |
Source code in hextractor/extraction.py
validate_consistency(hetero_g)
Validates the consistency of the constructed heterogeneous graph data. Checks if e.g. the number of nodes and edges is consistent with the specs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hetero_g
|
HeteroData
|
Constructed heterogeneous graph data. |
required |
require_all_node_attributes
|
bool
|
If True, checks if all node types (event those present only in the edge index dictionary) have the 'x' attribute. |
required |