frites.stats.cluster_threshold#
- frites.stats.cluster_threshold(x, x_p, alpha=0.05, tail=1, tfce=False, n_steps=100, h_power=2, e_power=0.5)[source]#
Threshold detection for cluster-based inferencse.
- Parameters
- xnumpy:array_like
Array of true effect size
- x_pnumpy:array_like
Array of permutations
- alpha
python:float
| .05 Thresholding permutation distribution. If alpha is 0.05 it means that the threshold is going to be the 95th percentile
- tail{-1, 0, 1}
Type of comparison. Use -1 for the lower part of the distribution, 1 for the higher part and 0 for both
- tfcebool |
python:False
Use Threshold Free Cluster Enhancement. Use either :
True to specify that TFCE have to be used. In that case, the start and integration step are automatically inferred
A dict that contains a ‘start’ and a ‘step’ key to manually set TFCE parameters. Could also use ‘e_power’ and ‘h_power’ entries
A dict that is only there to set TFCE parameters n_steps, e_power and h_power but using the automatic starting and integration step
- n_steps
python:int
| 100 Number of integration steps between the start and stoping values for the TFCE
- h_power
python:float
| 2 Default H exponent of the TFCE
- e_power
python:float
| .5 Default E exponent of the TFCE
- Returns
- threshold
python:float
,python:dict
The cluster threshold. For the TFCE, this output a is dictionary with a ‘start’ and a ‘step’ keys (MNE convention)
- threshold