Add gaussian example to C++ Examples (related to #37) #38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In #37 I opened an issue that the example gaussian.py does not produce a sampled log_Z which is close to the analytical log_Z. In order to further debug this, I added the same example to the C++ version where I get:
When checking the posterior samples everything looks perfect also:
![image](https://user-images.githubusercontent.com/8685531/131335336-6e137f6c-70d8-4cf4-9bc6-b1a696b9e761.png)
So the C++-version seems to work. I will now move on to explicitly check the posteriors for the python example.
I mainly added this so that my code is visible and maybe it will help someone else in the future.