Analysis of Sequences of Synchronous EvenTs (ASSET)¶
ASSET is a statistical method [as1] for the detection of repeating sequences of synchronous spiking events in parallel spike trains.
ASSET analysis class object of finding patterns¶
ASSET (spiketrains_i[, spiketrains_j, …]) |
Analysis of Sequences of Synchronous EvenTs class. |
Patterns post-exploration¶
synchronous_events_intersection (sse1, sse2) |
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. |
synchronous_events_difference (sse1, 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), computes the difference between sse1 and sse2. |
synchronous_events_identical (sse1, 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. |
synchronous_events_no_overlap (sse1, 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. |
synchronous_events_contained_in (sse1, 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. |
synchronous_events_contains_all (sse1, 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. |
synchronous_events_overlap (sse1, 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. |
Examples¶
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.
>>> import neo >>> import numpy as np >>> import quantities as pq >>> from elephant import asset
>>> spiketrains = [ ... neo.SpikeTrain([start, start + 6] * (3 * pq.ms) + 10 * pq.ms, ... t_stop=60 * pq.ms) ... for _ in range(3) ... for start in range(3) ... ] >>> asset_obj = asset.ASSET(spiketrains, bin_size=3*pq.ms, verbose=False)
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=9*pq.ms)
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=3, ... min_neighbors=3, stretch=5)
Extract sequences of synchronous events:
>>> sses = asset_obj.extract_synchronous_events(cmat)
The ASSET found 2 sequences of synchronous events:
>>> from pprint import pprint
>>> pprint(sses)
{1: {(9, 3): {0, 3, 6}, (10, 4): {1, 4, 7}, (11, 5): {8, 2, 5}}}
References¶
[as1] | 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. |