MetropolisMH

class sherpa.sim.mh.MetropolisMH(fcn, sigma, mu, dof, *args)[source] [edit on github]

Bases: MH

The Metropolis Metropolis-Hastings Sampler

Methods Summary

accept(current, current_stat, proposal, ...)

Should the proposal be accepted (using the Cash statistic and the t distribution)?

accept_metropolis(current, current_stat, ...)

accept_mh(current, current_stat, proposal, ...)

calc_fit_stat(proposed_params)

calc_stat(proposed_params)

dmvt(x[, log, norm])

draw(current)

Create a new set of parameter values using the t distribution.

init([log, inv, defaultprior, priorshape, ...])

metropolis(current)

Metropolis Jumping Rule

mh(current)

MH jumping rule

reject()

tear_down()

update(stat, mu[, init])

include prior

Methods Documentation

accept(current, current_stat, proposal, proposal_stat, **kwargs) [edit on github]

Should the proposal be accepted (using the Cash statistic and the t distribution)?

accept_metropolis(current, current_stat, proposal, proposal_stat)[source] [edit on github]
accept_mh(current, current_stat, proposal, proposal_stat) [edit on github]
calc_fit_stat(proposed_params) [edit on github]
calc_stat(proposed_params) [edit on github]
dmvt(x, log=True, norm=False) [edit on github]
draw(current)[source] [edit on github]

Create a new set of parameter values using the t distribution.

Given the best-guess (mu) and current (current) set of parameters, along with the covariance matrix (sigma), return a new set of parameters.

init(log=False, inv=False, defaultprior=True, priorshape=False, priors=(), originalscale=True, scale=1, sigma_m=False, p_M=0.5)[source] [edit on github]
metropolis(current)[source] [edit on github]

Metropolis Jumping Rule

mh(current) [edit on github]

MH jumping rule

reject() [edit on github]
tear_down()[source] [edit on github]
update(stat, mu, init=True) [edit on github]

include prior