osl_dynamics.stats.cluster#
Cluster finding and threshold-free cluster enhancement (TFCE).
Clusters are connected sets of targets whose statistic exceeds a threshold. Target dimensions are of two kinds:
Cluster dimensions are connected: neighboring indices along a lattice (e.g. consecutive time points or frequencies), or a user-supplied adjacency (e.g. neighboring parcels).
All other dimensions are unconnected: a cluster never spans two indices of such a dimension (e.g. two states), but the maximum cluster statistic is still taken over them.
Attributes#
Classes#
How the targets are connected. |
Functions#
Adjacency of a 1D lattice: index i is adjacent to i-1 and i+1. |
|
|
Find clusters of supra-threshold targets. |
|
Largest absolute cluster statistic in a map (0 if no clusters). |
|
Map each target to the absolute statistic of its cluster. |
|
Threshold-free cluster enhancement. |
|
Largest absolute TFCE value in a map. |