Add functionality in hetmech to query a set of nodes in order to return a ranked list of connection predictions along with the corresponding metapaths.
For example, if a set of genes were queried, we would want output of the form:
Predictions
| Rank |
End Node |
Metapath |
DWPC |
p-DWPC |
r-DWPC |
| 1 |
Compound A |
CbGpPpG |
... |
... |
... |
| 2 |
Disease B |
DtCcCcCbG |
... |
... |
... |
| 3 |
Anatomy C |
AlDtC<rG |
... |
... |
... |
| ... |
... |
... |
... |
... |
... |
In order to reduce computation time, it may be useful to cache DWPC matrices so that a set of query nodes (given as a vector) can be queried almost instantly (order ~ 100 microseconds).
It should be noted that after work done in #54 and #43 to add sparse matrix functionality, the computation time for DWPC over all 752 compatible Rephetio metapaths has been reduced from a total of 6.5 hours to 48 minutes! In fact, the longest computation time for DWPC over a single metapath is now around 35 seconds, while the average time is about 3.9 seconds (see below).
Caching the DWPC matrices for the 752 Rephetio metapaths using scipy.io.savemat saves 752 sparse matrices as a .mat file. The file size for all these matrices is 461 MB.
The histogram below shows the distribution of DWPC times over the 752 metapaths.

Add functionality in hetmech to query a set of nodes in order to return a ranked list of connection predictions along with the corresponding metapaths.
For example, if a set of genes were queried, we would want output of the form:
Predictions
In order to reduce computation time, it may be useful to cache DWPC matrices so that a set of query nodes (given as a vector) can be queried almost instantly (order ~ 100 microseconds).
It should be noted that after work done in #54 and #43 to add sparse matrix functionality, the computation time for DWPC over all 752 compatible Rephetio metapaths has been reduced from a total of 6.5 hours to 48 minutes! In fact, the longest computation time for DWPC over a single metapath is now around 35 seconds, while the average time is about 3.9 seconds (see below).
Caching the DWPC matrices for the 752 Rephetio metapaths using
scipy.io.savematsaves 752 sparse matrices as a.matfile. The file size for all these matrices is 461 MB.The histogram below shows the distribution of DWPC times over the 752 metapaths.
