@@ -1782,8 +1782,18 @@ def setup_class(self):
1782
1782
# add a bounded variable as well
1783
1783
bound_var = Bound (Normal , lower = 1.0 )("bound_var" , mu = 0 , sigma = 10 )
1784
1784
1785
+ # KroneckerNormal
1786
+ n , m = 3 , 4
1787
+ covs = [np .eye (n ), np .eye (m )]
1788
+ kron_normal = KroneckerNormal ('kron_normal' , mu = np .zeros (n * m ), covs = covs , shape = n * m )
1789
+
1790
+ # MatrixNormal
1791
+ matrix_normal = MatrixNormal ('mat_normal' , mu = np .random .normal (size = n ), rowcov = np .eye (n ),
1792
+ colchol = np .linalg .cholesky (np .eye (n )), shape = (n , n ))
1793
+
1785
1794
# Likelihood (sampling distribution) of observations
1786
1795
Y_obs = Normal ("Y_obs" , mu = mu , sigma = sigma , observed = Y )
1796
+
1787
1797
self .distributions = [alpha , sigma , mu , b , Z , Y_obs , bound_var ]
1788
1798
self .expected_latex = (
1789
1799
r"$\text{alpha} \sim \text{Normal}(\mathit{mu}=0.0,~\mathit{sigma}=10.0)$" ,
@@ -1793,6 +1803,8 @@ def setup_class(self):
1793
1803
r"$\text{Z} \sim \text{MvNormal}(\mathit{mu}=array,~\mathit{chol_cov}=array)$" ,
1794
1804
r"$\text{Y_obs} \sim \text{Normal}(\mathit{mu}=\text{mu},~\mathit{sigma}=f(\text{sigma}))$" ,
1795
1805
r"$\text{bound_var} \sim \text{Bound}(\mathit{lower}=1.0,~\mathit{upper}=\text{None})$ -- \text{Normal}(\mathit{mu}=0.0,~\mathit{sigma}=10.0)$" ,
1806
+ r"$\text{kron_normal} \sim \text{KroneckerNormal}(\mathit{mu}=array)$" ,
1807
+ r"$\text{mat_normal} \sim \text{MatrixNormal}(\mathit{mu}=array,~\mathit{rowcov}=array,~\mathit{colchol_cov}=array)$" ,
1796
1808
)
1797
1809
self .expected_str = (
1798
1810
r"alpha ~ Normal(mu=0.0, sigma=10.0)" ,
@@ -1802,6 +1814,8 @@ def setup_class(self):
1802
1814
r"Z ~ MvNormal(mu=array, chol_cov=array)" ,
1803
1815
r"Y_obs ~ Normal(mu=mu, sigma=f(sigma))" ,
1804
1816
r"bound_var ~ Bound(lower=1.0, upper=None)-Normal(mu=0.0, sigma=10.0)" ,
1817
+ r"kron_normal ~ KroneckerNormal(mu=array)" ,
1818
+ r"mat_normal ~ MatrixNormal(mu=array, rowcov=array, colchol_cov=array)" ,
1805
1819
)
1806
1820
1807
1821
def test__repr_latex_ (self ):
0 commit comments