conninfpy.defaults
Single source of truth for default parameters used across the package.
TFCE exponents (E, H) follow Smith & Nichols (2009) values across both the
scoring and permutation paths. Standard validation settings use
E=0.3, H=3.0 for empirical FDR control on network data — the
package uses these as global defaults since v2.1. every validation
pipeline in examples/ passes
e=0.3, h=3.0, n=10 explicitly. Vinokur et al. (2023) report 75-fold
edge-count variation across (E, H) within Baggio’s recommended range —
sensitivity is real and should be reported.
The only path-specific default is n (threshold integration steps):
n=100 for direct scoring (high resolution, single-shot), n=10 for
permutation (Hao 2024 reports n=10 is sufficient for FDR control).
Unified default parameters for ConnInfPy.
Single source of truth for all default constants used across modules.
TFCE exponent defaults (E, H) use the validation-paper setting
E=0.3, H=3.0 across both the scoring and permutation paths.
This matches the ABIDE, Open-Close, and simulation examples.
Hao et al. (2024) recommend E=0.4, H in [3.0, 7.0] for empirical
FDR < 10% on network data — Baggio (2018) defaults overshoot FDR > 50%
in their benchmarks; Vinokur et al. (2023) report 75-fold variation in
detected edge counts across (E,H) within Baggio’s recommended range.
Smith & Nichols (2009) originally used E=0.5, H=2.0 for image TFCE;
that remains a sensible sensitivity point, but it is no longer the
ConnInfPy default for network validation.
Users tuning (E,H) for a specific dataset should treat the exponents as
a sensitivity knob: ablate within Hao’s recommended box
E in [0.3, 0.5], H in [3.0, 7.0] and report stability.
The only path-specific default is n (threshold integration steps):
n=100 for scoring (high resolution, single-shot), n=10 for
permutation (lower n keeps the permutation loop affordable).
The rationale for n=10 inside the permutation loop differs between
the two error-control regimes ConnInfPy supports, and the literature
strictly speaking only validates one of them at this resolution:
FDR control (``method=’bh_fdr_perm’``). Hao et al. (2024) empirically benchmark TFNOS at
E=0.4, H=3.0, n=10on synthetic network data and report FDR < 10% — this is the regime their result underwrites. Usingn=10for the permutation-calibrated BH path is directly supported.FWER control via max-statistic permutation. No specific literature endorses
n=10for this path; the choice is a pragmatic compromise between integration resolution and permutation budget. ConnInfPy’s simulation calibration grid inexamples/simulation_validation/is the empirical regression check for this choice; users with budget forn=30+permutation-time integration steps can passn=30tocompute_p_val(...)/compute_p_val_glm(...)without changing any other default. Because the default pairwise API returns positive and negative tails with separate max-statistic nulls, one undirected/two-sided family should be interpreted withα/2per tail unless a caller uses a joint two-sided max-null path.
Threshold tie-breaking convention
ConnInfPy’s TFCE integral uses edge_t >= threshold (inclusive lower
bound) at each integration step. Smith & Nichols (2009) define the
TFCE indicator as e(h) = 1 if t > h, i.e. strict inequality. The
inclusive convention is mathematically equivalent under continuous
t-statistics and computationally simpler. We retain >= and use
the production FPR/FWER calibration in examples/simulation_validation/
as the regression check. A future release may switch to > to match
the literal Smith & Nichols formula and rerun calibration.
References
Smith & Nichols (2009). Threshold-free cluster enhancement. NeuroImage 44(1):83-98.
Baggio et al. (2018). TFNBS: a threshold-free method for the analysis of brain networks. Hum Brain Mapp 39(6):2289-2302.
Vinokur et al. (2023). Parameter sensitivity of NBS / TFNBS in connectivity inference.
Hao et al. (2024). TFNOS: threshold-free network omnibus statistics (recommends
E=0.4, H in [3.0, 7.0]for FDR < 10%).
- conninfpy.defaults.DEFAULT_START_THRESHOLD: float = 1.65
Initial threshold for cluster formation (p < 0.05 one-tailed).
- conninfpy.defaults.DEFAULT_N_THRESHOLDS_SCORING: int = 100
Threshold integration steps for direct TFCE scoring (high resolution).
- conninfpy.defaults.DEFAULT_N_THRESHOLDS_PERMUTATION: int = 10
Threshold integration steps inside the permutation loop (speed tradeoff; Hao 2024 reports n=10 is sufficient for FDR control on network data).
- conninfpy.defaults.DEFAULT_N_PERMUTATIONS: int = 1000
Default number of permutations for null distribution.
- conninfpy.defaults.DEFAULT_NBS_THRESHOLD: float = 2.0
Default t-statistic threshold for classical NBS edge inclusion.