Visualize distance matrix as a graph

后端 未结 4 743
一生所求
一生所求 2020-12-15 02:14

I am doing a clustering task and I have a distance matrix. I wish to visualize this distance matrix as a 2D graph. Please let me know if there is any way to do it online or

4条回答
  •  甜味超标
    2020-12-15 03:01

    You did not mentioned if you want a 2 dimensional graph or not. I suppose that you want to build a graph on 2 dimensions due to the fact that you need that for visualization. Considering that you have to be aware that for the most of the graphs this is simply not possible.

    What can be probably done is to approximate somehow the values from distance matrix, something like small values to have relative small edges and big values to have a relative big length.

    With all previous considerations one option would be graphviz. See neato function. In general what you are interested in is force-directed drawing. See wikipedia for further reference.

提交回复
热议问题