elephant.spade.test_signature_significance¶

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 pvalue 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.
Parameters:  pv_speclist
A list of triplets (z,c,p), where z is pattern size, c is pattern support and p is the pvalue of signature (z,c)
 conceptslist of tuple
Output of the concepts mining for the original data.
 alphafloat
Significance level of the statistical test
 winlenint
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’ : onestep correction
‘sidak’ : onestep correction
‘holmsidak’ : step down method using Sidak adjustments
‘holm’ : stepdown method using Bonferroni adjustments
‘simeshochberg’ : stepup method (independent)
‘hommel’ : closed method based on Simes tests (nonnegative)
‘fdr_bh’ : Benjamini/Hochberg (nonnegative)
‘fdr_by’ : Benjamini/Yekutieli (negative)
‘fdr_tsbh’ : two stage fdr correction (nonnegative)
‘fdr_tsbky’ : two stage fdr correction (nonnegative)
‘’ 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
pvalue_spectrum
‘non_significant’: list containing only the nonsignificant 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: ‘#’
Returns:  sig_spectrumlist
Significant signatures of pvalue_spectrum, in the format specified by report