MH¶
- class sherpa.sim.mh.MH(fcn, sigma, mu, dof, *args)[source] [edit on github]¶
Bases:
sherpa.sim.mh.SamplerThe Metropolis Hastings Sampler
Methods Summary
accept(current, current_stat, proposal, ...)Should the proposal be accepted (using the Cash statistic and the t distribution)?
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, ...])mh(current)MH jumping rule
reject()update(stat, mu[, init])include prior
Methods Documentation
- accept(current, current_stat, proposal, proposal_stat, **kwargs)[source] [edit on github]¶
Should the proposal be accepted (using the Cash statistic and the t distribution)?
- accept_mh(current, current_stat, proposal, proposal_stat)[source] [edit on github]¶
- calc_fit_stat(proposed_params)[source] [edit on github]¶
- calc_stat(proposed_params)[source] [edit on github]¶
- dmvt(x, log=True, norm=False)[source] [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)[source] [edit on github]¶
- mh(current)[source] [edit on github]¶
MH jumping rule
- reject()[source] [edit on github]¶
- tear_down()[source] [edit on github]¶
- update(stat, mu, init=True)[source] [edit on github]¶
include prior