Conversation
|
Bijectors.jl documentation for PR #429 is available at: |
415ee3f to
537d5ba
Compare
638a5b4 to
7754bc3
Compare
|
@sunxd3 I'm still working on adding the actual distributions themselves, but could I get you to look at the tests and tell me if they seem sensible / if there's anything else I can add to them? So basically just the There's docs for the API at https://turinglang.org/Bijectors.jl/previews/PR429/vector/, if any of that is unclear do point out too. I suspect I might need to explain Personally the test suite makes me feel quite confident that it's impossible to mess up the implementation of the bijectors, so I think the test suite is probably the most important part to get a review on. |
|
Thanks Penny. I did a pass, the test interface is simply great, nothing missing or redundant as far as I could tell at the moment. I think the doc for I'll give a deeper review next week. |
|
@sunxd3 I think finally I have some space to finish this off, I'll try to get the product distributions done this week. I'm still thinking about @model function f()
a ~ Normal()
x ~ MvNormal(zeros(3), I)
end
# linked or unlinked doesn't matter
ldf = LogDensityFunction(f())and you want to perform an optimisation where This function will let you do something like ldf_optics = Union{VarName,Nothing}[]
for vn, range_and_linked in pairs(ldf._varname_ranges)
linked = range_and_linked.is_linked
this_vn_optics = if linked
optic_vec(dist) # ok we don't have dist but we can get it from running the model
else
linked_optic_vec(dist)
end
append!(ldf_optics, this_vn_optics)
endWhat one should in theory get out of that is If it's linked, sometimes you can't identify a particular index as being I realise this is actually quite hard to code correctly, and I don't know whether this plan will actually come to fruition in any way. So in a sense, implementing this might be a bit premature. But I guess there's not too much harm in having a wider interface, and if we don't use it that's a shame, but there won't be a performance cost or anything like that. |
|
thanks Penny, sounds reasonable |
This copies the interface over from https://github.com/penelopeysm/VectorBijectors.jl, as discussed in previous meetings, and extends it to support a wider range of distributions than Bijectors itself does.
Closes #237
Closes #258
Closes #398
Progress
(should be trivial to implement by forwarding to the base distribution)It was quite tricky...