dadi-vardhan / SDP

0 stars 2 forks source link

MCMC Sampler implementation in Python and C++ #27

Open deebuls opened 3 years ago

deebuls commented 3 years ago

https://github.com/klipto/Uncertainty/blob/master/Uncertain/MarkovChainMonteCarloSampler.cs

The sampler is the main part of the uncertain code.

First try to implement the sampler.

deebuls commented 3 years ago

Already implemented library

https://emcee.readthedocs.io/en/stable/

deebuls commented 3 years ago

I found a very detailed article explaining the process of MCMC sampling, Why it is used and with code.

https://towardsdatascience.com/from-scratch-bayesian-inference-markov-chain-monte-carlo-and-metropolis-hastings-in-python-ef21a29e25a

Please do the following.

  1. Try to understand each and every line
  2. execute the code and the examples and check validity
  3. Compare the code format with the C# code available in the uncertain library
  4. Find a way to integrate in the library
  5. Check how the code developed can be replaced with the above standard library "emcee" (optional but will solidify your understanding)

@HammamWahab I was checking for cpp implementation for the mcmcsampler. (In the meeting we decided that the MCMC sampler is the most important missing puzzle for implementing the library and we focus on it). Here is what you can focus:

  1. Convert the from C# to cpp using some code convertor the mcmc sampler
  2. Use already implemented cpp mcmc library (for example https://github.com/kthohr/mcmc) and use it.

The Goal for SDP now has been reduced considerably to implement 1 test case :

deebuls commented 3 years ago

@dadi-vardhan @HammamWahab any updates ?

dadi-vardhan commented 3 years ago

Hello @deebuls we have worked on making the gaussian_tests pass and in which, out of 6 tests 5 were successful. The last test Gaussain_bernoulli_conditional is so much dependent on other classes. So at present we all three are looking into how we can achieve this and will update you once we complete it.

HammamWahab commented 3 years ago

Hi @deebuls , C++ version of MCMC (RWMH) is manually developed here.

Also, a functionality test for Gaussian test (6 cases) is implemented here.