Skip to content

Conversation

huizizhang949
Copy link
Contributor

Copy of #3984 , before I somehow made a mess of it.

@zm711 zm711 added the qualitymetrics Related to qualitymetrics module label Jul 17, 2025
@alejoe91 alejoe91 added this to the 0.103.0 milestone Jul 17, 2025
Copy link
Member

@alejoe91 alejoe91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @huizizhang949!

Looking great! Just some minor comments in the warning message and a value to double check in the docs!


Expectation and use
-------------------

Noise cutoff attempts to describe whether an amplitude distribution is cut off.
The metric is loosely based on [Hill]_'s amplitude cutoff, but is here adapted (originally by [IBL]_) to avoid making the Gaussianity assumption on spike distributions.
Noise cutoff provides an estimate of false negative rate, so a lower value indicates fewer missed spikes (a more complete unit).
If the distribution is not truncated at the low-end, one would expect cutoff to be less than 5 and ratio less than 0.1.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@huizizhang949 @chrishalcrow

here we say that cutoff should be less than 5, but in the plot a cutoff of 1.961 shows a large cutoff. Maybe this should be 0.5 instead of 5?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, I think we are following what IBL suggests. @huizizhang949 what IBL arguments are equivalent to our arguments? It's something like they use some fixed number of bins, and they only include one bin in the low-tail? Maybe we can clarify this by saying something like:

A larger value of noise_cutoff suggests that the distribution is cut-off. IBL uses the default values of "..." and use a threshold of 5 to determine whether a unit is cut off or not. In practice, the IBL threshold is quite conservative, and a lower threshold might be better for your data. We suggest plotting the data using the plot_amplitudes widget to view your data when choosing your threshold.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, IBL's whitepaper suggests 5 for thresholding cutoff and 0.1 for ratio, but their code only computes and outputs cutoff (no ratio) and does not refer to any thresholds. Yes, they use the number of lower bins as the argument, with a default value of 1, which can be unstable. And we found that for the examples here 5 and 0.1 are actually too large. I have modified doc to clarify these.

@chrishalcrow
Copy link
Member

Hello, just did some tiny tiny docs formatting.

@chrishalcrow chrishalcrow merged commit e95622f into SpikeInterface:main Jul 28, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qualitymetrics Related to qualitymetrics module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants