r"""Message passing of ``vertices to hyperedges``. The combination of ``v2e_aggregation`` and ``v2e_update``. Args: ``X`` (``torch.Tensor``): Vertex feature matrix. Size :math:`(|\mathcal{V}|, C)`. ``aggr`` (``str``): The aggregation method. Can be ``'mean'``, ``'sum
(
self,
X: torch.Tensor,
aggr: str = "mean",
v2e_weight: Optional[torch.Tensor] = None,
e_weight: Optional[torch.Tensor] = None,
drop_rate: float = 0.0,
)
| 1460 | return X |
| 1461 | |
| 1462 | def v2e( |
| 1463 | self, |
| 1464 | X: torch.Tensor, |
| 1465 | aggr: str = "mean", |
| 1466 | v2e_weight: Optional[torch.Tensor] = None, |
| 1467 | e_weight: Optional[torch.Tensor] = None, |
| 1468 | drop_rate: float = 0.0, |
| 1469 | ): |
| 1470 | r"""Message passing of ``vertices to hyperedges``. The combination of ``v2e_aggregation`` and ``v2e_update``. |
| 1471 | |
| 1472 | Args: |
| 1473 | ``X`` (``torch.Tensor``): Vertex feature matrix. Size :math:`(|\mathcal{V}|, C)`. |
| 1474 | ``aggr`` (``str``): The aggregation method. Can be ``'mean'``, ``'sum'`` and ``'softmax_then_sum'``. |
| 1475 | ``v2e_weight`` (``torch.Tensor``, optional): The weight vector attached to connections (vertices point to hyepredges). If not specified, the function will use the weights specified in hypergraph construction. Defaults to ``None``. |
| 1476 | ``e_weight`` (``torch.Tensor``, optional): The hyperedge weight vector. If not specified, the function will use the weights specified in hypergraph construction. Defaults to ``None``. |
| 1477 | ``drop_rate`` (``float``): Dropout rate. Randomly dropout the connections in incidence matrix with probability ``drop_rate``. Default: ``0.0``. |
| 1478 | """ |
| 1479 | X = self.v2e_aggregation(X, aggr, v2e_weight, drop_rate=drop_rate) |
| 1480 | X = self.v2e_update(X, e_weight) |
| 1481 | return X |
| 1482 | |
| 1483 | def v2e_of_group( |
| 1484 | self, |
no test coverage detected