Analysis of Sequences of Synchronous EvenTs (ASSET)¶
ASSET is a statistical method (Torre et al., 2016) for the detection of repeating sequences of synchronous spiking events in parallel spike trains.
ASSET analysis class object of finding patterns¶

Analysis of Sequences of Synchronous EvenTs class. 
Patterns postexploration¶

Given two sequences of synchronous events (SSEs) sse1 and sse2, each consisting of a pool of positions (iK, jK) of matrix entries and associated synchronous events SK, finds the intersection among them. 

Given two sequences of synchronous events (SSEs) sse1 and sse2, each consisting of a pool of pixel positions and associated synchronous events (see below), computes the difference between sse1 and sse2. 

Given two sequences of synchronous events (SSEs) sse1 and sse2, each consisting of a pool of pixel positions and associated synchronous events (see below), determines whether sse1 is strictly contained in sse2. 

Given two sequences of synchronous events (SSEs) sse1 and sse2, each consisting of a pool of pixel positions and associated synchronous events (see below), determines whether sse1 and sse2 are disjoint. 

Given two sequences of synchronous events (SSEs) sse1 and sse2, each consisting of a pool of pixel positions and associated synchronous events (see below), determines whether sse1 is strictly contained in sse2. 

Given two sequences of synchronous events (SSEs) sse1 and sse2, each consisting of a pool of pixel positions and associated synchronous events (see below), determines whether sse1 strictly contains sse2. 

Given two sequences of synchronous events (SSEs) sse1 and sse2, each consisting of a pool of pixel positions and associated synchronous events (see below), determines whether the two SSEs overlap. 

Returns the IDs of all neurons present in the SSE pattern. 
For each repeated sequence in the SSE pattern, returns the start and end time bin IDs. 
Tutorial¶
Run tutorial interactively:
Examples¶
In this example we
simulate two noisy synfire chains;
shuffle the neurons to destroy visual appearance;
run ASSET analysis to recover the original neurons arrangement.
Simulate two noise synfire chains, shuffle the neurons to destroy the pattern visually, and store shuffled activations in neo.SpikeTrains.
>>> import neo >>> import numpy as np >>> import quantities as pq >>> from pprint import pprint >>> np.random.seed(10) >>> spiketrain = np.linspace(0, 50, num=10) >>> np.random.shuffle(spiketrain) >>> spiketrains = np.c_[spiketrain, spiketrain + 100] >>> spiketrains += np.random.random_sample(spiketrains.shape) * 5 >>> spiketrains = [neo.SpikeTrain(st, units='ms', t_stop=1 * pq.s) ... for st in spiketrains]
Create ASSET class object that holds spike trains.
ASSET requires at least one argument  a list of spike trains. If spiketrains_y is not provided, the same spike trains are used to build an intersection matrix with.
>>> from elephant import asset >>> asset_obj = asset.ASSET(spiketrains, bin_size=3*pq.ms)
Build the intersection matrix imat:
>>> imat = asset_obj.intersection_matrix()
Estimate the probability matrix pmat, using the analytical method:
>>> pmat = asset_obj.probability_matrix_analytical(imat, ... kernel_width=50*pq.ms) compute rates by boxcarkernel convolution... compute the prob. that each neuron fires in each pair of bins... compute the probability matrix by Le Cam's approximation... substitute 0.5 to elements along the main diagonal...
Compute the joint probability matrix jmat, using a suitable filter:
>>> jmat = asset_obj.joint_probability_matrix(pmat, filter_shape=(5, 1), ... n_largest=3)
Create the masked version of the intersection matrix, mmat, from pmat and jmat:
>>> mmat = asset_obj.mask_matrices([pmat, jmat], thresholds=.9)
Cluster significant elements of imat into diagonal structures:
>>> cmat = asset_obj.cluster_matrix_entries(mmat, max_distance=11, ... min_neighbors=3, stretch=5)
Extract sequences of synchronous events:
>>> sses = asset_obj.extract_synchronous_events(cmat)
The ASSET found the following sequences of synchronous events:
>>> pprint(sses)
{1: {(36, 2): {5},
(37, 4): {1},
(40, 6): {4},
(41, 7): {8},
(43, 9): {2},
(47, 14): {7},
(48, 15): {0},
(50, 17): {9}}}
To visualize them, refer to Viziphant documentation and an example plot
viziphant.asset.plot_synchronous_events()
.
References¶
E. Torre, C. Canova, M. Denker, G. Gerstein, M. Helias, and S. Grün. Asset: analysis of sequences of synchronous events in massively parallel spike trains. PLoS Comp. Biol., 12(7):e1004939, 2016. doi:10.1371/journal.pcbi.1004939.