cvxgrp / pymde

Minimum-distortion embedding with PyTorch
https://pymde.org
Apache License 2.0
537 stars 27 forks source link

Interface with igraph #20

Open rajarshi opened 3 years ago

rajarshi commented 3 years ago

Hi, really interesting package with some great features. It'd be really handy if it were able to use objects constructed using igraph

akshayka commented 3 years ago

Hey, thanks for this piece of feedback. Adding new dependencies is a big change, so I'll have take some time to evaluate this.

In the meantime, if igraph has methods that return the edges and edge weights, you could pass these to the relevant functions in PyMDE (after wrapping them in torch.Tensor objects).

For example, I believe you can get the edges from an igraph object with graph.get_edgelist().

By the way, if you have feedback on the graph API that PyMDE has, or if there are other features you would like PyMDE to support (e.g., wrt to graph drawing), please let me know! There's a lot one can do to layout/draw graphs using PyMDE, but as I'm sure you're aware PyMDE does not have as rich of a graph API as NetworkX or iGraph do. My plan is to gradually layer in new features as I get a sense of what people would like.