get_anchor_embeddings
- class get_anchor_embeddings(graph: Data, anchors: Tensor)[source]
Bases:
Generate one-hot anchor embeddings for nodes in a graph based on given anchor nodes.
Parameters:
- graphtorch_geometric.data.Data
The input graph.
- anchorstorch.Tensor
A tensor containing the indices of anchor nodes in the graph.
Returns:
- anchor_embeddingstorch.Tensor
A tensor of shape (num_nodes, num_anchors) representing the one-hot anchor embeddings.