pub struct ChangeRateEstimator { /* private fields */ }Expand description
Beta-Binomial estimator for change-rate p.
Maintains a Beta posterior with exponential decay and deterministic updates.
Implementations§
Source§impl ChangeRateEstimator
impl ChangeRateEstimator
Sourcepub fn new(
prior_alpha: f64,
prior_beta: f64,
decay: f64,
min_observation_cells: usize,
) -> Self
pub fn new( prior_alpha: f64, prior_beta: f64, decay: f64, min_observation_cells: usize, ) -> Self
Create a new estimator with the given priors and decay.
Sourcepub fn posterior_params(&self) -> (f64, f64)
pub fn posterior_params(&self) -> (f64, f64)
Posterior parameters (α, β).
Sourcepub fn observe(&mut self, cells_scanned: usize, cells_changed: usize)
pub fn observe(&mut self, cells_scanned: usize, cells_changed: usize)
Observe an update with scanned and changed cells.
Sourcepub fn upper_quantile(&self, q: f64) -> f64
pub fn upper_quantile(&self, q: f64) -> f64
Upper quantile of the Beta distribution using normal approximation.
Trait Implementations§
Source§impl Clone for ChangeRateEstimator
impl Clone for ChangeRateEstimator
Source§fn clone(&self) -> ChangeRateEstimator
fn clone(&self) -> ChangeRateEstimator
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for ChangeRateEstimator
impl RefUnwindSafe for ChangeRateEstimator
impl Send for ChangeRateEstimator
impl Sync for ChangeRateEstimator
impl Unpin for ChangeRateEstimator
impl UnsafeUnpin for ChangeRateEstimator
impl UnwindSafe for ChangeRateEstimator
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