Proposals
#149
Replies: 1 comment
-
For example, suppose we have the following normal-normal model: μ ~ Normal(0, 1)
x ~ Normal(μ, 1)
μ | x = 5 In OmegaCore, you would express this as: μ = 1 ~ Normal(0, 1)
x = 2 ~ Normal(μ, 1)
x_ = 0.123
μc = μ |ᶜ x ==ₚ x_ There is some amount of syntactic sugar going on here. The functions constructed in explicit form would be: using Distributions: Normal, quantile, cdf
"std-normal inverse cdf"
q(x) = quantile(Normal(0, 1), x)
# Let's assume ω : Int -> [9, 1]
stdunif(id, ω) = ω[id]
n(id, ω, μ_, σ_) = q(stdunif(id, ω)) * σ_ + + μ_
μ(ω) = n(1, ω, 0, 1)
x(ω) = n(2, ω, μ(ω), 1)
μc(ω) = x(ω) == x_ ? μ(ω) : error() I'll consider different ways Conventional wayIn the conventional way, we:
Old Omega Way
New Omega Way 1
Hence
Third OptionThis option is a hybrid of the two:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It's tricky to get the interface to proposals right.
Let's consider the requirements for different inference methods
Of course, the user can a simply specify a proposal manually, which is just a function from
ω
toω'
, under some constraints:ω'
should be valid in the sense thatX(ω')
is well defined.X
?ω
has components that aren't necessary forX
in the sense that there is some restriction ofω
such thatX(ω)
is well defined.We need to be able to compute
p(ω)
One idea to specify proposals is to define prehooks
In the simplest case we might decide that:
logpdf(\omega)
is just the logpdf of the sum of the exogenous variablesConsequently, there is no need to resimulate the model after making a proposal, or even the need to consider the model at all
The problems with this are that:
So from this perspective we can think of resimulation as taking a modified
ω'
andx(ω')
is well defined in thata. it is complete, and not missing components,
b. it is free from inconsistency
Beta Was this translation helpful? Give feedback.
All reactions