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.
Dependencies
- numpy
- scipy
- scikit-learn
Installation
Install the package by:
pip3 install spectralcluster
or
python3 -m pip install spectralcluster
Tutorial
Simply use the predict()
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.predict(X)
The input X
is a numpy array of shape (n_samples, n_features)
,
and the returned labels
is a numpy array of shape (n_samples,)
.
For the complete list of parameters of the clusterer, see
spectralcluster/spectral_clusterer.py
.
Citations
Our paper is cited as:
@inproceedings{wang2018speaker,
title={Speaker diarization with lstm},
author={Wang, Quan and Downey, Carlton and Wan, Li and Mansfield, Philip Andrew and Moreno, Ignacio Lopz},
booktitle={2018 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)},
pages={5239--5243},
year={2018},
organization={IEEE}
}
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.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a640bc05ddc880116db0b5c4b6c0bfe5dd655a03f026f7c8c20de2caf1c28d4a |
|
MD5 | ff8fc2ecb219132987efb4626395ac62 |
|
BLAKE2b-256 | 3dde2f43699efccbc3aebbe09c07dca702ea8910e9ec5d13ef0581ce932dc7dd |