Skip to content

Add multiplier for adaptation window sizes #3705

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

Merged
merged 8 commits into from
Dec 4, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update docstring and remove extraneous parameter
  • Loading branch information
eigenfoo committed Dec 4, 2019
commit 944b253cfd0862088168eb9c39413a77adcf0bfb
12 changes: 2 additions & 10 deletions pymc3/step_methods/hmc/quadpotential.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,23 +466,16 @@ def velocity_energy(self, x, v_out):


class QuadPotentialFullAdapt(QuadPotentialFull):
"""Adapt a dense mass matrix using the sample covariances

If the parameter ``doubling`` is true, the adaptation window is doubled
every time it is passed. This can lead to better convergence of the mass
matrix estimation.

"""
"""Adapt a dense mass matrix using the sample covariances."""
def __init__(
self,
n,
initial_mean,
initial_cov=None,
initial_weight=0,
adaptation_window=101,
adaptation_window_multiplier=1,
adaptation_window_multiplier=2,
update_window=1,
doubling=True,
dtype=None,
):
warnings.warn("QuadPotentialFullAdapt is an experimental feature")
Expand Down Expand Up @@ -520,7 +513,6 @@ def __init__(
self._background_cov = _WeightedCovariance(self._n, dtype=self.dtype)
self._n_samples = 0

self._doubling = doubling
self._adaptation_window = int(adaptation_window)
self._adaptation_window_multiplier = int(adaptation_window_multiplier)
self._update_window = int(update_window)
Expand Down