Skip to content
This repository has been archived by the owner on May 4, 2023. It is now read-only.

Automatically reject some clusters! Any metric? #141

Open
sevgiozturk opened this issue Aug 17, 2019 · 5 comments
Open

Automatically reject some clusters! Any metric? #141

sevgiozturk opened this issue Aug 17, 2019 · 5 comments

Comments

@sevgiozturk
Copy link

Hi Fernando, I recently decided to use Wave_Clus among other sorters. I run batch functions for my cortical recording data set coming from 16-channel microwire arrays. Can I check any metric out of results so that I can eliminate some clusters (even some channels at all) automatically within the code. Here one example that I don't want to include this result as a good single/multi-unit activity!
fig2print_Ch10

@ferchaure
Copy link
Member

Sorry I don't have a proper solution for your answer. Any metric used for checking that type of thing will depend on the recording setup. For example you could detect line noises as a strong sinusoidal waveform (with a frequency of 50/60Hz), and an amplitude that could change with each animal/patient.
Maybe you could use that some artefact will appear in multiple electrodes at the same time. etc etc
But usually is a bit dangerous to remove events using some automatic artefact detector.

Check the sampling rate and the w_pre and w_post parameters, because the cluster 3 looks like it could be a single unit, but it is hard to see lost in so many samples.

@sevgiozturk
Copy link
Author

Thanks for your answer, I think I'll do rejection manually.

I set sampling rate is 50K and I already arranged w_pre=40 and w_post=88, I thought 2.6 ms should be quite enough to capture an AP ?!

@ferchaure
Copy link
Member

Perfect, nice sampling rate

@sevgiozturk
Copy link
Author

Hi Fernando, I'm back after three years :) I'll try to use some kind of metric that quantifies the sorted clusters i.e; L-ratio, isolation distance, etc.. Which metric would be proper to use in terms of superparamagnetic clustering/template matching? Do you think if I can calculate any kind of pre- and post-sorting metric like this, or if there is any study has been done on top of yours that you may give a lead, I would appreciate that! Thank you

@sevgiozturk sevgiozturk reopened this Aug 12, 2022
@ferchaure
Copy link
Member

These are tricky questions, I will give you my opinions for the time being. I'm currently looking for nice metrics as well.

Which metric would be proper to use in terms of superparamagnetic clustering/template matching?

The superparamagnetic clustering is quite good, the only issue is overclustering, but that is particularly obvious after template matching. After forcing, you see that even when the clustering could detect a particular (sometimes spurious) difference in some spikes, the noise doesn't allow to separate the units.
On the other hand forcing is the weak point of wave_clus, the template matching could add noise to clean units. Manual curation and "cleaning" is sometimes necessary.
My comment there is: check the units after matching, don't lose time with only the superparamagnetic clustering output.

Do you think if I can calculate any kind of pre- and post-sorting metric like this, or if there is any study has been done on top of yours that you may give a lead, I would appreciate that!

I haven't found a really good metric for single channels recordings. I like L-ratio but just to let me know which units are really really well isolated (It's base in PCA and that is not always a nice projection). Another way to see if the units are different even then metrics like L-ratio tell you otherwise is to merge them and plot them in a heatmap, sometimes is obvious that you have clearly two waveforms, (but that difference is not present in the fist 8 PCA). I made a little gui for that https://github.com/ferchaure/celestina and if you load the result in spikeinterface using this gui https://github.com/SpikeInterface/spikeinterface-gui is to possible to see it as well.

Another things to look at is the amplitude of the spikes over time (maybe you have drifting) and the distribution of the amplitudes to know which cluster is probably a multiunit. Both GUIs have these plots as well. Sorry to be so
evasive with my answer, I cannot recommend any current metric.

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

No branches or pull requests

2 participants