Closed meiertgrootes closed 1 day ago
For the "link rot" implementation, each edge has a chance of being deleted, meaning that before the process you only have and estimate of the number of edges that will be actually deleted.
For the fixed number of links implementation, the number of actually deleted edges should be exactly this number.
We should be careful of how this works for directed edges: we always want to remove directed edges together with their mirror edge. We should also be careful that we do not select both a directed edge and its mirror for deletion, as this would reduce the number of actually deleted edges.
@vanlankveldthijs Agreed. This situation occurs across many of the operations we need, especially as DGL does not broadly support non-directed edges. Operating on the adjacency matrix and using its triangular forms (because of its symmetry) provides a powerful way to handle these problems. IIrc, the current implementation of link deletion, as well as the other metods in the network module of dgl-ptm provide examples and methods that could be reused.
tested and done
Currently link deletion is implemented via a stocahstic "link rot" process applied to each link. This is functionally different from the way in which link creation is implemented (specified number). We would like to add a link deletion method that
[x] removes a specified number of links at random we should also consider
[x] a method that removes links in a weighted fashion (less chance for close links). Both stochastic over all, and specified number.
[x] We should make (all) these options available via a link deletion wrapper with method specification.