@@ -132,63 +132,63 @@ def setup_class(self):
132
132
self .formats = [("plain" , True ), ("plain" , False ), ("latex" , True ), ("latex" , False )]
133
133
self .expected = {
134
134
("plain" , True ): [
135
- r"alpha ~ N (0, 10)" ,
136
- r"sigma ~ N**+ (0, 1)" ,
135
+ r"alpha ~ Normal (0, 10)" ,
136
+ r"sigma ~ HalfNormal (0, 1)" ,
137
137
r"mu ~ Deterministic(f(beta, alpha))" ,
138
- r"beta ~ N (0, 10)" ,
139
- r"Z ~ N (f(), f())" ,
140
- r"nb_with_p_n ~ NB (10, nbp)" ,
141
- r"zip ~ MarginalMixture(f(), DiracDelta(0), Pois (5))" ,
142
- r"w ~ Dir (<constant>)" ,
138
+ r"beta ~ Normal (0, 10)" ,
139
+ r"Z ~ MultivariateNormal (f(), f())" ,
140
+ r"nb_with_p_n ~ NegativeBinomial (10, nbp)" ,
141
+ r"zip ~ MarginalMixture(f(), DiracDelta(0), Poisson (5))" ,
142
+ r"w ~ Dirichlet (<constant>)" ,
143
143
(
144
144
r"nested_mix ~ MarginalMixture(w, "
145
- r"MarginalMixture(f(), DiracDelta(0), Pois (5)), "
146
- r"Censored(Bern (0.5), -1, 1))"
145
+ r"MarginalMixture(f(), DiracDelta(0), Poisson (5)), "
146
+ r"Censored(Bernoulli (0.5), -1, 1))"
147
147
),
148
- r"Y_obs ~ N (mu, sigma)" ,
148
+ r"Y_obs ~ Normal (mu, sigma)" ,
149
149
r"pot ~ Potential(f(beta, alpha))" ,
150
150
],
151
151
("plain" , False ): [
152
- r"alpha ~ N " ,
153
- r"sigma ~ N**+ " ,
152
+ r"alpha ~ Normal " ,
153
+ r"sigma ~ HalfNormal " ,
154
154
r"mu ~ Deterministic" ,
155
- r"beta ~ N " ,
156
- r"Z ~ N " ,
157
- r"nb_with_p_n ~ NB " ,
155
+ r"beta ~ Normal " ,
156
+ r"Z ~ MultivariateNormal " ,
157
+ r"nb_with_p_n ~ NegativeBinomial " ,
158
158
r"zip ~ MarginalMixture" ,
159
- r"w ~ Dir " ,
159
+ r"w ~ Dirichlet " ,
160
160
r"nested_mix ~ MarginalMixture" ,
161
- r"Y_obs ~ N " ,
161
+ r"Y_obs ~ Normal " ,
162
162
r"pot ~ Potential" ,
163
163
],
164
164
("latex" , True ): [
165
- r"$\text{alpha} \sim \operatorname{N }(0,~10)$" ,
166
- r"$\text{sigma} \sim \operatorname{N^{+} }(0,~1)$" ,
165
+ r"$\text{alpha} \sim \operatorname{Normal }(0,~10)$" ,
166
+ r"$\text{sigma} \sim \operatorname{HalfNormal }(0,~1)$" ,
167
167
r"$\text{mu} \sim \operatorname{Deterministic}(f(\text{beta},~\text{alpha}))$" ,
168
- r"$\text{beta} \sim \operatorname{N }(0,~10)$" ,
169
- r"$\text{Z} \sim \operatorname{N }(f(),~f())$" ,
170
- r"$\text{nb_with_p_n} \sim \operatorname{NB }(10,~\text{nbp})$" ,
171
- r"$\text{zip} \sim \operatorname{MarginalMixture}(f(),~\operatorname{DiracDelta}(0),~\operatorname{Pois }(5))$" ,
172
- r"$\text{w} \sim \operatorname{Dir }(\text{<constant>})$" ,
168
+ r"$\text{beta} \sim \operatorname{Normal }(0,~10)$" ,
169
+ r"$\text{Z} \sim \operatorname{MultivariateNormal }(f(),~f())$" ,
170
+ r"$\text{nb_with_p_n} \sim \operatorname{NegativeBinomial }(10,~\text{nbp})$" ,
171
+ r"$\text{zip} \sim \operatorname{MarginalMixture}(f(),~\operatorname{DiracDelta}(0),~\operatorname{Poisson }(5))$" ,
172
+ r"$\text{w} \sim \operatorname{Dirichlet }(\text{<constant>})$" ,
173
173
(
174
174
r"$\text{nested_mix} \sim \operatorname{MarginalMixture}(\text{w},"
175
- r"~\operatorname{MarginalMixture}(f(),~\operatorname{DiracDelta}(0),~\operatorname{Pois }(5)),"
176
- r"~\operatorname{Censored}(\operatorname{Bern }(0.5),~-1,~1))$"
175
+ r"~\operatorname{MarginalMixture}(f(),~\operatorname{DiracDelta}(0),~\operatorname{Poisson }(5)),"
176
+ r"~\operatorname{Censored}(\operatorname{Bernoulli }(0.5),~-1,~1))$"
177
177
),
178
- r"$\text{Y_obs} \sim \operatorname{N }(\text{mu},~\text{sigma})$" ,
178
+ r"$\text{Y_obs} \sim \operatorname{Normal }(\text{mu},~\text{sigma})$" ,
179
179
r"$\text{pot} \sim \operatorname{Potential}(f(\text{beta},~\text{alpha}))$" ,
180
180
],
181
181
("latex" , False ): [
182
- r"$\text{alpha} \sim \operatorname{N }$" ,
183
- r"$\text{sigma} \sim \operatorname{N^{+} }$" ,
182
+ r"$\text{alpha} \sim \operatorname{Normal }$" ,
183
+ r"$\text{sigma} \sim \operatorname{HalfNormal }$" ,
184
184
r"$\text{mu} \sim \operatorname{Deterministic}$" ,
185
- r"$\text{beta} \sim \operatorname{N }$" ,
186
- r"$\text{Z} \sim \operatorname{N }$" ,
187
- r"$\text{nb_with_p_n} \sim \operatorname{NB }$" ,
185
+ r"$\text{beta} \sim \operatorname{Normal }$" ,
186
+ r"$\text{Z} \sim \operatorname{MultivariateNormal }$" ,
187
+ r"$\text{nb_with_p_n} \sim \operatorname{NegativeBinomial }$" ,
188
188
r"$\text{zip} \sim \operatorname{MarginalMixture}$" ,
189
- r"$\text{w} \sim \operatorname{Dir }$" ,
189
+ r"$\text{w} \sim \operatorname{Dirichlet }$" ,
190
190
r"$\text{nested_mix} \sim \operatorname{MarginalMixture}$" ,
191
- r"$\text{Y_obs} \sim \operatorname{N }$" ,
191
+ r"$\text{Y_obs} \sim \operatorname{Normal }$" ,
192
192
r"$\text{pot} \sim \operatorname{Potential}$" ,
193
193
],
194
194
}
@@ -210,28 +210,28 @@ def setup_class(self):
210
210
self .formats = [("plain" , True ), ("plain" , False ), ("latex" , True ), ("latex" , False )]
211
211
self .expected = {
212
212
("plain" , True ): [
213
- r"a ~ N (2, 1)" ,
214
- r"b ~ N (<shared>, 1)" ,
215
- r"c ~ N (2, 1)" ,
216
- r"d ~ N (<constant>, 1)" ,
213
+ r"a ~ Normal (2, 1)" ,
214
+ r"b ~ Normal (<shared>, 1)" ,
215
+ r"c ~ Normal (2, 1)" ,
216
+ r"d ~ Normal (<constant>, 1)" ,
217
217
],
218
218
("plain" , False ): [
219
- r"a ~ N " ,
220
- r"b ~ N " ,
221
- r"c ~ N " ,
222
- r"d ~ N " ,
219
+ r"a ~ Normal " ,
220
+ r"b ~ Normal " ,
221
+ r"c ~ Normal " ,
222
+ r"d ~ Normal " ,
223
223
],
224
224
("latex" , True ): [
225
- r"$\text{a} \sim \operatorname{N }(2,~1)$" ,
226
- r"$\text{b} \sim \operatorname{N }(\text{<shared>},~1)$" ,
227
- r"$\text{c} \sim \operatorname{N }(2,~1)$" ,
228
- r"$\text{d} \sim \operatorname{N }(\text{<constant>},~1)$" ,
225
+ r"$\text{a} \sim \operatorname{Normal }(2,~1)$" ,
226
+ r"$\text{b} \sim \operatorname{Normal }(\text{<shared>},~1)$" ,
227
+ r"$\text{c} \sim \operatorname{Normal }(2,~1)$" ,
228
+ r"$\text{d} \sim \operatorname{Normal }(\text{<constant>},~1)$" ,
229
229
],
230
230
("latex" , False ): [
231
- r"$\text{a} \sim \operatorname{N }$" ,
232
- r"$\text{b} \sim \operatorname{N }$" ,
233
- r"$\text{c} \sim \operatorname{N }$" ,
234
- r"$\text{d} \sim \operatorname{N }$" ,
231
+ r"$\text{a} \sim \operatorname{Normal }$" ,
232
+ r"$\text{b} \sim \operatorname{Normal }$" ,
233
+ r"$\text{c} \sim \operatorname{Normal }$" ,
234
+ r"$\text{d} \sim \operatorname{Normal }$" ,
235
235
],
236
236
}
237
237
@@ -249,9 +249,9 @@ def test_model_latex_repr_three_levels_model():
249
249
expected = [
250
250
"$$" ,
251
251
"\\ begin{array}{rcl}" ,
252
- "\\ text{mu} &\\ sim & \\ operatorname{N }(0,~5)\\ \\ \\ text{sigma} &\\ sim & "
253
- "\\ operatorname{C^{+} }(0,~2.5)\\ \\ \\ text{censored_normal} &\\ sim & "
254
- "\\ operatorname{Censored}(\\ operatorname{N }(\\ text{mu},~\\ text{sigma}),~-2,~2)" ,
252
+ "\\ text{mu} &\\ sim & \\ operatorname{Normal }(0,~5)\\ \\ \\ text{sigma} &\\ sim & "
253
+ "\\ operatorname{HalfCauchy }(0,~2.5)\\ \\ \\ text{censored_normal} &\\ sim & "
254
+ "\\ operatorname{Censored}(\\ operatorname{Normal }(\\ text{mu},~\\ text{sigma}),~-2,~2)" ,
255
255
"\\ end{array}" ,
256
256
"$$" ,
257
257
]
@@ -268,8 +268,8 @@ def test_model_latex_repr_mixture_model():
268
268
"$$" ,
269
269
"\\ begin{array}{rcl}" ,
270
270
"\\ text{w} &\\ sim & "
271
- "\\ operatorname{Dir }(\\ text{<constant>})\\ \\ \\ text{mix} &\\ sim & "
272
- "\\ operatorname{MarginalMixture}(\\ text{w},~\\ operatorname{N }(0,~5),~\\ operatorname{StudentT}(7,~0,~1))" ,
271
+ "\\ operatorname{Dirichlet }(\\ text{<constant>})\\ \\ \\ text{mix} &\\ sim & "
272
+ "\\ operatorname{MarginalMixture}(\\ text{w},~\\ operatorname{Normal }(0,~5),~\\ operatorname{StudentT}(7,~0,~1))" ,
273
273
"\\ end{array}" ,
274
274
"$$" ,
275
275
]
0 commit comments