Skip to content

Latest commit

 

History

History
69 lines (43 loc) · 3.29 KB

l_ratio.rst

File metadata and controls

69 lines (43 loc) · 3.29 KB

L-ratio (l_ratio)

Calculation

This description assumes a tetrode is used as an example.

L-ratio uses 4 principal components (PCs) for each tetrode channel (the first being energy, the square root of the sum of squares of each sample in the waveform, followed by the first 3 PCs of the energy normalised waveform). This yields spikes which are each represented as a point in 16 dimensional space.

Define, for each cluster C, Di, C2, the squared Mahalanobis distance from the centre of cluster C for every spike i in the dataset (similarly to the calculation for isolation distance above). Assume that spikes in the cluster distribute normally in each dimension, so that D2 for spikes in a cluster will distribute as χ2 with 16 degrees of freedom. This yields CDFχdf2, the cumulative distribution function of the χ2 distribution. Define for each cluster C, the value L(C), representing the amount of contamination of the cluster C`:


L(C) = ∑i ∉ C1 − CDFχdf2(Di, C2)

L is then the sum of probabilities that each spike which is not a cluster member of C should be included in the cluster. Therefore the inverse of this cumulative distribution yields the probability of cluster membership for each spike i. L is then normalised by the number of spikes Ns in C to allow larger clusters to tolerate more contamination. This yields L-ratio, which can be expressed as:

$$L_{\mathrm{ratio}}(C) = \frac{L(C)}{N_s}$$

Expectation and use

Since this metric identifies unit separation, a high value indicates a highly contaminated unit (type I error) ([Schmitzer-Torbert] et al.). [Jackson] et al. suggests that this measure is also correlated with type II errors (although more strongly with type I errors).

Example code

From SpikeInterface

References

spikeinterface.qualitymetrics.pca_metrics

mahalanobis_metrics

A well separated unit should have a low L-ratio (Schmitzer-Torbert et al.). Since this metric identifies unit separation, a high value indicates a highly contaminated unit (type I error) (Schmitzer-Torbert et al.). Jackson et al. suggests that this measure is also correlated with type II errors (although more strongly with type I errors) (Jackson et al.).

Literature

Introduced by Schmitzer-Torbert et al.. Early discussion and comparison with isolation distance by Jackson et al..

Citations

Jackson

Jadin Jackson, Neil Schmitzer-Torbert, K.D. Harris, and A.D. Redish. “Quantitative Measures of Cluster Quality for Use in Extracellular Recordings.” Neuroscience 131.1 (2005): 1–11. Web.

Schmitzer-Torbert

Schmitzer-Torbert, Neil, and A. David Redish. “Neuronal Activity in the Rodent Dorsal Striatum in Sequential Navigation: Separation of Spatial and Reward Responses on the Multiple T Task.” Journal of neurophysiology 91.5 (2004): 2259–2272. Web.