From 37c23af97f23cdc472d218f6cdac30911c39e573 Mon Sep 17 00:00:00 2001 From: Vittorio Zampinetti Date: Wed, 25 Oct 2023 11:54:34 +0200 Subject: [PATCH] [fix] wrong axis for qC diploid init --- src/variational_distributions/var_dists.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/variational_distributions/var_dists.py b/src/variational_distributions/var_dists.py index f5c573a..7faff5e 100644 --- a/src/variational_distributions/var_dists.py +++ b/src/variational_distributions/var_dists.py @@ -262,7 +262,7 @@ def _init_diploid(self, nodes: list, skewness=5.): root_startprob = torch.ones(self.config.n_states) root_startprob[2] = skewness root_transmat = torch.ones((self.config.n_states, self.config.n_states)) - root_transmat[2, :] = skewness + root_transmat[:, 2] = skewness # normalize and log-transform self.eta1[nodes, :] = root_startprob - torch.logsumexp(root_startprob, dim=-1, keepdim=True) normalized_log_transmat = root_transmat - torch.logsumexp(root_transmat, dim=-1, keepdim=True)