You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to properly stack i.i.d. variables in a vector, I suggest to introduce a sort of broadcasting for (some of?) ::Univariate nodes.
Let’s say, I have a distribution, for example, Gamma, which is available only as ::Univariate. I can do that:
D =2
x =Vector{Variable}(undef, D)
for d in1:D
@RV x[d] ~Gamma(1, 1)
end
But further in the code x is ::Vector{Variable}, so you cannot use it in the model with some kind of vector arithmetics. I'd rather want it as follows:
@RV x ~Gamma(ones(2), ones(2))
so that further x is a proper vector of two i.i.d. Gamma components.
The broadcast mimic option for Gamma node in this sense follows the spirit of other Julia packages (for instance, I can type pdf.(Gamma(1,1), x) where x can be either Array or scalar).
The text was updated successfully, but these errors were encountered:
In order to properly stack i.i.d. variables in a vector, I suggest to introduce a sort of broadcasting for (some of?)
::Univariate
nodes.Let’s say, I have a distribution, for example,
Gamma
, which is available only as::Univariate
. I can do that:But further in the code
x
is::Vector{Variable}
, so you cannot use it in the model with some kind of vector arithmetics. I'd rather want it as follows:so that further
x
is a proper vector of two i.i.d. Gamma components.The broadcast mimic option for
Gamma
node in this sense follows the spirit of other Julia packages (for instance, I can typepdf.(Gamma(1,1), x)
wherex
can be eitherArray
or scalar).The text was updated successfully, but these errors were encountered: