Skip to content

Commit 2c474c7

Browse files
committed
restructure modules
1 parent 9391367 commit 2c474c7

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from pymc_experimental.distributions.multivariate.r2d2m2cp import R2D2M2CP

pymc_experimental/distributions/multivariate.py renamed to pymc_experimental/distributions/multivariate/r2d2m2cp.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
import pymc as pm
1919
import pytensor.tensor as pt
2020

21+
__all__ = ["R2D2M2CP"]
22+
2123

2224
def _psivar2musigma(psi: pt.TensorVariable, explained_var: pt.TensorVariable):
2325
pi = pt.erfinv(2 * psi - 1)
@@ -201,8 +203,11 @@ def R2D2M2CP(
201203
# if you do not know, leave as 0.5
202204
centered=False
203205
)
206+
# intercept prior centering should be around prior predictive mean
204207
intercept = y.mean()
205-
obs = pm.Normal("obs", intercept + X @ beta, eps, observed=y)
208+
# regressors should be centered around zero
209+
Xc = X - X.mean(0)
210+
obs = pm.Normal("obs", intercept + Xc @ beta, eps, observed=y)
206211
207212
208213
It is fine to leave some of the ``_std`` arguments unspecified.

0 commit comments

Comments
 (0)