bayesbay.perturbations.ParamPerturbation
- class bayesbay.perturbations.ParamPerturbation(param_space_name, parameters)
Perturbation on a chosen parameter value
- Parameters:
param_name (str) – the name of the parameter to be perturbed
parameters (List[Prior]) – list containing the
Prior
instances to be perturbed
Reference Details
- type
type of current perturbation (i.e. class name)
- Returns:
the name of this current class
- Return type:
str
- perturb(state)
perturb one value for each parameter in
self.parameters
, returning a proposed state and the log of the corresponding partial acceptance probability\[\begin{split}\underbrace{\alpha_{p}}_{\begin{array}{c} \text{Partial} \\ \text{acceptance} \\ \text{probability} \end{array}} = \underbrace{\frac{p\left({\bf m'}\right)}{p\left({\bf m}\right)}}_{\text{Prior ratio}} \underbrace{\frac{q\left({\bf m} \mid {\bf m'}\right)}{q\left({\bf m'} \mid {\bf m}\right)}}_{\text{Proposal ratio}} \underbrace{\lvert \mathbf{J} \rvert}_{\begin{array}{c} \text{Jacobian} \\ \text{determinant} \end{array}},\end{split}\]
- perturb_param_space_state(ps_state)
proposes a new parameter space state from the given state and calculates the log of the corresponding partial acceptance probability
- Parameters:
state (ParameterSpaceState) – the given current parameter space state
- Returns:
the proposed new parameter space state and the partial acceptance probability
- Return type:
Tuple[State, Number]