Skip to content

Commit 1eb50f7

Browse files
committed
Update requirements.txt and format code
1 parent 6658952 commit 1eb50f7

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Diff for: mimic/model_infer/infer_VAR_bayes.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ def _run_inference_large(self, **kwargs) -> None:
279279
c2 = pm.InverseGamma("c2", 2, 8)
280280
tau = pm.HalfCauchy("tau", beta=tau0)
281281
lam = pm.HalfCauchy("lam", beta=1, shape=(ndim, ndim))
282-
A = pm.Normal('A', mu=A_prior_mu, sigma=tau * lam * \
282+
A = pm.Normal('A', mu=A_prior_mu, sigma=tau * lam *
283283
at.sqrt(c2 / (c2 + tau**2 * lam**2)), shape=(ndim, ndim))
284284

285285
# If noise covariance is provided, use it as a prior
@@ -438,14 +438,14 @@ def _run_inference_large_xs(self, **kwargs) -> None:
438438
c2_A = pm.InverseGamma("c2_A", 2, 1)
439439
tau_A = pm.HalfCauchy("tau_A", beta=tau0_A)
440440
lam_A = pm.HalfCauchy("lam_A", beta=1, shape=(nX, nX))
441-
Ah = pm.Normal('Ah', mu=A_prior_mu, sigma=tau_A * lam_A * \
441+
Ah = pm.Normal('Ah', mu=A_prior_mu, sigma=tau_A * lam_A *
442442
at.sqrt(c2_A / (c2_A + tau_A**2 * lam_A**2)), shape=(nX, nX))
443443

444444
tau0_B = (DB0 / (DB - DB0)) * 0.1 / np.sqrt(N)
445445
c2_B = pm.InverseGamma("c2_B", 2, 1)
446446
tau_B = pm.HalfCauchy("tau_B", beta=tau0_B)
447447
lam_B = pm.HalfCauchy("lam_B", beta=1, shape=(nS, nX))
448-
Bh = pm.Normal('Bh', mu=0, sigma=tau_B * lam_B * \
448+
Bh = pm.Normal('Bh', mu=0, sigma=tau_B * lam_B *
449449
at.sqrt(c2_B / (c2_B + tau_B**2 * lam_B**2)), shape=(nS, nX))
450450

451451
if noise_cov_prior is not None:

Diff for: mimic/utilities/utilities.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@
88
cols = ["red", "green", "blue", "royalblue", "orange", "black"]
99

1010

11-
1211
def plot_gLV(yobs, timepoints):
13-
# fig, axs = plt.subplots(1, 2, layout='constrained') # Optional alternative
12+
# fig, axs = plt.subplots(1, 2, layout='constrained') # Optional
13+
# alternative
1414
fig, axs = plt.subplots(1, 1)
1515
for species_idx in range(yobs.shape[1]):
1616
label = f'Species {species_idx + 1}' # Add a label for each species
17-
axs.plot(timepoints, yobs[:, species_idx], color=cols[species_idx], label=label)
18-
17+
axs.plot(timepoints, yobs[:, species_idx],
18+
color=cols[species_idx], label=label)
19+
1920
axs.set_xlabel('time')
2021
axs.set_ylabel('[species]')
2122
axs.legend() # Ensure the legend is called on the correct axes
2223
plt.show()
2324

2425

25-
2626
def plot_gMLV(yobs, sobs, timepoints):
2727
# fig, axs = plt.subplots(1, 2, layout='constrained')
2828
fig, axs = plt.subplots(1, 2)

0 commit comments

Comments
 (0)