pub fn robust_outlier_keep(
values: &[f32],
n_mads: f32,
tail: Tail,
log1p: bool,
consider: Option<&[bool]>,
) -> Vec<bool>Expand description
Robust outlier keep-mask: keep[i] = false when values[i] falls
outside median ± n_mads · MAD · 1.4826 on the requested tail.
Count-like metrics should pass log1p = true so the band is symmetric
on the multiplicative scale. Consolidates the median+MAD idiom used in
cnv::hmm.
consider (when Some) restricts the median/MAD band to the cells it
marks true — so e.g. near-empty cells don’t contaminate the robust
center — while the keep decision is still returned for every cell.