nispace.stats.effectsize.rzscore_nan
- nispace.stats.effectsize.rzscore_nan(a, b=None)[source]
NaN-aware robust z-score of a (median/MAD), optionally against a reference b.
- Parameters:
a (array_like, shape (n_obs_a, n_features)) – Values to standardize.
b (array_like, shape (n_obs_b, n_features), optional) – Reference sample supplying the median/MAD, reduced along axis=0 via nanmedian (NaN entries excluded per-column). If None (default), a is standardized against its own median/MAD.
- Returns:
z – Columns where the reference MAD is exactly 0 are set to NaN (a constant reference has no meaningful robust scale).
- Return type:
np.ndarray, shape (n_obs_a, n_features)
Notes
Called directly (not via a numba _fast twin) by api.NiSpace.normalize_colocalizations(z_method=”robust”) (the default) to z-score observed colocalization values against the corresponding null distribution array. The Y_transform=”rzscore(…)” formula path uses the separate numba-jitted rzscore_nan_fast instead.