pub struct PredictiveStreamingEngine<A: Float + Send + Sync> { /* private fields */ }Expand description
Predictive streaming engine for anticipating data patterns
Implementations§
Source§impl<A: Float + Send + Sync> PredictiveStreamingEngine<A>
impl<A: Float + Send + Sync> PredictiveStreamingEngine<A>
pub fn new(config: &StreamingConfig) -> Result<Self>
Sourcepub fn predict_next(
&mut self,
current_data: &[StreamingDataPoint<A>],
) -> Result<Vec<StreamingDataPoint<A>>>
pub fn predict_next( &mut self, current_data: &[StreamingDataPoint<A>], ) -> Result<Vec<StreamingDataPoint<A>>>
Train on the newly arrived samples, then forecast the continuation of the stream.
T8: every arriving sample is now actually used to fit the model
(one exact recursive-least-squares update per observed coordinate)
before any prediction is made, and predictions are only emitted once
the model’s measured out-of-sample accuracy clears
confidence_threshold. Previously the model was never trained and
predict_next returned copies of the most recent observation, which
carried no information about the future at all.
Sourcepub fn prediction_confidence(&self) -> A
pub fn prediction_confidence(&self) -> A
The model’s current measured confidence in [0, 1].
Sourcepub fn prediction_error(&self) -> A
pub fn prediction_error(&self) -> A
Measured out-of-sample mean absolute one-step prediction error.
Sourcepub fn normalized_prediction_error(&self) -> A
pub fn normalized_prediction_error(&self) -> A
Measured prediction error relative to the scale of the observed data.
Sourcepub fn adaptation_rate(&self) -> A
pub fn adaptation_rate(&self) -> A
The engine’s adaptation rate (how aggressively the fit chases a changing stream).
Auto Trait Implementations§
impl<A> Freeze for PredictiveStreamingEngine<A>where
A: Freeze,
impl<A> RefUnwindSafe for PredictiveStreamingEngine<A>where
A: RefUnwindSafe,
impl<A> Send for PredictiveStreamingEngine<A>
impl<A> Sync for PredictiveStreamingEngine<A>
impl<A> Unpin for PredictiveStreamingEngine<A>where
A: Unpin,
impl<A> UnsafeUnpin for PredictiveStreamingEngine<A>where
A: UnsafeUnpin,
impl<A> UnwindSafe for PredictiveStreamingEngine<A>where
A: UnwindSafe + RefUnwindSafe,
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.