twinfer.inference.covariance_decomposition_z_scores.classify_inference_scenario
- twinfer.inference.covariance_decomposition_z_scores.classify_inference_scenario(z_rho, z_rho_s, z_rho_Delta, thresholds=(1.96, 2.326, 1.96), correction='none', fdr=0.05)[source]
Inference scenario (1-4) of each pair from its three z-scores (arrays or scalars); NaN in a needed z-score gives <NA>.
- Parameters:
z_rho (float or array) – The three z-scores of each pair.
z_rho_s (float or array) – The three z-scores of each pair.
z_rho_Delta (float or array) – The three z-scores of each pair.
thresholds (tuple of float) –
(z_rho, z_rho_s, z_rho_Delta):
|z|above the value counts as significant:z_rho not significant -> 1 nothing z_rho significant, z_rho_s not significant -> 2 regulation z_rho, z_rho_s and z_rho_Delta significant -> 3 regulation + heterogeneity z_rho and z_rho_s significant, z_rho_Delta not -> 4 heterogeneity
correction ({"none", "bh"}) –
“none”: every threshold as above (one pre-specified pair).
”bh”: z_rho is significant when its Benjamini-Hochberg q-value over ALL pairs given is <= fdr; z_rho_Delta is significant when its BH q-value over the pairs whose z_rho is significant is <= fdr (thresholds[0] and thresholds[2] are not used); z_rho_s keeps its threshold. Use for many pairs at once (real data).
fdr (float) – q-value cut-off of the “bh” correction.