swamp.clustering.spectral module

class Spectral(nthreads=1, n_iter=100, logger=None)[source]

Bases: swamp.clustering.clustering.Clustering

This class implements methods and datastructures to work with sklearn.cluster.Spectral

Example:
>>> from swamp.clustering import Spectral
>>> import joblib
>>> dist_mtx = joblib.load('<dist_mtx.pckl>')
>>> dist_mtx = dist_mtx.fillna(0)
>>> my_clst = Spectral(dist_mtx)
>>> my_clst.grid_search()
cluster()[source]

Method to perform a clustering using the best_params

Raises:ValueError – the attribute similarity_mtx is None