New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log Ratio of Normalizing Constants #7

Merged
merged 2 commits into from Jul 27, 2017

Conversation

Projects
None yet
3 participants
@LeahPrice
Collaborator

LeahPrice commented Jul 27, 2017

Adding estimators of the log ratio of normalizing constant based on

  • the standard SMC estimator
  • path sampling estimator with 1st and 2nd order trapezoidal integration
Log Ratio of Normalising Constants
Adding estimators of the log ratio of normalising constant based on
- the standard SMC estimator
- path sampling estimator with 1st and 2nd order trapezoidal integration
@LeahPrice

This comment has been minimized.

Show comment
Hide comment
@LeahPrice

LeahPrice Jul 27, 2017

Collaborator

I moved the function stableLogSumWeights to the population header file. It compiled for me and I didn't get any warnings, but I didn't get any warnings before Dirk added the forward declaration either. I think it's okay since Travis CI checks passed.

Some of this is a little different to what I have in my master copy - I changed the template parameter for history to make it easier for users to write the path sampling integrands. I've checked that everything still works properly on the linear regression example but I'm saving that for a future pull request where I'll document it properly. Please let me know if you'd like me to add it in now.

Collaborator

LeahPrice commented Jul 27, 2017

I moved the function stableLogSumWeights to the population header file. It compiled for me and I didn't get any warnings, but I didn't get any warnings before Dirk added the forward declaration either. I think it's okay since Travis CI checks passed.

Some of this is a little different to what I have in my master copy - I changed the template parameter for history to make it easier for users to write the path sampling integrands. I've checked that everything still works properly on the linear regression example but I'm saving that for a future pull request where I'll document it properly. Please let me know if you'd like me to add it in now.

Show outdated Hide outdated inst/include/population.h Outdated
Show outdated Hide outdated inst/include/sampler.h Outdated
@adamjohansen

Thanks, @LeahPrice, I've made a couple of very small comments but this essentially looks good to me.

Removing unnecessary arma::ones
and moving the stableLogSumWeights function definition to a source file.
@adamjohansen

Great, this looks good to me.

(I just realised it might not have been obvious from my previous comment, but the reason to avoid introducing the vector of ones is just that it involves allocating N*sizeof(double) bytes of memory and then initializing it every time and N might be quite large.)

@eddelbuettel eddelbuettel merged commit df94c42 into rcppsmc:master Jul 27, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@LeahPrice LeahPrice deleted the LeahPrice:NCestimation branch Jul 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment