Skip to content

Commit

Permalink
Update requirements.txt and format code
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Oct 23, 2024
1 parent fb459ba commit 23a267a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions mimic/model_infer/infer_VAR_bayes.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def run_inference_large(self, samples=4000, tune=2000, cores=4) -> None:
c2 = pm.InverseGamma("c2", 2, 8)
tau = pm.HalfCauchy("tau", beta=tau0)
lam = pm.HalfCauchy("lam", beta=1, shape=(ndim, ndim))
A = pm.Normal('A', mu=A_prior_mu, sigma=tau * lam * \
A = pm.Normal('A', mu=A_prior_mu, sigma=tau * lam *
at.sqrt(c2 / (c2 + tau**2 * lam**2)), shape=(ndim, ndim))

# If noise covariance is provided, use it as a prior
Expand Down Expand Up @@ -408,14 +408,14 @@ def run_inference_large_xs(self, samples=4000, tune=2000, cores=4) -> None:
c2_A = pm.InverseGamma("c2_A", 2, 1)
tau_A = pm.HalfCauchy("tau_A", beta=tau0_A)
lam_A = pm.HalfCauchy("lam_A", beta=1, shape=(nX, nX))
Ah = pm.Normal('Ah', mu=A_prior_mu, sigma=tau_A * lam_A * \
Ah = pm.Normal('Ah', mu=A_prior_mu, sigma=tau_A * lam_A *
at.sqrt(c2_A / (c2_A + tau_A**2 * lam_A**2)), shape=(nX, nX))

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

if noise_cov_prior is not None:
Expand Down
6 changes: 4 additions & 2 deletions mimic/model_simulate/base_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,15 @@ def __init__(self, debug: Optional[str] = None):
self.parameters: Optional[Dict[str, Union[int,
float, None, np.ndarray, str, Any]]] = None

# The debug property is a getter and setter for the private attribute _debug.
# The debug property is a getter and setter for the private attribute
# _debug.
@property
def debug(self) -> Optional[str]:
"""Gets the current debug level."""
return self._debug

# The setter for the debug property only allows setting the debug level to None, 'low', or 'high'.
# The setter for the debug property only allows setting the debug level to
# None, 'low', or 'high'.
@debug.setter
def debug(self, value: Optional[str]) -> None:
"""Sets the debug level, allowing only None, 'low', or 'high'."""
Expand Down

0 comments on commit 23a267a

Please sign in to comment.