Struct nuts_rs::DiagGradNutsSettings
source · pub struct DiagGradNutsSettings {
pub num_tune: u64,
pub num_draws: u64,
pub maxdepth: u64,
pub store_gradient: bool,
pub store_unconstrained: bool,
pub max_energy_error: f64,
pub store_divergences: bool,
pub mass_matrix_adapt: GradDiagOptions,
pub check_turning: bool,
pub num_chains: usize,
pub seed: u64,
}
Expand description
Settings for the NUTS sampler
Fields§
§num_tune: u64
The number of tuning steps, where we fit the step size and mass matrix.
num_draws: u64
The number of draws after tuning
maxdepth: u64
The maximum tree depth during sampling. The number of leapfrog steps is smaller than 2 ^ maxdepth.
store_gradient: bool
Store the gradient in the SampleStats
store_unconstrained: bool
Store each unconstrained parameter vector in the sampler stats
max_energy_error: f64
If the energy error is larger than this threshold we treat the leapfrog step as a divergence.
store_divergences: bool
Store detailed information about each divergence in the sampler stats
mass_matrix_adapt: GradDiagOptions
Settings for mass matrix adaptation.
check_turning: bool
§num_chains: usize
§seed: u64
Trait Implementations§
source§impl Clone for DiagGradNutsSettings
impl Clone for DiagGradNutsSettings
source§fn clone(&self) -> DiagGradNutsSettings
fn clone(&self) -> DiagGradNutsSettings
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Default for DiagGradNutsSettings
impl Default for DiagGradNutsSettings
source§impl Settings for DiagGradNutsSettings
impl Settings for DiagGradNutsSettings
type Chain<M: Math> = NutsChain<M, EuclideanPotential<M, DiagMassMatrix<M>>, SmallRng, GradDiagStrategy<M>>
fn new_chain<M: Math, R: Rng + ?Sized>( &self, chain: u64, math: M, rng: &mut R ) -> Self::Chain<M>
fn sample_stats<M: Math>( &self, stats: &<Self::Chain<M> as SamplerStats<M>>::Stats ) -> SampleStats
fn hint_num_tune(&self) -> usize
fn hint_num_draws(&self) -> usize
fn num_chains(&self) -> usize
fn seed(&self) -> u64
impl Copy for DiagGradNutsSettings
Auto Trait Implementations§
impl Freeze for DiagGradNutsSettings
impl RefUnwindSafe for DiagGradNutsSettings
impl Send for DiagGradNutsSettings
impl Sync for DiagGradNutsSettings
impl Unpin for DiagGradNutsSettings
impl UnwindSafe for DiagGradNutsSettings
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more