Trait nuts_rs::SampleStats
source · pub trait SampleStats: Send + Debug {
// Required methods
fn depth(&self) -> u64;
fn maxdepth_reached(&self) -> bool;
fn index_in_trajectory(&self) -> i64;
fn logp(&self) -> f64;
fn energy(&self) -> f64;
fn divergence_info(&self) -> Option<&DivergenceInfo>;
fn chain(&self) -> u64;
fn draw(&self) -> u64;
fn gradient(&self) -> Option<&[f64]>;
fn unconstrained(&self) -> Option<&[f64]>;
}
Expand description
Diagnostic information about draws and the state of the sampler for each draw
Required Methods§
sourcefn maxdepth_reached(&self) -> bool
fn maxdepth_reached(&self) -> bool
Whether the trajectory was stopped because the maximum size was reached.
sourcefn index_in_trajectory(&self) -> i64
fn index_in_trajectory(&self) -> i64
The index of the accepted sample in the trajectory
sourcefn divergence_info(&self) -> Option<&DivergenceInfo>
fn divergence_info(&self) -> Option<&DivergenceInfo>
More detailed information if the draw came from a diverging trajectory.
sourcefn gradient(&self) -> Option<&[f64]>
fn gradient(&self) -> Option<&[f64]>
The logp gradient at the location of the draw. This is only stored
if NutsOptions.store_gradient is true
.
sourcefn unconstrained(&self) -> Option<&[f64]>
fn unconstrained(&self) -> Option<&[f64]>
The draw in the unconstrained space.