Skip to content
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

Issue on class emcee.moves.GaussianMove(cov, mode='vector', factor=None) #445

Open
HuiTong5 opened this issue Oct 18, 2022 · 0 comments
Open

Comments

@HuiTong5
Copy link

For class emcee.moves.GaussianMove(cov, mode='vector', factor=None), the emcee docs (and the comments in the source code) all say the parameter factor (Optional[float]) is invalid for the "vector" mode. However, I do not find factor option is forbidden in actual calculation of proposal samples when mode="vector" in the following code.
Also, I don't quite understand mathematically why factor (Optional[float])` is invalid for the "vector" mode.

As far as I understand, factor (Optional[float]) makes the Gaussian with flexible scale (i.e., add a factor to the fixed input scale parameter), which somewhat introduce more randomness to benefit the proposal.
Then the proposal distribution turn out to be
Screen Shot 2022-10-18 at 1 40 09 PM
Here, x is the proposal sample, G represent Gaussian distribution, cov and factor are the input parameters, f is the proposal factor value in actual calculation, which follows LogUniform(-self.log_factor, self.log_factor) in this line.

From my understanding, the proposal distribution keeps a symmetric distribution, which means we do not need to introduce additional factor to account for difference in proposal distribution q(x|x') and q(x'|x) when calculating the acceptance rate in MCMC, i.e., the same as a regular Gaussian proposal.
And it's nothing related to mode if I understand correctly.

Also, another question comes to me when thinking of the mode. If one provides the full, square covariance matrix and choose "random", or "sequential" mode, that means, sampler selects one dimension in each iteration, proposal distribution becomes marginalized Gaussian in this situation. Only the variance element will affect the proposal but the covariance (non-diagonal elements) won't be considered. That's probably a loss of information. Maybe "random", or "sequential" mode should be disabled in this case?

I may make some mistakes when thinking of all these. Please correct me if there're some problems.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant