Spectral Clustering
Project description
Spectral Clustering
Overview
This is a Python re-implementation of the spectral clustering algorithm in the paper Speaker Diarization with LSTM.
Disclaimer
This is not the original implementation used by the paper.
Specifically, in this implementation, we use the K-Means from scikit-learn, which does NOT support customized distance measure like cosine distance.
Tutorial
Simply use the cluster()
method of class SpectralClusterer
to perform
spectral clustering.
from spectralcluster import SpectralClusterer
clusterer = SpectralClusterer(
min_clusters=2,
max_clusters=100,
p_percentile=0.95,
gaussian_blur_sigma=1)
labels = clusterer.cluster(X)
The input X
is a numpy array of shape (n_samples, n_features)
,
and the returned 1abels
is a numpy array of shape (n_samples,)
.
For the complete list of parameters of the clusterer, see
spectralcluster/spectral_clusterer.py
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for spectralcluster-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66ed16681196f8c6e72aa56f91c6a9ebf1669c533c5d36053170be24c23f169e |
|
MD5 | 82f1f6f9a9af06f4ca3842d2c830c364 |
|
BLAKE2b-256 | 0fa3bdbd988dce6c0381babfbff91d17e8a32c972248b88840084a4a20aef12c |