Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up post-clustering processing #32

Closed
mhhennig opened this issue May 25, 2018 · 4 comments
Closed

Speed up post-clustering processing #32

mhhennig opened this issue May 25, 2018 · 4 comments
Assignees

Comments

@mhhennig
Copy link
Owner

Building the table of clusters, after clustering, takes a long time, often longer than the actual clustering. This seems unnecessary and needs checking. It's the last bit in the CombinedClustering method.

@mhhennig mhhennig self-assigned this May 25, 2018
@frozenblit
Copy link
Collaborator

Have you tried using spikes.groupby('cl')? Then you can loop over the tuples (cluster_number, spikes within that cluster) and use all the pandas machinery to efficiently calculate the grouped means and amplitudes. In my experience that was much faster than iterating over the cluster labels.

@mhhennig
Copy link
Owner Author

Indeed, wow, thank you Fernando! This is now much faster, and as a side effect, DBSCAN now works flawlessly.

@frozenblit
Copy link
Collaborator

Pandas is magical ;)

@martinosorb
Copy link
Collaborator

Ah, this is my fault, I don't understand Pandas very well. Thanks Fernando!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants