Variation Statistics for CBGTC spike times¶
- class analyseur.cbgtc.stats.variation.Variations[source]¶
Bases:
objectComputes variation or dispersion in the data
Methods
Argument
isi_set: Dictionary returned; see
InterSpikeIntervalisi_set: Dictionary returned; see
InterSpikeIntervalisi_set: Dictionary returned; see
InterSpikeIntervalisi_set: Dictionary returned; see
InterSpikeIntervalisi_set: Dictionary returned; see
InterSpikeIntervalisi_set: Dictionary returned; see
InterSpikeIntervalUse Cases¶
1. Pre-requisites¶
1.1. Import Modules¶
from analyseur.cbgtc.loader import LoadSpikeTimes from analyseur.cbgtc.stats.isi import InterSpikeInterval from analyseur.cbgtc.stats.variation import Variations
1.2. Load file and get spike times¶
loadST = LoadSpikeTimes("spikes_GPi.csv") spiketimes_superset = loadST.get_spiketimes_superset()
1.3. Compute the Inter-Spike Intervals¶
[I, _] = InterSpikeInterval.compute(spiketimes_superset)
2. Cases¶
2.1. Compute for variations¶
CV = Variations.computeCV(I) CV2 = Variations.computeCV2(I) LV = Variations.computeLV(I)
This returns the respective values for
\(\overrightarrow{CV} = \left[cv^{(i)}\right]_{\forall{i \in [1, n_{nuc}]}}\)
\(\overrightarrow{CV_2} = \left[cv_2^{(i)}\right]_{\forall{i \in [1, n_{nuc}]}}\)
\(\overrightarrow{LV} = \left[lv^{(i)}\right]_{\forall{i \in [1, n_{nuc}]}}\)
2.2. Compute Global Values¶
grand_CV = Variations.grandCV(I) grand_CV2 = Variations.grandCV2(I) grand_LV = Variations.grandLV(I)
This returns the respective values for
\(\overline{CV} = \mu\left(\overrightarrow{CV}\right)\)
\(\overline{CV_2} = \mu\left(\overrightarrow{CV_2}\right)\)
\(\overline{LV} = \mu\left(\overrightarrow{LV}\right)\)
- classmethod computeCV(isi_set=None)[source]¶
- \[ \begin{align}\begin{aligned}\overrightarrow{cv}^{(i)} = \begin{cases} \text{NaN} & \text{if } n_{ISI}^{(i)} = 0 \\ \frac{\sqrt{\frac{1}{n_{ISI}^{(i)}} \sum_{k=1}^{n_{ISI}^{(i)}} \left(isi_k^{(i)} - \mu_i\right)^2 }}{\text{max}\left(\frac{1}{n_{ISI}^{(i)}} \sum_{k=1}^{n_{ISI}^{(i)}} isi_k^{(i)}, 10^{-8} \right)} & \text{otherwise} \end{cases}\end{aligned}\end{align} \]
Returns the coefficient of variation for all individual neurons.
- Parameters:
isi_set – Dictionary returned using
analyseur.cbgtc.stats.isi.InterSpikeInterval.compute()- Returns:
dictionary of individual neurons whose values are their respective coefficient of variation value
Formula
Definitions
Interpretation
total neurons, \(n_{nuc}\)
total number of neurons in the Nucleus
neuron index, \(i\)
i-th neuron in the pool of \(n_{Nuc}\) neurons
total spikes, \(n_{spk}^{(i)}\)
total number of spikes (spike times) by i-th neuron
interspike interval, \(isi_{k}^{(i)}\)
k-th absolute interval between successive spike times
\(\overrightarrow{ISI}^{(i)} = \left[isi_k^{(i)}\right]_{\forall{k \in [1, n_{spk}^{(i)})}}\)
array of all interspike intervals of i-th neuron
\(I = \left\{\overrightarrow{ISI}^{(i)} \mid \forall{i \in [1, n_{nuc}]} \right\}\)
set of array interspike intervals of all neurons
Then, the coefficient of variation of the i-th neuron is
\[cv^{(i)} = \frac{\sigma\left(\overrightarrow{ISI}^{(i)}\right)}{\mu\left(\overrightarrow{ISI}^{(i)}\right)}\]where, \(\sigma(\cdot)\) is the standard deviation function over the given dimension and \(\mu(\cdot)\) is the arithmetic mean function over the given dimension.
We therefore get
Definitions
Interpretation
\(cv^{(i)}\)
coefficient of variation of i-th neuron
\(\overrightarrow{CV} = \left[cv^{(i)}\right]_{\forall{i \in [1, n_{nuc}]}}\)
array of coefficient of variation of all neurons
- classmethod computeCV2(isi_set=None)[source]¶
- \[ \begin{align}\begin{aligned}\overrightarrow{cv}_2^{(i)} = \begin{cases} \text{NaN} & \text{if } n_{ISI}^{(i)} \le 1 \\ \frac{1}{\left(n_{ISI}^{(i)} - 1\right)} \sum_{k=2}^{n_{ISI}^{(i)}} \left[2 \cdot \frac{\left| isi_k^{(i)} - isi_{k-1}^{(i)} \right|}{\text{max}\left(isi_k^{(i)} - isi_{k-1}^{(i)}, 10^{-8} \right)}\right] & \text{otherwise} \end{cases}\end{aligned}\end{align} \]
Returns the local coefficient of variation for all individual neurons.
- Parameters:
isi_set – Dictionary returned using
analyseur.cbgtc.stats.isi.InterSpikeInterval.compute()- Returns:
dictionary of individual neurons whose values are their respective local coefficient of variation value
Formula
Definitions
Interpretation
total neurons, \(n_{nuc}\)
total number of neurons in the Nucleus
neuron index, \(i\)
i-th neuron in the pool of \(n_{Nuc}\) neurons
total spikes, \(n_{spk}^{(i)}\)
total number of spikes (spike times) by i-th neuron
interspike interval, \(isi_{k}^{(i)}\)
k-th absolute interval between successive spike times
\(\overrightarrow{ISI}^{(i)} = \left[isi_k^{(i)}\right]_{\forall{k \in [1, n_{spk}^{(i)})}}\)
array of all interspike intervals of i-th neuron
\(I = \left\{\overrightarrow{ISI}^{(i)} \mid \forall{i \in [1, n_{nuc}]} \right\}\)
set of array interspike intervals of all neurons
Then, the coefficient of variation of the i-th neuron is
\[cv_2^{(i)} = \mu\left(2\frac{\left[\left|isi^{(i)}_k - isi^{(i)}_{k-1}\right|\right]_{\forall{k \in [1, n_{spk}^{(i)})}}}{\left[isi^{(i)}_k + isi^{(i)}_{k-1}\right]_{\forall{k \in [1, n_{spk}^{(i)})}}}\right)\]where, \(\mu(\cdot)\) is the arithmetic mean function over the given dimension.
We therefore get
Definitions
Interpretation
\(cv_2^{(i)}\)
local coefficient of variation of the i-th neuron
\(\overrightarrow{CV_2} = \left[cv_2^{(i)}\right]_{\forall{i \in [1, n_{nuc}]}}\)
array of local coefficient of variation of all neurons
- classmethod computeLV(isi_set=None)[source]¶
- \[ \begin{align}\begin{aligned}\overrightarrow{lv}^{(i)} = \begin{cases} \text{NaN} & \text{if } n_{ISI}^{(i)} \le 1 \\ \frac{1}{\left(n_{ISI}^{(i)} - 1\right)} \sum_{k=2}^{n_{ISI}^{(i)}} \left[3 \cdot \frac{\left(isi_k^{(i)} - isi_{k-1}^{(i)}\right)^2}{\text{max}\left(\left(isi_k^{(i)} - isi_{k-1}^{(i)}\right)^2, 10^{-8} \right)}\right] & \text{otherwise} \end{cases}\end{aligned}\end{align} \]
Returns the local variation for all individual neurons.
- Parameters:
isi_set – Dictionary returned using
analyseur.cbgtc.stats.isi.InterSpikeInterval.compute()- Returns:
dictionary of individual neurons whose values are their respective local variation value
Formula
Definitions
Interpretation
total neurons, \(n_{nuc}\)
total number of neurons in the Nucleus
neuron index, \(i\)
i-th neuron in the pool of \(n_{Nuc}\) neurons
total spikes, \(n_{spk}^{(i)}\)
total number of spikes (spike times) by i-th neuron
interspike interval, \(isi_{k}^{(i)}\)
k-th absolute interval between successive spike times
\(\overrightarrow{ISI}^{(i)} = \left[isi_k^{(i)}\right]_{\forall{k \in [1, n_{spk}^{(i)})}}\)
array of all interspike intervals of i-th neuron
\(I = \left\{\overrightarrow{ISI}^{(i)} \mid \forall{i \in [1, n_{nuc}]} \right\}\)
set of array interspike intervals of all neurons
Then, the local variation of the i-th neuron is
\[lv^{(i)} = \mu\left(3\frac{\left[\left(isi^{(i)}_k - isi^{(i)}_{k-1}\right)^2\right]_{\forall{k \in [1, n_{spk}^{(i)})}}}{\left[\left(isi^{(i)}_k + isi^{(i)}_{k-1}\right)^2\right]_{\forall{k \in [1, n_{spk}^{(i)})}}}\right)\]where, \(\mu(\cdot)\) is the arithmetic mean function over the given dimension.
We therefore get
Definitions
Interpretation
\(lv^{(i)}\)
local variation of the i-th neuron
\(\overrightarrow{LV} = \left[lv^{(i)}\right]_{\forall{i \in [1, n_{nuc}]}}\)
array of local coefficient of variation of all neurons
- classmethod grandCV(isi_set=None)[source]¶
Returns the grand coefficient of variation which is the mean of coefficient of variation of all the neurons
- Parameters:
isi_set – Dictionary returned using
analyseur.cbgtc.stats.isi.InterSpikeInterval.compute()- Returns:
a number
Formula
Definitions
Interpretation
total neurons, \(n_{Nuc}\)
total number of neurons in the Nucleus
neuron index, \(i\)
i-th neuron in the pool of \(n_{Nuc}\) neurons
coefficient of variation, \(\overline{cv^{(i)}}\)
coefficient of variation of i-th neuron
\(\overrightarrow{CV} = \left[cv^{(i)}\right]_{\forall{i \in [1, n_{nuc}]}}\)
array of coefficient of variation of all neurons
grand coefficient of variation, \(\overline{CV} = \mu\left(\overrightarrow{CV}\right)\)
grand or global coefficient of variation
where, \(\mu(\cdot)\) is the arithmetic mean function over the given dimension.
NOTE: The array \(\overrightarrow{CV}\) is obtained by calling
computeCV()
- classmethod grandCV2(isi_set=None)[source]¶
Returns the grand local coefficient of variation which is the mean of local coefficient of variation of all the neurons
- Parameters:
isi_set – Dictionary returned using
analyseur.cbgtc.stats.isi.InterSpikeInterval.compute()- Returns:
a number
Formula
Definitions
Interpretation
total neurons, \(n_{Nuc}\)
total number of neurons in the Nucleus
neuron index, \(i\)
i-th neuron in the pool of \(n_{Nuc}\) neurons
local coefficient of variation, \(\overline{cv^{(i)}}\)
local coefficient of variation of i-th neuron
\(\overrightarrow{CV_2} = \left[cv_2^{(i)}\right]_{\forall{i \in [1, n_{nuc}]}}\)
array of local coefficient of variation of all neurons
grand local coefficient of variation, \(\overline{CV_2} = \mu\left(\overrightarrow{CV_2}\right)\)
grand or global local coefficient of variation
where, \(\mu(\cdot)\) is the arithmetic mean function over the given dimension.
NOTE: The array \(\overrightarrow{CV_2}\) is obtained by calling
computeCV2()
- classmethod grandLV(isi_set=None)[source]¶
Returns the grand local variation which is the mean of local variation of all the neurons
- Parameters:
isi_set – Dictionary returned using
analyseur.cbgtc.stats.isi.InterSpikeInterval.compute()- Returns:
a number
Formula
Definitions
Interpretation
total neurons, \(n_{Nuc}\)
total number of neurons in the Nucleus
neuron index, \(i\)
i-th neuron in the pool of \(n_{Nuc}\) neurons
local variation, \(\overline{cv^{(i)}}\)
local variation of i-th neuron
\(\overrightarrow{LV} = \left[lv^{(i)}\right]_{\forall{i \in [1, n_{nuc}]}}\)
array of local variation of all neurons
grand local variation, \(\overline{LV} = \mu\left(\overrightarrow{LV}\right)\)
grand or global local variation
where, \(\mu(\cdot)\) is the arithmetic mean function over the given dimension.
NOTE: The array \(\overrightarrow{LV}\) is obtained by calling
computeLV()