Skip to content

Commit

Permalink
twoctrls10
Browse files Browse the repository at this point in the history
  • Loading branch information
jykr committed Aug 27, 2024
1 parent 793c623 commit 21db8f4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions bean/model/survival_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,14 @@ def MixtureNormalModel(
# else:
time_pi = data.control_timepoint[t]
# If pi is sampled in later timepoint, account for the selection.
expanded_allele_p = pi * torch.pow(
r.expand(data.n_reps, 1, -1, -1), time_pi
expanded_allele_p = pi.expand(-1, len(time_pi), -1, -1) * torch.pow(
r.unsqueeze(0)
.unsqueeze(0)
.expand(data.n_reps, len(time_pi), -1, -1),
time_pi.unsqueeze(0)
.unsqueeze(-1)
.unsqueeze(-1)
.expand(data.n_reps, -1, data.n_guides, 2),
)
pyro.sample(
"control_allele_count",
Expand Down

0 comments on commit 21db8f4

Please sign in to comment.