Skip to content

Latest commit

 

History

History
49 lines (29 loc) · 1.36 KB

d_prime.rst

File metadata and controls

49 lines (29 loc) · 1.36 KB

D-prime (d_prime)

Calculation

D-prime uses linear discriminant analysis (LDA) to estimate the classification accuracy between two units.

  • v denotes a waveform.
  • C denotes the class (unit) for which the metric is being calculated.
  • D denotes the set of spikes which are not in C.
  • P(v|C) probability distributions are assumed to be Gaussian.

LDA is fit to spikes in C, then to spikes in D.

  • μC(LDA) and μD(LDA) denote the mean of the LDA for clusters C and D respectively.
  • σC(LDA) and σD(LDA) denote the standard deviation of the LDA for clusters C and D respectively.

D-prime is then calculated as follows:

$$D_{\mathrm{prime}}(C) = \frac{ ( \mu_C^{(LDA)} - \mu_D^{(LDA)} ) }{ \sqrt{ 0.5( (\sigma_C^{(LDA)})^2 + (\sigma_D^{(LDA)})^2) } }$$

Expectation and use

D-prime is a measure of cluster separation, and will be larger in well separated clusters.

Example code

import spikeinterface.qualitymetrics as qm

d_prime = qm.lda_metrics(all_pcs, all_labels, 0)

Reference

spikeinterface.qualitymetrics.pca_metrics.lda_metrics

Literature

Introduced by [Hill].