torch_geometric.transforms.TargetIndegree

class TargetIndegree(norm: bool = True, max_value: Optional[float] = None, cat: bool = True)[source]

Bases: BaseTransform

Saves the globally normalized degree of target nodes (functional name: target_indegree).

\[\mathbf{u}(i,j) = \frac{\deg(j)}{\max_{v \in \mathcal{V}} \deg(v)}\]

in its edge attributes.

Parameters:

cat (bool, optional) – Concat pseudo-coordinates to edge attributes instead of replacing them. (default: True)