Skip to content

Commit

Permalink
natural log
Browse files Browse the repository at this point in the history
  • Loading branch information
wsdewitt committed Jul 31, 2024
1 parent 22fd4b4 commit b82d83c
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 33 deletions.
7 changes: 3 additions & 4 deletions multidms/jaxmodels.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def predict_score(
self,
data_sets: dict[str, Data],
) -> dict[str, Float[Array, " n_variants"]]:
r"""Predict fitness-functional scores.
r"""Predict functional scores, interpreted as :math:`\log_e` enrichment wrt WT.
Args:
data_sets: Data sets for each condition.
Expand Down Expand Up @@ -181,9 +181,8 @@ def predict_post_count(
n_v = data_sets[d].pre_counts
n_wt = data_sets[d].pre_count_wt
m_wt = data_sets[d].post_count_wt
result[d] = jnp.power(
2,
f + jnp.log2(m_wt) - jnp.log2(n_wt) + jnp.log2(n_v),
result[d] = jnp.exp(
f + jnp.log(m_wt) - jnp.log(n_wt) + jnp.log(n_v),
)
return result

Expand Down
Loading

0 comments on commit b82d83c

Please sign in to comment.