pub struct AdwinTest<A: Float + Send + Sync> { /* private fields */ }Expand description
ADWIN (ADaptive WINdowing).
Maintains a single window of recent observations and, on every update,
searches every valid split point for a pair of sub-windows whose means
differ by more than the Hoeffding cut
eps_cut = R * sqrt(ln(4/delta) / (2m)), where m is the harmonic
combination 1/(1/n0 + 1/n1) of the sub-window sizes and R is the
observed range of the window (the practical adaptation used for unbounded
metrics — the textbook bound assumes observations in [0, 1]). When a cut
is found the older sub-window is dropped, which is ADWIN’s defining
behaviour: the window shrinks to the most recent stationary segment.
ADWIN is a single-stream detector, so it consumes only the newly arrived observations; the caller’s reference sample is not used (that is what makes it genuinely different from the two-sample tests in this module).
Implementations§
Trait Implementations§
Source§impl<A: Float + Default + Clone + Send + Sync + Sum> StatisticalTest<A> for AdwinTest<A>
impl<A: Float + Default + Clone + Send + Sync + Sum> StatisticalTest<A> for AdwinTest<A>
Source§fn test_for_drift(
&mut self,
_reference: &[A],
current: &[A],
) -> Result<DriftTestResult<A>, String>
fn test_for_drift( &mut self, _reference: &[A], current: &[A], ) -> Result<DriftTestResult<A>, String>
Auto Trait Implementations§
impl<A> Freeze for AdwinTest<A>
impl<A> RefUnwindSafe for AdwinTest<A>where
A: RefUnwindSafe,
impl<A> Send for AdwinTest<A>
impl<A> Sync for AdwinTest<A>
impl<A> Unpin for AdwinTest<A>where
A: Unpin,
impl<A> UnsafeUnpin for AdwinTest<A>
impl<A> UnwindSafe for AdwinTest<A>where
A: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
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> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.