805 chars22 lines
Make sure to replace "your_matrix.csv"
with the actual path to your community matrix. In this script, we first perform spectral analysis on the data, determine the optimal number of clusters, run k-means clustering with the chosen number of clusters, and finally plot a cluster graph with the ordered centers.
gistlibby LogSnag