nispace.stats.effectsize.cohen
- nispace.stats.effectsize.cohen(a, b)[source]
Cohen’s d for independent groups: pooled-SD standardized mean difference.
- Parameters:
a (array_like, shape (n_obs_a, n_features) / (n_obs_b, n_features)) – Independent-group samples; a/b need not have the same n_obs. Reduced along axis=0 (rows = observations, columns = features/maps).
b (array_like, shape (n_obs_a, n_features) / (n_obs_b, n_features)) – Independent-group samples; a/b need not have the same n_obs. Reduced along axis=0 (rows = observations, columns = features/maps).
- Returns:
d
- Return type:
np.ndarray, shape (n_features,)
Notes
Uses plain np.mean/np.var (ddof=1) – NaN in a/b propagates into the corresponding output column rather than being skipped; use cohen_nan for NaN-aware columns. Not called anywhere in NiSpace’s internal pipeline: Y_transform=”cohen(a,b)” dispatches to the numba-jitted cohen_nan_fast (core/transform_y.py), not this function.
References
[39].