title: Spectral Clustering a graph in python
body: <p>I'd like to cluster a graph in python using spectral clustering. </p>
  
  <p>Spectral clustering is a more general technique which can be applied not only to graphs, but also images, or any sort of data, however, it's considered an exceptional <em>graph</em> clustering technique. Sadly, I can't find examples of spectral clustering graphs in python online. </p>
  
  <ul>
  <li><p>Scikit Learn has two spectral clustering methods documented: <a href="http://scikit-learn.org/stable/modules/generated/sklearn.cluster.SpectralClustering.html" rel="noreferrer">SpectralClustering</a> and <a href="http://scikit-learn.org/stable/modules/generated/sklearn.cluster.spectral_clustering.html" rel="noreferrer">spectral_clustering</a> which seem like they're not aliases.</p></li>
  <li><p>Both of those methods mention that they could be used on graphs, but do not offer specific instructions. <a href="http://scikit-learn.org/stable/modules/clustering.html#spectral-clustering" rel="noreferrer">Neither does the user guide</a>. I've <a href="https://github.com/scikit-learn/scikit-learn/issues/9481" rel="noreferrer">asked for such an example from the developers</a>, but they're overworked and haven't gotten to it. </p></li>
  <li><p>A good network to document this against is the <a href="https://en.wikipedia.org/wiki/Zachary%27s_karate_club" rel="noreferrer">Karate Club Network</a>. It's included <a href="https://networkx.github.io/documentation/networkx-1.10/reference/generated/networkx.generators.social.karate_club_graph.html" rel="noreferrer">as a method in networkx</a>. </p></li>
  </ul>
  
  <p>I'd love some direction in how to go about this. If someone can help me figure it out, I can add the documentation to scikit learn.</p>
  
  <h3>Notes:</h3>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/23684746/spectral-clustering-using-scikit-learn-on-graph-generated-through-networkx">A question much like this one has already been asked on this site</a>.</li>
  </ul>