I have the following dataset:
This data says for exampe that
= 1 is directly connected to
= 2, 4, and 5 and indirectly connected (within two paths) to
= 3, 6, and 7. I can use some Python package like
to build the network of firm's connectivity. Now, I want to use Spectral Clustering (I guess this the correct methodology) to form clusters based on distance (number of edges separating each firm) and see how these clusters are connected to each other.
I would first define an adjacency matrix W of the above data. I then use <img src=" " alt="enter image description here">
where <em>dist</em> is the distance between firm i and firm j, and c is a scale parameter to each element in W and then compute the Laplacian matrix (see <a href="http://mikelove.wordpress.com/2010/04/28/spectral-clustering/" rel="nofollow noreferrer">here</a> for example).
Now my question is can Spectral Clustering give me the link between each clusters and how far apart are the clusters (how many edges separate the clusters)? I was thinking to use <a href="http://scikit-learn.org/stable/auto...html#example-cluster-plot-segmentation-toy-py" rel="nofollow noreferrer">this</a>, the
package in Python but I have no idea how I can generate the links between clusters using
.
Code:
firm_id firm_id_
1 2
1 4
1 5
2 1
2 3
3 2
3 6
4 1
4 5
4 6
5 4
5 7
6 3
...
This data says for exampe that
Code:
firm_id
Code:
firm_id
Code:
firm_id
Code:
networkx
I would first define an adjacency matrix W of the above data. I then use <img src=" " alt="enter image description here">
where <em>dist</em> is the distance between firm i and firm j, and c is a scale parameter to each element in W and then compute the Laplacian matrix (see <a href="http://mikelove.wordpress.com/2010/04/28/spectral-clustering/" rel="nofollow noreferrer">here</a> for example).
Now my question is can Spectral Clustering give me the link between each clusters and how far apart are the clusters (how many edges separate the clusters)? I was thinking to use <a href="http://scikit-learn.org/stable/auto...html#example-cluster-plot-segmentation-toy-py" rel="nofollow noreferrer">this</a>, the
Code:
scikit
Code:
sklearn.cluster