88cd16a4e3c70d82567c96c1ffc277ef8ea87a3f,pymc3/step_methods/hmc/hmc.py,HamiltonianMC,astep,#HamiltonianMC#Any#,59
Before Change
q = q0
p = self.H.pot.random() // initialize momentum
initial_energy = self.compute_energy(q, p)
q, p, current_energy = self.leapfrog(q, p, e, n_steps)
energy_change = initial_energy - current_energy
return metrop_select(energy_change, q, q0)[0]
After Change
p0 = self.potential.random()
start = self.integrator.compute_state(q0, p0)
if not np.isfinite(start.energy):
raise ValueError("Bad initial energy: %s. The model "
"might be misspecified." % start.energy)
state = start
for _ in range(n_steps):
state = self.integrator.step(e, state)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances
Project Name: pymc-devs/pymc3
Commit Name: 88cd16a4e3c70d82567c96c1ffc277ef8ea87a3f
Time: 2017-07-18
Author: adrian.seyboldt@gmail.com
File Name: pymc3/step_methods/hmc/hmc.py
Class Name: HamiltonianMC
Method Name: astep
Project Name: scipy/scipy
Commit Name: c7308c4ab8870e6506ee13801da4fe88f1a43004
Time: 2016-06-06
Author: pav@iki.fi
File Name: scipy/sparse/linalg/isolve/lgmres.py
Class Name:
Method Name: lgmres
Project Name: lmcinnes/pynndescent
Commit Name: 2f218b3ce2b1de05d60acfc563b32765a3e91f41
Time: 2019-10-06
Author: leland.mcinnes@gmail.com
File Name: pynndescent/pynndescent_.py
Class Name:
Method Name: init_rp_tree
Project Name: EpistasisLab/tpot
Commit Name: cc42dfa0e2808a96e9022fac7da980fad13d124a
Time: 2019-11-05
Author: weixuanf@pennmedicine.upenn.edu
File Name: tpot/builtins/stacking_estimator.py
Class Name: StackingEstimator
Method Name: transform