TuringLang/NestedSamplers.jl

Note-keeping to understand the overall flow

SaranjeetKaur opened this issue · 2 comments

Bird's eye view:

  1. creating a file, say ns.jl, in https://github.com/TuringLang/Turing.jl/tree/master/src/inference/ shall integrate NestedSamplers.jl with Turing
  2. once above step is done, write the algo of Polychord
  3. build an extension to Proposals(? not clear yet). [Refer to Miles message on Slack, 27 May 2020: v0.3 of NestedSamplers is in the registrator queue, it should be trivial to start adding more complex proposals. There’s some very low-hanging fruit to implement Proposals.RStagger based on https://github.com/joshspeagle/dynesty/blob/c95c2ec938d847e5e3672e6caa5f700846327dc4/dynesty/sampling.py#L249-L409 (extremely similar to the current Proposals.RWalk) (cc @saranjeet Kaur )] (try implementing other proposals too: .Slice, .HSlice, .RSlice listed on the same page, also include in README.md after checking)
  4. point 3, states about Proposals.RStagger, a low-hanging fruit to implement (catch up on this when you are clearer)
  5. (later on) try out various likelihoods some are listed here: https://dynesty.readthedocs.io/en/latest/examples.html

random stuff as i learn:

  1. trace back the sample function to know what are you reading.. almost everything is revolving around it in Turing & AbstractMCMC
  2. struct: implements a concrete type as a subtype of an abstract type
  3. can define a struct for a sampler as well as an algorithm. can identify this by looking at the abstract type, whether it is XYZSampler or an InferenceAlgorithm respectively
  4. import the functions that you intend to overload, rather than using
  5. in a sampler struct, store all that you may need to perform inference between samples but you don’t want to store in a transition
  6. in AbstractMCMC, a sampler is a struct of the subtype AbtractSampler
  7. in AbstractMCMC, a model is a struct of the subtype AbtractModel. this model contains information necessary to perform inference. Turing does not require to defining custom model structs

status:

  1. Proposals.RStagger [implemented]
  2. Proposals.Slice + more complex proposals [back of mind]
  3. implement nested sampling to turing: [WIP]
  4. polychord algo [can it be included as part of point 2?]
  5. write technical blogs + documentation using Julia [on weekends] .. personal blogs can be linked to Turing.ml
  6. code documentation
  7. producing tutorials
  8. produing examples
    **increase usage of Git, experiment with weave.jl, blogging on GitHub pages, learn how to host a .jmd file as .md file on GitHub