From 18432461685438ef7249ef8e181e0e60145111d2 Mon Sep 17 00:00:00 2001 From: Justin Hong Date: Wed, 28 Feb 2024 17:03:05 -0500 Subject: [PATCH] normalization does not clip distances at 0 --- src/mrvi/_model.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mrvi/_model.py b/src/mrvi/_model.py index 955e8d4..5488a7b 100644 --- a/src/mrvi/_model.py +++ b/src/mrvi/_model.py @@ -430,8 +430,7 @@ def per_sample_inference_fn(pair): normalization_means = normalization_means.reshape(-1, 1, 1, 1) normalization_vars = normalization_vars.reshape(-1, 1, 1, 1) normalized_dists = ( - np.clip(sampled_dists - normalization_means, a_min=0, a_max=None) - / (normalization_vars**0.5) + (sampled_dists - normalization_means) / (normalization_vars**0.5) ).mean(dim="mc_sample") # (n_cells, n_samples, n_samples) # Compute each reduction