HeterogeneousGraphMetadata
Layers · AiDotNet.NeuralNetworks.Layers
Represents metadata for heterogeneous graphs with multiple node and edge types.
Implements: ILayerStatePersistable
For Beginners
This defines the “schema” of your heterogeneous graph.
Think of a knowledge graph with different types of entities and relationships:
- Node types: Person, Company, Product
- Edge types: WorksAt, Manufactures, Purchases
This metadata tells the layer what types exist and how they connect.
Constructors
| Constructor | Summary |
|---|---|
HeterogeneousGraphMetadata() |
Properties
| Property | Summary |
|---|---|
Dictionary<string, ValueTuple<string, string>> EdgeTypeSchema { get; set; } |
Edge type connections: maps edge type to (source node type, target node type). |
Dictionary<string, int> NodeTypeFeatures { get; set; } |
Input feature dimensions for each node type. |
string[] EdgeTypes { get; set; } |
Names of edge types (e.g., [“likes”, “belongs_to”, “similar_to”]). |
string[] NodeTypes { get; set; } |
Names of node types (e.g., [“user”, “item”, “category”]). |
Methods
| Method | Summary |
|---|---|
string SaveState() |
|
void LoadState(string text) |