elephant.spade.test_signature_significance(pv_spec, concepts, alpha, winlen, corr='fdr_bh', report='spectrum', spectrum='#')[source]

Compute the significance spectrum of a pattern spectrum.

Given pvalue_spectrum pv_spec as a list of triplets (z,c,p), where z is pattern size, c is pattern support and p is the p-value of the signature (z,c), this routine assesses the significance of (z,c) using the confidence level alpha.

Bonferroni or FDR statistical corrections can be applied.


A list of triplets (z,c,p), where z is pattern size, c is pattern support and p is the p-value of signature (z,c)

conceptslist of tuple

Output of the concepts mining for the original data.


Significance level of the statistical test


Size (number of bins) of the sliding window used for the analysis

corrstr, optional

Method used for testing and adjustment of pvalues. Can be either the full name or initial letters. Available methods are:

‘bonferroni’ : one-step correction

‘sidak’ : one-step correction

‘holm-sidak’ : step down method using Sidak adjustments

‘holm’ : step-down method using Bonferroni adjustments

‘simes-hochberg’ : step-up method (independent)

‘hommel’ : closed method based on Simes tests (non-negative)

‘fdr_bh’ : Benjamini/Hochberg (non-negative)

‘fdr_by’ : Benjamini/Yekutieli (negative)

‘fdr_tsbh’ : two stage fdr correction (non-negative)

‘fdr_tsbky’ : two stage fdr correction (non-negative)

‘’ or ‘no’: no statistical correction

For further description see: https://www.statsmodels.org/stable/generated/statsmodels.stats.multitest.multipletests.html Default: ‘fdr_bh’

report{‘spectrum’, ‘significant’, ‘non_significant’}, optional

Format to be returned for the significance spectrum:

‘spectrum’: list of triplets (z,c,b), where b is a boolean specifying

whether signature (z,c) is significant (True) or not (False)

‘significant’: list containing only the significant signatures (z,c) of


‘non_significant’: list containing only the non-significant signatures

spectrum{‘#’, ‘3d#’}, optional

Defines the signature of the patterns.

‘#’: pattern spectrum using the as signature the pair:

(number of spikes, number of occurrence)

‘3d#’: pattern spectrum using the as signature the triplets:

(number of spikes, number of occurrence, difference between last and first spike of the pattern)

Default: ‘#’


Significant signatures of pvalue_spectrum, in the format specified by report