pub struct StreamingPhiEstimator { /* private fields */ }Expand description
Online Φ estimator with empirical TPM and sliding window.
Implementations§
Source§impl StreamingPhiEstimator
impl StreamingPhiEstimator
Sourcepub fn with_forgetting_factor(self, lambda: f64) -> Self
pub fn with_forgetting_factor(self, lambda: f64) -> Self
Configure forgetting factor (0 < λ ≤ 1). Lower = faster forgetting.
Sourcepub fn with_ewma_alpha(self, alpha: f64) -> Self
pub fn with_ewma_alpha(self, alpha: f64) -> Self
Configure EWMA smoothing factor (0 < α ≤ 1). Higher = more responsive.
Sourcepub fn with_cusum_threshold(self, threshold: f64) -> Self
pub fn with_cusum_threshold(self, threshold: f64) -> Self
Configure change-point detection threshold.
Sourcepub fn observe<E: PhiEngine>(
&mut self,
state: usize,
engine: &E,
budget: &ComputeBudget,
) -> Option<StreamingPhiResult>
pub fn observe<E: PhiEngine>( &mut self, state: usize, engine: &E, budget: &ComputeBudget, ) -> Option<StreamingPhiResult>
Observe a new state in the time series.
Updates the empirical TPM and returns updated Φ estimate if enough data has been accumulated.
Sourcepub fn num_transitions(&self) -> usize
pub fn num_transitions(&self) -> usize
Current number of observed transitions.
Auto Trait Implementations§
impl Freeze for StreamingPhiEstimator
impl RefUnwindSafe for StreamingPhiEstimator
impl Send for StreamingPhiEstimator
impl Sync for StreamingPhiEstimator
impl Unpin for StreamingPhiEstimator
impl UnsafeUnpin for StreamingPhiEstimator
impl UnwindSafe for StreamingPhiEstimator
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