tirank.TrainPre.Reject_With_GMM_Reg
- tirank.TrainPre.Reject_With_GMM_Reg(pred_bulk, pred_sc, tolerance)[source]
Performs GMM-based rejection for Regression mode.
Fits a single-component GMM to both bulk and sc/st scores to find their means. If the means are too divergent, rejects all cells. Otherwise, rejects cells that fall outside a tolerance range around the bulk mean.
- Parameters:
pred_bulk (np.ndarray) – Predicted scores from the bulk data (n_samples, 1).
pred_sc (np.ndarray) – Predicted scores from the sc/st data (n_cells, 1).
tolerance (float) – The tolerance (std dev or max value) to define the acceptance range around the bulk mean.
- Returns:
A binary mask (n_cells, 1) where 1 indicates rejection.
- Return type:
np.ndarray