Skip to content

WIP: replace Hessian scaling guessing by an identity matrix #2232

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 2 commits into from May 29, 2017
Merged
Changes from all commits
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
3 changes: 2 additions & 1 deletion pymc3/step_methods/hmc/base_hmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from pymc3.model import modelcontext, Point
from .quadpotential import quad_potential
from pymc3.theanof import inputvars, make_shared_replacements
import numpy as np


class BaseHMC(ArrayStepShared):
Expand Down Expand Up @@ -41,7 +42,7 @@ def __init__(self, vars=None, scaling=None, step_scale=0.25, is_cov=False,
vars = inputvars(vars)

if scaling is None and potential is None:
scaling = model.test_point
scaling = np.ones(model.dict_to_array(model.test_point).size)

if isinstance(scaling, dict):
scaling = guess_scaling(Point(scaling, model=model), model=model, vars=vars)
Expand Down