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

DEMetropolisZMLDA does not respect base_blocked #85

Open
mikkelbue opened this issue Oct 11, 2020 · 2 comments
Open

DEMetropolisZMLDA does not respect base_blocked #85

mikkelbue opened this issue Oct 11, 2020 · 2 comments
Assignees

Comments

@mikkelbue
Copy link
Collaborator

The DEMetropolisZMLDA base sampler does not get the self.base_blocked argument in the initialiser, and always runs as blocked. Is this on purpose?

                if self.base_sampler == "Metropolis":
                    # MetropolisMLDA sampler in base level (level=0), targeting self.model_below
                    self.step_method_below = pm.MetropolisMLDA(
                        vars=vars_below,
                        proposal_dist=self.base_proposal_dist,
                        S=self.base_S,
                        scaling=self.base_scaling,
                        tune=self.tune,
                        tune_interval=self.base_tune_interval,
                        model=None,
                        mode=self.mode,
                        blocked=self.base_blocked,
                        **base_kwargs,
                    )
                else:
                    # DEMetropolisZMLDA sampler in base level (level=0), targeting self.model_below
                    self.step_method_below = pm.DEMetropolisZMLDA(
                        vars=vars_below,
                        S=self.base_S,
                        proposal_dist=self.base_proposal_dist,
                        lamb=self.base_lamb,
                        scaling=self.base_scaling,
                        tune=self.base_tune_target,
                        tune_interval=self.base_tune_interval,
                        tune_drop_fraction=self.base_tune_drop_fraction,
                        model=None,
                        mode=self.mode,
                        **base_kwargs,
                    )
@gmingas
Copy link
Collaborator

gmingas commented Oct 12, 2020

This was done on purpose as DEMetropolisZ is by default blocked. But I never tried to run it as compound, so it might be OK to actually allow the option (at the moment the docstring and documentation in notebooks all say that DEMetropolisZ in MLDA is used only as blocked)

@mikkelbue
Copy link
Collaborator Author

I will test it some more, and make sure it works. I don't think there is anything wrong with running DEMetropolisZ as CompoundStep, it's just a default option, not forced.

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

2 participants