Spike Cluster Score (SCS) is a clustering performance metric designed with the purpose of spike sorting in mind
Project description
Spike-Cluster-Score
Spike Cluster Score (SCS) is a clustering performance metric designed with the purpose of spike sorting in mind. Like Purity, it will evaluate the clustering of each sample as its own cluster as a perfect clustering. SCS was developed to not punish overclustering, as overclustering is acceptable for some applications. SCS was developed as underclustering was considered unacceptable and Purity did not penalise enough the underclustering of K-Means and DBSCAN. As a result, the score of Purity was similar across all algorithms. It is the user’s responsibility to evaluate how much overclustering is acceptable for each dataset. Clustering each sample as its own cluster will receive a perfect score but will not provide information. We recommend using SCS together with other performance evaluation metrics, while taking into consideration the weaknesses of each metric.
SCS was published in Frontiers in Computational Neuroscience, alongside with a clustering algorithm.
Install:
pip install spike-cluster-score
Usage example:
import numpy as np
from sklearn.cluster import KMeans
from spike_cluster_score import spike_cluster_score
for sim_nr in [1,4,21,22,30]:
X = np.load(f"./data/sim{sim_nr}_data.npy")
y = np.load(f"./data/sim{sim_nr}_labels.npy")
nr_clusters = len(np.unique(y))
kmeans = KMeans(n_clusters=nr_clusters, random_state=0).fit(X)
print(f"{spike_cluster_score(y, kmeans.labels_):.3f}")
Citation
We would appreciate it, if you cite the paper when you use this work:
- For Plain Text:
E.-R. Ardelean, A.-M. Ichim, M. Dînşoreanu, and R. C. Mureşan, “Improved space breakdown method – A robust clustering technique for spike sorting,” Frontiers in Computational Neuroscience, vol. 17, 2023, doi: 10.3389/fncom.2023.1019637.
- BibTex:
@ARTICLE{10.3389/fncom.2023.1019637,
AUTHOR={Ardelean, Eugen-Richard and Ichim, Ana-Maria and Dînşoreanu, Mihaela and Mureşan, Raul Cristian},
TITLE={Improved space breakdown method – A robust clustering technique for spike sorting},
JOURNAL={Frontiers in Computational Neuroscience},
VOLUME={17},
YEAR={2023},
URL={https://www.frontiersin.org/articles/10.3389/fncom.2023.1019637},
DOI={10.3389/fncom.2023.1019637}
}
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spike_cluster_score-0.0.1.tar.gz.
File metadata
- Download URL: spike_cluster_score-0.0.1.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d12e318491a23012494d84c6abe60414119ed08ef881f21783d456c79f736242
|
|
| MD5 |
84d4c8c9e8c96510cf4394c0a18cea99
|
|
| BLAKE2b-256 |
cbc0526746a1bf4d5d3d45cc07e4d9c293ee242b0ca3e2d975a85f5f408cd995
|
File details
Details for the file spike_cluster_score-0.0.1-py3-none-any.whl.
File metadata
- Download URL: spike_cluster_score-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
307d02a82b929653a6731ebcb4fb16de778cdb5af92da1d2599a2cde83e21547
|
|
| MD5 |
7c2b293105bdb36c460dc46de15716a1
|
|
| BLAKE2b-256 |
9cde222edde9d40b77fe4af247a68722657f2c057590572f020757a299620ab5
|