PPMIConv(in_channels, out_channels, weight=None, bias=None, improved=False, use_bias=True, path_len=5, **kwargs)
Bases: CachedGCNConv
Graph convolution layer using Pointwise Mutual Information (PPMI) for edge weighting.
| Parameters: |
|
|---|
Notes
Implements PPMI-based graph convolution by:
- Generating random walks to estimate node co-occurrences
- Computing PPMI scores for edge weights
- Applying normalized convolution with PPMI weights
norm(edge_index, num_nodes, edge_weight=None, improved=False, dtype=None)
Compute PPMI-based normalized adjacency matrix.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Notes
- Build adjacency dictionary
- Generate random walks
- Compute normalized co-occurrence probabilities
- Calculate PPMI scores
- Apply symmetric normalization
The PPMI computation follows: PPMI(a,b) = max(log(P(a,b)/(P(a)P(b)) * N/path_len), 0) where:
- P(a,b) is co-occurrence probability
- P(a), P(b) are marginal probabilities
- N is number of nodes