SDCCA / DGL-PTM

The deep graph library implementation of the poverty trap model
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Expand link deletion possibilities to include deleting specified number of links (and/or weighted deletion) #71

Closed meiertgrootes closed 1 day ago

meiertgrootes commented 3 weeks ago

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

vanlankveldthijs commented 3 weeks 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.

meiertgrootes commented 3 weeks ago

@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.

meiertgrootes commented 1 day ago

tested and done