Skip to content

Commit

Permalink
equations
Browse files Browse the repository at this point in the history
  • Loading branch information
paigemiller committed Dec 3, 2024
1 parent 17dc265 commit 7ddc61e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ngm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ def get_R(beta: np.array, n: np.array, n_vax: np.array, ve: float) -> np.array:
assert beta.shape[0] == len(n_vax), "Input dimensions must match"
assert 0 <= ve <= 1.0

n_sus = n - n_vax * ve
return beta * n_sus.reshape(-1, 1) / n_sus.sum()
s_i = n / n.sum()
s_vax = (n - n_vax * ve) / n
return beta * s_i * s_vax


def dominant_eigen(X: np.array, norm: str = "L1") -> namedtuple:
Expand Down

0 comments on commit 7ddc61e

Please sign in to comment.