pub enum Support {
Real,
Positive,
Bounded {
lower: f64,
upper: f64,
},
}Expand description
The support of a continuous (f64-valued) distribution, as far as an
inference kernel needs to know it (FG-N1).
Metropolis-Hastings proposal selection must be a function of the site, not
of the value currently at the site: a kernel whose shape depends on the
current state is not, in general, invariant for the target. Support is the
static description each distribution advertises for that purpose via
Distribution::support:
Support::Real- the whole real line (the default). Proposals are a symmetric Gaussian walk; anything the density rejects scores-infand is simply rejected, so this is always correct, merely less efficient for a distribution that is really constrained.Support::Positive-(0, +inf). Proposals walk in log space with the exact Jacobian correction (FG-02).Support::Bounded- a finite interval[lower, upper]. Proposals are a Gaussian walk reflected at both bounds (symmetric, so no Hastings term), which can reach every point of the interval from every other one.
Discrete distributions never consult this and leave the default.
Variants§
Real
Unconstrained: (-inf, +inf). Also the conservative default for a
distribution that does not describe its support.
Positive
Strictly positive: (0, +inf).
Bounded
A finite interval.
Trait Implementations§
impl Copy for Support
impl StructuralPartialEq for Support
Auto Trait Implementations§
impl Freeze for Support
impl RefUnwindSafe for Support
impl Send for Support
impl Sync for Support
impl Unpin for Support
impl UnsafeUnpin for Support
impl UnwindSafe for Support
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more