Contents

scikits.learn.cluster.SpectralClustering

class scikits.learn.cluster.SpectralClustering(k=8, mode=None)

Spectral clustering: apply k-means to a projection of the graph laplacian, finds normalized graph cuts.

Parameters :

k: integer, optional :

The dimension of the projection subspace.

mode: {None, ‘arpack’ or ‘amg’} :

The eigenvalue decomposition strategy to use. AMG (Algebraic MultiGrid) is much faster, but requires pyamg to be installed.

Attributes

labels_: Labels of each point

Methods

fit(X): Compute spectral clustering
__init__(k=8, mode=None)
fit(X, **params)

Compute the spectral clustering from the adjacency matrix of the graph.

Parameters :

X: array-like or sparse matrix, shape: (p, p) :

The adjacency matrix of the graph to embed.

Notes

If the pyamg package is installed, it is used. This greatly speeds up computation.