nichecompass.nn.OneHopGCNNormNodeLabelAggregator
- class nichecompass.nn.OneHopGCNNormNodeLabelAggregator(modality)
One-hop GCN Norm Node Label Aggregator class that uses a symmetrically normalized sum of the omics feature vector of a node’s 1-hop neighbors to build an aggregated neighbor omics feature vector for a node. It returns a concatenation of the node’s own omics feature vector and the gcn-norm aggregated neighbor omics feature vector as node labels for the omics reconstruction task.
- modality:
Omics modality that is aggregated. Can be either
rnaoratac.
Methods table
|
Forward pass of the One-hop GCN Norm Node Label Aggregator. |
Methods
- OneHopGCNNormNodeLabelAggregator.forward(x, edge_index, return_agg_weights=False)
Forward pass of the One-hop GCN Norm Node Label Aggregator.
- Parameters:
x (
Tensor) – Tensor containing the omics features of the nodes in the current node batch including sampled neighbors. (Size: n_nodes_batch_and_sampled_neighbors x n_node_features)edge_index (
Tensor) – Tensor containing the node indices of edges in the current node batch including sampled neighbors. (Size: 2 x n_edges_batch_and_sampled_neighbors)return_agg_weights (
bool(default:False)) – If ´True´, also return the aggregation weights (norm weights).
- Return type:
Tensor- Returns:
- x_neighbors:
Tensor containing the node labels of the nodes in the current node batch. These labels are used for the omics reconstruction task. (Size: n_nodes_batch x (2 x n_node_features))
- alpha:
Neighbor aggregation weights.