You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found that the output of bionic was just node embeddings of the fused network. I wonder if there is a simple way to get the edges and weights of the fused network(like the input networks), without changing the code of bionic.
The text was updated successfully, but these errors were encountered:
Hi, the best way to do this is to compute a pairwise cosine similarity of the embeddings, followed by thresholding the resulting similarities. You can do this using radius_neighbors_graph from sklearn:
def make_net(feat: pd.DataFrame, radius: float) -> nx.Graph:
net = radius_neighbors_graph(
feat.values, radius, mode="connectivity", metric="cosine"
)
net = nx.from_scipy_sparse_array(net)
net = nx.relabel_nodes(net, {idx: node for idx, node in enumerate(feat.index)})
net.remove_edges_from(nx.selfloop_edges(net))
net.remove_nodes_from(list(nx.isolates(net)))
return net
I found that the output of bionic was just node embeddings of the fused network. I wonder if there is a simple way to get the edges and weights of the fused network(like the input networks), without changing the code of bionic.
The text was updated successfully, but these errors were encountered: