Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Commit

Permalink
normalization does not clip distances at 0
Browse files Browse the repository at this point in the history
  • Loading branch information
justjhong committed Feb 28, 2024
1 parent 8c960d7 commit cc1826a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/mrvi/_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cc1826a

Please sign in to comment.