elephant.asset.asset.ASSET¶
- class elephant.asset.asset.ASSET(spiketrains_i, spiketrains_j=None, bin_size=array(3.) * ms, t_start_i=None, t_start_j=None, t_stop_i=None, t_stop_j=None, verbose=True)[source]¶
Analysis of Sequences of Synchronous EvenTs class.
- Parameters:
- spiketrains_i, spiketrains_jlist of neo.SpikeTrain
Input spike trains for the first and second time dimensions, respectively, to compute the p-values from. If spiketrains_y is None, it’s set to spiketrains.
- bin_sizepq.Quantity, optional
The width of the time bins used to compute the probability matrix.
- t_start_i, t_start_jpq.Quantity, optional
The start time of the binning for the first and second axes, respectively. If None, the attribute t_start of the spike trains is used (if the same for all spike trains). Default: None
- t_stop_i, t_stop_jpq.Quantity, optional
The stop time of the binning for the first and second axes, respectively. If None, the attribute t_stop of the spike trains is used (if the same for all spike trains). Default: None
- verbosebool, optional
If True, print messages and show progress bar. Default: True
- Raises:
- ValueError
- If the t_start & t_stop times are not (one of):
perfectly aligned;
fully disjoint.
- __init__(spiketrains_i, spiketrains_j=None, bin_size=array(3.) * ms, t_start_i=None, t_start_j=None, t_stop_i=None, t_stop_j=None, verbose=True)[source]¶
Methods
__init__
(spiketrains_i[, spiketrains_j, ...])cluster_matrix_entries
(mask_matrix, ...[, ...])Given a matrix mask_matrix, replaces its positive elements with integers representing different cluster IDs.
extract_synchronous_events
(cmat[, ids])Given a list of spike trains, a bin size, and a clustered intersection matrix obtained from those spike trains via ASSET analysis, extracts the sequences of synchronous events (SSEs) corresponding to clustered elements in the cluster matrix.
intersection_matrix
([normalization])Generates the intersection matrix from a list of spike trains.
is_symmetric
()- Returns:
joint_probability_matrix
(pmat, filter_shape, ...)Map a probability matrix pmat to a joint probability matrix jmat, where jmat[i, j] is the joint p-value of the largest neighbors of pmat[i, j].
mask_matrices
(matrices, thresholds)Given a list of matrices and a list of thresholds, return a boolean matrix B ("mask") such that B[i,j] is True if each input matrix in the list strictly exceeds the corresponding threshold at that position.
probability_matrix_analytical
([imat, ...])Given a list of spike trains, approximates the cumulative probability of each entry in their intersection matrix.
probability_matrix_montecarlo
(n_surrogates)Given a list of parallel spike trains, estimate the cumulative probability of each entry in their intersection matrix by a Monte Carlo approach using surrogate data.
Attributes
x_edges
A Quantity array of n+1 edges of the bins used for the horizontal axis of the intersection matrix, where n is the number of bins that time was discretized in.
y_edges
A Quantity array of n+1 edges of the bins used for the vertical axis of the intersection matrix, where n is the number of bins that time was discretized in.