elephant.change_point_detection.multiple_filter_test

elephant.change_point_detection.multiple_filter_test(window_sizes, spiketrain, t_final, alpha, n_surrogates=1000, test_quantile=None, test_param=None, time_step=None)[source]

Detects change points.

This function returns the detected change points that corresponds to the maxima of the filter processes - the processes generated by sliding windows of step time_step; at each step the difference between spikes on the right and left windows is calculated.

Parameters:
window_sizeslist of pq.Quantity

list that contains windows sizes

spiketrainneo.SpikeTrain or pq.Quantity

A spiketrain object to analyze.

t_finalpq.Quantity

The final time of the spike train which is to be analysed

alphafloat

Alpha-quantile in range [0, 100] for the set of maxima of the limit processes

n_surrogatesint, optional

The number of simulated limit processes. Default: 1000

test_quantilefloat or None, optional

The threshold for the maxima of the filter derivative processes; if any of these maxima is larger than this value, it is assumed the presence of a change point (cp) at the time corresponding to that maximum. If None, will be set according to the empirical_parameters(). Default: None

test_param(3, num. of windows) np.ndarray or None, optional

first row: list of h, second and third rows: empirical means and variances of the limit process corresponding to h. This will be used to normalize the filter processes in order to give to the every maximum the same impact on the global statistic. If None, will be set according to the empirical_parameters(). Default: None

time_steppq.Quantity or None, optional

The resolution - the time step at which the windows are slided. If None, will be set to window_size / 20. Default: None

Returns:
cpslist of list

The change points, one list for each window size h, containing the points detected with the corresponding filter_process. N.B.: only cps whose h-neighborhood does not include previously detected cps (with smaller window h) are added to the list.