Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spike_cluster_score-0.0.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spike_cluster_score-0.0.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

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

Hashes for spike_cluster_score-0.0.1.tar.gz
Algorithm Hash digest
SHA256 d12e318491a23012494d84c6abe60414119ed08ef881f21783d456c79f736242
MD5 84d4c8c9e8c96510cf4394c0a18cea99
BLAKE2b-256 cbc0526746a1bf4d5d3d45cc07e4d9c293ee242b0ca3e2d975a85f5f408cd995

See more details on using hashes here.

File details

Details for the file spike_cluster_score-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for spike_cluster_score-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 307d02a82b929653a6731ebcb4fb16de778cdb5af92da1d2599a2cde83e21547
MD5 7c2b293105bdb36c460dc46de15716a1
BLAKE2b-256 9cde222edde9d40b77fe4af247a68722657f2c057590572f020757a299620ab5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page