nispace.stats.effectsize.cohen_nan
- nispace.stats.effectsize.cohen_nan(a, b)[source]
NaN-aware Cohen’s d for independent groups (see cohen).
- Parameters:
a (array_like, shape (n_obs_a, n_features) / (n_obs_b, n_features)) – Same convention as cohen. NaN entries are excluded per-column via nanmean/nanvar (column-specific n/dof).
b (array_like, shape (n_obs_a, n_features) / (n_obs_b, n_features)) – Same convention as cohen. NaN entries are excluded per-column via nanmean/nanvar (column-specific n/dof).
- Returns:
d
- Return type:
np.ndarray, shape (n_features,)
Notes
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), which computes the same statistic faster via a single-pass Welford algorithm, not this function.
References
[39].